Reprint PLEASE note: Please send the head source link and the tail two-dimensional code together reprint, thank you! , this article originates from:
http://blog.csdn.net/hejjunlin/article/details/52376462
Foreword: Before we introduce MediaPlayer related method, some people say, no actual example, see not very clear, today in Analysis MediaPlayer, incidentally a broadcast network video example. You can try it yourself. Also first look at today's agenda:
- The MediaPlayer framework in Android
- MediaPlayer Play Video Main module
- Play main module corresponding components
- MediaPlayer method corresponding to valid state and invalid state
- Case: MediaPlayer Play network video
The MediaPlayer framework in Android
MediaPlayer Play Video Main module
Play main module corresponding components
MediaPlayer method corresponding to valid state and invalid state
This article is from countercurrent fish yuiop, article link::
http://blog.csdn.net/hejjunlin/article/details/52376462
MediaPlayer Playing Network Video
To demonstrate, I built a server locally and placed the video file in the root directory in Tomcat. The name is a video of Sanpan.mp4.
Case code
Set playback-related methods: MediaPlayer the understanding of each State in the previous article.
XML file:
Because it is a network video, remember to add access to the network in manifest
The above code has been uploaded to Baidu Cloud: (permanent link) https://pan.baidu.com/s/1jIpslQu
The first time to get blog update reminders, as well as more Android dry, source code Analysis , Welcome to follow my public number, sweep the bottom QR code or long press to identify two-dimensional code, you can pay attention to.
If you feel good, easy to praise, but also to the author's affirmation, can also share this public number to you more people, original not easy
Android Multimedia Framework Summary (ii) MediaPlayer frame and broadcast network video case