HTML5< video>元素在WP8.1中不起作用 [英] HTML5 <video> element not working in WP8.1
问题描述
我见过一些类似的问题,但不是Windows Phone,其他地方的建议都没有帮助我,所以:
I've seen some similar questions, but not for Windows Phone, and none of the advice elsewhere has helped me, so:
我正在开发一个应用程序WP的代码如下所示:
I'm developing an app for WP with some code that looks like this:
< video width =" 320"高度= QUOT; 240"控件>
< source src =" movie.mp4" type =" video / mp4">
< source src =" movie.ogg" type =" video / ogg">
视频代码不受支持。
< / video>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
The video tag is unsupported.
</video>
当我在WP8上测试应用时,视频播放与预期一样。但是在WP 8.1上运行的同一个应用程序会产生一个带控件和文本"无效来源"的黑框。
When I test the app on WP8, the video plays just as expected. But the same app running on WP 8.1 results in a black box with the controls and the text 'Invalid Source'.
这只发生在应用程序中打包的本地文件中。如果我提供指向网络内容的链接,例如:
This only happens with local files packaged in the app. If I give a link to web content, such as:
< source src =" http://techslides.com/demos/sample-videos/small.mp4"> ,
<source src="http://techslides.com/demos/sample-videos/small.mp4">,
视频播放得很好。
为什么这适用于WP8但不适用于WP8 .1?
Why does this work on WP8 but not on WP8.1?
推荐答案
你好,
我们为网络和本地文件使用不同的来源。您的文件可能会有一些时髦的东西,本地资源正在被挂起。我知道我们在WP8.1中使用了MP4堆栈。我们可能会收紧规格。我建议您使用符合第10部分规格的良好编码器重新编码内容
。
We use a different source for network and local files. Likely there is something funky with your file that the local source is getting hung up on. I do know we reved the MP4 stack in WP8.1. Its likely that we tightened the spec. I would recommend that you re-encode your content with a good encoder that adheres to the part 10 spec.
我希望这样帮助,
詹姆斯
这篇关于HTML5< video>元素在WP8.1中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!