diff --git a/app/build.gradle b/app/build.gradle index 4cbe51a..c473b88 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,5 +25,5 @@ dependencies { implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.1.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.3.1' - implementation 'androidx.constraintlayout:constraintlayout:2.1.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.1' } diff --git a/build.gradle b/build.gradle index d8308e3..ca06b15 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,8 @@ buildscript { ext.kotlin_version = '1.5.30' ext.library_group = "com.github.pedroSG94" - ext.version_code = 114 - ext.version_name = "1.1.4" + ext.version_code = 115 + ext.version_name = "1.1.5" repositories { google() @@ -13,7 +13,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/rtspserver/build.gradle b/rtspserver/build.gradle index 7873999..78964d8 100644 --- a/rtspserver/build.gradle +++ b/rtspserver/build.gradle @@ -39,5 +39,5 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.1.1' + implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.1.3' } diff --git a/rtspserver/src/main/java/com/pedro/rtspserver/ServerCommandManager.kt b/rtspserver/src/main/java/com/pedro/rtspserver/ServerCommandManager.kt index 23c6f78..d9ee41c 100644 --- a/rtspserver/src/main/java/com/pedro/rtspserver/ServerCommandManager.kt +++ b/rtspserver/src/main/java/com/pedro/rtspserver/ServerCommandManager.kt @@ -188,7 +188,15 @@ open class ServerCommandManager(private val serverIp: String, private val server } private fun createPlay(cSeq: Int): String { - return "${createHeader(cSeq)}Content-Length: 0\r\nRTP-Info: url=rtsp://$serverIp:$serverPort/\r\nSession: 1185d20035702ca\r\n\r\n" + var info = "" + if (!videoDisabled) { + info += "url=rtsp://$serverIp:$serverPort/streamid=${RtpConstants.trackVideo};seq=1;rtptime=0" + } + if (!audioDisabled) { + if (!videoDisabled) info += "," + info += "url=rtsp://$serverIp:$serverPort/streamid=${RtpConstants.trackAudio};seq=1;rtptime=0" + } + return "${createHeader(cSeq)}Content-Length: 0\r\nRTP-Info: $info\r\nSession: 1185d20035702ca\r\n\r\n" } private fun createPause(cSeq: Int): String {