MediaElement 未播放视频
你好 我正在尝试使用 MediaElement 播放视频 (wmv) 文件。我已经用V8编码了视频。我已在 Visual Studio 中将文件的属性设置为
“构建操作:资源”
复制到目标目录:始终复制
问题是,当我执行代码时,MediaElement 仅播放文件的 2 或 3 秒。不显示视频。仅播放 2 或 3 秒的音频,但我的文件是包含音频的视频文件,其持续时间为 10 秒。
谁能告诉我如何解决这个问题?
此致 块引用
Hi
I am trying to play a video (wmv) file using MediaElement. I have encoded the video in V8. I have set the properties of the file in Visual Studio as
Build Action: Resource
Copy to Destination Directory: Always Copy
Problem is that when I execute the code, the MediaElement play just 2 or 3 seconds of the file. No video is displayed. Just audio of 2 or 3 seconds is played but my file is a video file containing audio as well and its duration is 10seconds.
Can anyone please tell me how to fix this issue?
Best Regards
Blockquote
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您在模拟器中测试您的场景,那么(我在建议的文章中找到了这一点):
注意:在 Windows Phone 7 模拟器中,应用程序可以启动媒体播放器,用户可以播放音乐,但不会渲染视频。
希望这会对您有所帮助。
If you test your scenario in the emulator then (I found this in the suggested article):
NOTE: In windows phone 7 emulator the application can start the media player and the user can play music, but video is not rendered.
Hope this will help you.
听起来电影文件已损坏。
您检查过尺寸是否正确吗?
您尝试过其他文件吗?
你从哪里玩? IsoatedStorage 还是来自 XAP?
您还可以尝试使用 MediaPlayerLauncher 以确认其完整且未损坏。
如果它与启动器配合良好,请提供您实际尝试在代码中执行的操作的示例。
Sounds like the movie file is corrupt.
Have you checked the size is as it should be?
Have you tried other files?
Where are you playing from? IsoatedStorage or from within the XAP?
You can also try playing the file with the MediaPlayerLauncher to confirm that it is complete and not corrupt.
If it plays fine with the launcher please provide an exmaple of what you're actually trying to do in code.