Can't run live stream using Vitamio

老子叫甜甜 提交于 2019-12-02 02:11:18
Muhammed Refaat

After scanning a lot of near similar problems, I figured that it's may be because it demands to has ACCESS_NETWORK_STATE permission, although the log didn't tell me that but as it tells me it's not a qualified user to perform this process which means the user must be given the permission to be qualified for that, So, I added this permission:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

So, to run an authorized RTSP live stream using Vitamio, you need to register all of the following permissions:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

I had a problem where I was unable to stream RTSP even I removed the Authuntication like Username and Password. So I can Access the link Directly. What Things Work for Me to Stream LIVE were:

1st Make Sure That You Have Registered the Permissions.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

2nd I gave the Streaming Link as:

rtsp://192.xxx.x.xx/h264 OR rtsp://192.111.1.1/h264 ( example )

Remember I removed the Username and Password for RTSP Links in My IP Camera Settings.

3rd: Important thing that worked for me was:

Open build.gradle of your app
change targedsdkversion to 22
Open build.gradle of your Vitamio:module
change targedsdkversion to 22
It may sound weird but it worked for me like a charm.

Hope This might be helpful.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!