Introduction and use of Android universal player decoding framework Vitamio, androidvitamio
I. Introduction
Vitamio can smoothly play videos in common formats such as 720P or even 1080P hd mkv, FLV, MP4, MOV, TS, and RMVB, and supports MMS, RTSP, RTMP, and, HLS (m3u8) and other common video streaming protocols, including on-demand and live streaming.
Using the Vitamio framework is mainly because it can play enough video formats (called omnipotent players), while android players can only play mp4, 3gp,. m3u8 video formats.
Ii. Use
1, (Official Website): https://www.vitamio.org/Download/ can download the latest version from the official website
Both of them need to be imported to AndroidStudio. For specific usage, refer to the instance (vitamio-sample)
2. associated database: From vitamio-sample/buidle. Gradle, you can see that only compile project (': vitamio') is required.
3. Open the inventory file:
Copy permission
<Uses-permission android: name = "android. permission. WAKE_LOCK"/>
<Uses-permission android: name = "android. permission. INTERNET"/>
<Uses-permission android: name = "android. permission. ACCESS_NETWORK_STATE"/>
<Uses-permission android: name = "android. permission. READ_EXTERNAL_STORAGE"/>
<Uses-permission android: name = "android. permission. ACCESS_WIFI_STATE"/>
<Uses-permission android: name = "android. permission. READ_PHONE_STATE"/>
This prompt is displayed in the list. <! -- Don't forgot InitActivity --> must be copied.
<! -- Don't forgot InitActivity -->
<Activity
Android: name = "io. vov. vitamio. activity. InitActivity"
Android: configChanges = "orientation | screenSize | smallestScreenSize | keyboard | keyboardHidden | navigation"
Android: launchMode = "singleTop"
Android: theme = "@ android: style/Theme. NoTitleBar"
Android: windowSoftInputMode = "stateAlwaysHidden"/>
4. initialize the database:
Open vitamio-sample \ src \ io \ vov \ vitamio \ demo \ VideoViewDemo. java and find Vitamio. isInitialized (this );
5. UI:
Open vitamio-sample \ res \ layout \ videoview. xml and find that <io. vov. vitamio. widget. VideoView ....../> you have to follow this step.
3. Note
The first is the system, and the third is what we need. It is easy to export error packets (VideoView, MediaPlayer)
For details about how to run the vitamio-sample example and click play, the effect is not as follows:
/**
* TODO: Set the path variable to a streaming video URL or a local media file
* Path.
*/
Therefore, you need to find String path = ""; and enter a valid network video address.