Integrated Vitamio for Universal player

Source: Internet
Author: User

Brief introduction:

Vitamio is an all-in-one multimedia development framework on Android and IOS platforms that supports both hardware decoding and GPU rendering. With its simple and easy-to-use API interface, Vitamio has won the favor of many developers around the world. To date, more than 1800 applications worldwide have been using Vitamio, covering more than 200 million users.

Vitamio can seamlessly play videos in common formats such as 720P or 1080P HD MKV,FLV,MP4,MOV,TS,RMVB, as well as cross-platform support for MMS, RTSP, RTMP, HLS (m3u8) on Android and IOS A variety of common video streaming protocols, including on-demand and live streaming.

Integration steps:   

1) Declare permissions in the manifest file:

<uses-permission android:name= "Android.permission.READ_EXTERNAL_STORAGE"/><uses-permission android:name = "Android.permission.INTERNET"/><uses-permission android:name= "Android.permission.WAKE_LOCK"/>< Uses-permission android:name= "Android.permission.ACCESS_NETWORK_STATE"/>

2) Declaration initactivity:

<!--Don ' t forgot initactivity--><activityandroid: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"/>

3) Use the next line in the layout file XML instead of Videoview

<io.vov.vitamio.widget.VideoView>

4) Replace all Videoview-related packages in the code with the Vitamio library.

5) First initialize when using the Vitamio plugin:

// Initialize Vitamio, in the OnCreate of application Vitamio.isinitialized (this);

6) Use Vitamio to switch between full-screen and default scale

/**Toggle Fullscreen*/ Public voidTogglefullscreen () {if(Mvideolayout = = Video_layout_stretch) {//full screen, default sizeSetvideolayout (Video_layout_scale, 0); } Else{//default size, fullscreenSetvideolayout (Video_layout_stretch, 0); }}/**is currently full screen playback*/ Public BooleanIsFullScreen () {returnMvideolayout = =Video_layout_stretch;}

Integrated Vitamio for Universal player

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.