积极答复者
wp8 MediaElement 用了没反应。。。

问题
答案
-
你好,
1. 确保video.mp4路径正确。
2. 注意Autoplay属性:In code, set this property to false before setting the Source property to pause the media at load time. Call the Play method to start media playback. When opened, the media will be in Stopped state.
具体请参考:
1.MSDN: MediaElement Properties
2.Blog:与众不同 windows phone (14) - Media(媒体)之音频播放器, 视频播放器
Keep Fighting
- 已标记为答案 iwpfModerator 2012年12月27日 2:36
-
你好,
据我所知,wp8(模拟器)下可以播放MP3, MP4/WMV,但是在wp7下,MP3是可以播放的,WMV不能渲染播放(模拟器)
wp8播放视频代码(请把视频,音频文件放在Assets文件夹):
<MediaElement Height="Auto" Width="Auto" x:Name="VideoPlayer" AutoPlay="True" Source="Assets/video.mp4"></MediaElement>
Mark Yu - MSFT
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 iwpfModerator 2012年12月27日 2:36
- 已编辑 iwpfModerator 2012年12月27日 8:38
全部回复
-
你好,
1. 确保video.mp4路径正确。
2. 注意Autoplay属性:In code, set this property to false before setting the Source property to pause the media at load time. Call the Play method to start media playback. When opened, the media will be in Stopped state.
具体请参考:
1.MSDN: MediaElement Properties
2.Blog:与众不同 windows phone (14) - Media(媒体)之音频播放器, 视频播放器
Keep Fighting
- 已标记为答案 iwpfModerator 2012年12月27日 2:36
-
你好,
据我所知,wp8(模拟器)下可以播放MP3, MP4/WMV,但是在wp7下,MP3是可以播放的,WMV不能渲染播放(模拟器)
wp8播放视频代码(请把视频,音频文件放在Assets文件夹):
<MediaElement Height="Auto" Width="Auto" x:Name="VideoPlayer" AutoPlay="True" Source="Assets/video.mp4"></MediaElement>
Mark Yu - MSFT
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 iwpfModerator 2012年12月27日 2:36
- 已编辑 iwpfModerator 2012年12月27日 8:38