开发者

Audio only while streaming a mp4 file to Android Device

I 've set Wowza streaming server to stream mp4 videos to Android phones. Android p开发者_运维问答hone can play the RTSP stream successfully but here It only plays audio of the file not the video.


Did you set surface (VideoView or SurfaceView) on which you would like to display video? You have to run setDisplay before running playback.

Problems with video can also be caused by starting playback too early. You should start player after surface is created. If you want to start playback at start of the Activity, you should do it on surfaceCreated event. You can listen to this event by implementing SurfaceHolder.Callback

Can you provide some source codes?

You can also try to follow Android ApiDemos. Video streaming player example can be found at:

...android-sdk-windows\platforms\android-x\samples\ApiDemos\src\com\example\android\apis\media\MediaPlayerDemo_Video.java
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜