Play video stream using Vitamio library in android?

后端 未结 1 487
南旧
南旧 2021-01-13 11:43

I\'m using the library Vitamio to play rtsp live stream. I tried to run the demo videoview class play rtsp link as follows:

http://117.103.224.75:1935/live/definst/V

相关标签:
1条回答
  • 2021-01-13 12:36

    If you want to use Vitamio library for displaying video etc, then first of all download Vitamio Library from here Free download Vitamio Library. then include both "ZI" and "InitActivtiy" (which is inside the Vitamio lib) Library in your current project (right click project-->include library-->), then write this line of code

     if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this))
            return;
    

    after Oncreate Method() like in my project.

     @Override
    protected void onCreate(Bundle savedInstanceState) 
     {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        if (!io.vov.vitamio.LibsChecker.checkVitamioLibs(this)) //it will check the include library of Vitamio
            return;
    

    after that put this line of code in Androidmanifest.xml file

      <!-- (((((( Vitamio Library including in manifest file )))))) -->
       <activity android:name="io.vov.vitamio.activity.InitActivity" 
           android:configChanges="orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden"
           android:launchMode="singleTop"
            android:theme="@android:style/Theme.NoTitleBar"
            android:windowSoftInputMode="stateAlwaysHidden"/>     
    

    Now its a time to display your video using VideoView etc.

    0 讨论(0)
提交回复
热议问题