Introduction and use of Android universal player decoding framework Vitamio, androidvitamio

Source: Internet
Author: User

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.
 
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.