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