简体   繁体   English

WMV文件在WP8仿真器上播放-无法在设备上播放

[英]WMV file plays on WP8 emulator - fails to play on device

I've got a url to a WMV file, which I want to play with a MediaPlayerLauncher in my app. 我有一个WMV文件的URL,我想在我的应用程序中与MediaPlayerLauncher一起播放。 This works just fine in the emulator, but when I try this on my device, running the exact same code as in the emulator, I get the message "Sorry we cant play this file on your phone". 这在模拟器中可以正常工作,但是当我在设备上尝试运行与模拟器中完全相同的代码时,我收到消息“对不起,我们无法在手机上播放此文件”。 My phone is a HTC 8x. 我的手机是HTC 8x。 Does anyone know why this may occur? 有谁知道为什么会这样?

The video codec support for the emulator doesn't exactly match the device. 模拟器的视频编解码器支持与设备不完全匹配。

Also depending on the exact chipset on the phone the codec in a particular audio or video file may not be supported on any particular device. 另外,根据电话上确切的芯片组,在任何特定设备上可能不支持特定音频或视频文件中的编解码器。 You can find more information on MSDN . 您可以在MSDN上找到更多信息。

This worked for me: 这为我工作:

When you attempt to play an AudioTrack from your app and there's no response at all (not even an Exception generated), play something from the phone's Music+Videos app (either a song or a podcast), and then try your app again. 当您尝试从您的应用程序播放AudioTrack时,根本没有响应(甚至没有生成异常),请从手机的“音乐+视频”应用程序中播放某些内容(歌曲或播客),然后重试您的应用程序。

(I'm still debugging this issue with the BackgroundAudioPlayer...I think I may be passing it a filename in ISO storage that hasn't finished downloading. On which the AudioPlayer is then choking, which I'm then failing to detect and recover from. I'll post here again on any progress made.) (我仍在使用BackgroundAudioPlayer调试此问题...我想我可能正在将它传递给尚未完成下载的ISO存储中的文件名。然后,AudioPlayer阻塞了该文件名,导致我无法检测到并从中恢复。我将在这里再次发布任何进展。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM