如果 html5 <video> wp7 播放器冻结和隔离存储 [英] wp7 player freezes if html5 <video> and isolated storage

查看:25
本文介绍了如果 html5 <video> wp7 播放器冻结和隔离存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序独立存储中有视频文件,我想使用 video 标签从 html 播放它.视频播放器运行,然后挂在正在加载...".有人可以使用 html5 视频标签和独立存储设法播放视频吗?

I have video file located in my application isolated storage and would like to play it from html using video tag. Video player runs and then hangs on "loading..". Can someone manage to get video played using html5 video tag and isolated storage?

我的观察和测试(HTC HD7、Mango Beta 2 - 7.10.7712.60).

My observations and tests (HTC HD7, Mango Beta 2 - 7.10.7712.60).

  1. 我可以使用 MediaElement 或 MediaPlayerLauncher 播放此视频文件.所以文件是正确的.
  2. 如果我在 Internet 上发布此文件并更改对绝对 (src="http://absoluteUri.mp4") 视频文件的引用,则会正确打开.所以看起来相对路径和隔离存储有问题.
  3. 如果我指定了错误的相对路径,我会看到另一条消息,因此我的实验中的相对路径是正确的.
  4. audio html5 标签可以很好地处理隔离的存储文件;视频 - 如果我在互联网上引用音频文件,则不会(冻结)但可以正常工作
  5. 对于/folder/video.mp4"和\folder\video.mp4"设备打开不同的播放屏幕,但都冻结了正在加载"和正在打开"消息.
  6. MediaPlayerLauncher C# 类可以使用folder/video.mp4"名称(不会冻结)并且不适用于路径中的前导斜杠 - /folder/video.mp4" - 抛出文件未找到;相反,即使在根文件夹中,标签也无法找到没有前导斜杠的文件.
  7. 由 MediaPlayerLauncher 和 html 标签触发的播放屏幕看起来相同,但在第一种情况下它可以工作,而在第二种情况下它会冻结.

应用程序概述:该应用程序是通用的 Windows Phone Silverlight 应用程序,带有嵌入式 WebBrowser 控件,其中托管 html.为什么我需要这个?- 我正在研究跨移动平台,其中应用程序定义为 html + js.

Application overview: the app is general Windows Phone Silverlight app with embedded WebBrowser control where html is hosted. Why I need this? - I'm working on cross-mobile platform where application is defined as html + js.

推荐答案

Erick Fleck 在这篇博文 - http://social.msdn.microsoft.com/forums/en-us/wpdevelop/thread/190abd75-3b45-4454-96ab-c32fb19c4664.看起来它归结为您存储内容的位置",因此如果您希望它成为真正的 xplat,其他应用程序必须调整它们的结构.或者你可以做一些自适应网址".

Erick Fleck covers this pretty good at the MSDN forums in this blog post - http://social.msdn.microsoft.com/forums/en-us/wpdevelop/thread/190abd75-3b45-4454-96ab-c32fb19c4664 . Looks like it comes down to 'where you store your content', so the other apps would have to adapt their structure if you want it to be truly xplat. Or you could do some 'adaptive urls'.

这篇关于如果 html5 <video> wp7 播放器冻结和隔离存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆