diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..385f27a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} diff --git a/android/build.gradle b/android/build.gradle index 21b321b..ae3e056 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,19 +1,22 @@ -group 'com.mminh.flutter_audio_streaming' -version '1.0-SNAPSHOT' - buildscript { - ext.kotlin_version = '1.5.21' + ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } +group 'com.resideo.flutter_audio_streaming' +version '1.0-SNAPSHOT' + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + rootProject.allprojects { repositories { google() @@ -22,24 +25,40 @@ rootProject.allprojects { } } -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - android { - compileSdkVersion 30 + compileSdkVersion 35 + namespace "com.resideo.flutter_audio_streaming" sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { - minSdkVersion 21 + minSdkVersion 28 + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" } } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + //implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.0.7' - implementation "androidx.core:core-ktx:+" + implementation "androidx.core:core-ktx:1.3.2" + + + constraints { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { + because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") + } + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { + because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") + } + } //Development // implementation files('/Users/lqm/development/flutter/bin/cache/artifacts/engine/android-x64/flutter.jar') diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100755 index 0000000..c1962a7 Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 0ee9713..609ab8e 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip diff --git a/android/gradlew b/android/gradlew new file mode 100755 index 0000000..aeb74cb --- /dev/null +++ b/android/gradlew @@ -0,0 +1,245 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 7e521fa..02d0324 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ + > diff --git a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/AudioRecording.kt b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/AudioRecording.kt similarity index 97% rename from android/src/main/kotlin/com/mminh/flutter_audio_streaming/AudioRecording.kt rename to android/src/main/kotlin/com/resideo/flutter_audio_streaming/AudioRecording.kt index 2dd2f4f..40121c3 100644 --- a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/AudioRecording.kt +++ b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/AudioRecording.kt @@ -1,4 +1,4 @@ -package com.mminh.flutter_audio_streaming +package com.resideo.flutter_audio_streaming import android.app.Activity import android.media.MediaRecorder diff --git a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/AudioStreaming.kt b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/AudioStreaming.kt similarity index 56% rename from android/src/main/kotlin/com/mminh/flutter_audio_streaming/AudioStreaming.kt rename to android/src/main/kotlin/com/resideo/flutter_audio_streaming/AudioStreaming.kt index 24febbc..d4b8046 100644 --- a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/AudioStreaming.kt +++ b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/AudioStreaming.kt @@ -1,18 +1,19 @@ -package com.mminh.flutter_audio_streaming +package com.resideo.flutter_audio_streaming import android.app.Activity import android.util.Log -import com.pedro.rtmp.utils.ConnectCheckerRtmp -import com.pedro.rtplibrary.rtmp.RtmpOnlyAudio +import com.pedro.rtplibrary.rtsp.RtspOnlyAudio +import com.pedro.rtsp.utils.ConnectCheckerRtsp import io.flutter.plugin.common.MethodChannel import java.io.IOException class AudioStreaming( private var activity: Activity? = null, private var dartMessenger: DartMessenger? = null -) : ConnectCheckerRtmp { +) : ConnectCheckerRtsp { - private val rtmpAudio: RtmpOnlyAudio = RtmpOnlyAudio(this) + + private val rtspAudio: RtspOnlyAudio = RtspOnlyAudio(this) private var prepared: Boolean = false private var bitrate: Int? = null private var sampleRate: Int? = null @@ -30,9 +31,9 @@ class AudioStreaming( this.echoCanceler = echoCanceler this.noiseSuppressor = noiseSuppressor prepared = true - return rtmpAudio.prepareAudio( - bitrate ?: (24 * 1024), - sampleRate ?: 16000, + return rtspAudio.prepareAudio( + bitrate ?: (128 * 1024), + sampleRate ?: 44100, isStereo ?: true, echoCanceler ?: false, (noiseSuppressor ?: true) @@ -41,9 +42,9 @@ class AudioStreaming( private fun prepare(): Boolean { prepared = true - return rtmpAudio.prepareAudio( - this.bitrate ?: (24 * 1024), - this.sampleRate ?: 16000, + return rtspAudio.prepareAudio( + this.bitrate ?: (128 * 1024), + this.sampleRate ?: 44100, this.isStereo ?: true, this.echoCanceler ?: false, this.noiseSuppressor ?: true @@ -62,10 +63,10 @@ class AudioStreaming( return } try { - if (!rtmpAudio.isStreaming) { + if (!rtspAudio.isStreaming) { if (prepared || prepare()) { // ready to start streaming - rtmpAudio.startStream(url) + rtspAudio.startStream(url) val ret = hashMapOf() ret["url"] = url result.success(ret) @@ -85,7 +86,7 @@ class AudioStreaming( fun muteStreaming(result: MethodChannel.Result) { try { - rtmpAudio.disableAudio() + rtspAudio.disableAudio() result.success(null) } catch (e: IllegalStateException) { result.error("MuteAudioStreamingFailed", e.message, null) @@ -94,7 +95,7 @@ class AudioStreaming( fun unMuteStreaming(result: MethodChannel.Result) { try { - rtmpAudio.enableAudio() + rtspAudio.enableAudio() result.success(null) } catch (e: IllegalStateException) { result.error("UnMuteAudioStreamingFailed", e.message, null) @@ -103,56 +104,98 @@ class AudioStreaming( fun stopStreaming(result: MethodChannel.Result) { try { - rtmpAudio.stopStream() + rtspAudio.stopStream() result.success(null) } catch (e: IllegalStateException) { result.error("StopAudioStreamingFailed", e.message, null) } } - override fun onConnectionSuccessRtmp() { - Log.d(TAG, "onConnectionSuccessRtmp") - } + /* override fun onConnectionSuccessRtmp() { + Log.d(TAG, "onConnectionSuccessRtmp") + } + + override fun onNewBitrateRtmp(bitrate: Long) { + Log.d(TAG, "onNewBitrateRtmp: $bitrate") + } + + override fun onDisconnectRtmp() { + Log.d(TAG, "onDisconnectRtmp") + activity?.runOnUiThread { + dartMessenger?.send(DartMessenger.EventType.RTMP_STOPPED, "Disconnected") + } + } + + override fun onAuthErrorRtmp() { + Log.d(TAG, "onAuthErrorRtmp") + activity?.runOnUiThread { + dartMessenger?.send(DartMessenger.EventType.ERROR, "Auth error") + } + } + + override fun onAuthSuccessRtmp() { + Log.d(TAG, "onAuthSuccessRtmp") + } + + override fun onConnectionFailedRtmp(reason: String) { + Log.d(TAG, "onConnectionFailedRtmp") + activity?.runOnUiThread { //Wait 5s and retry connect stream + if (rtmpAudio.reTry(5000, reason)) { + dartMessenger?.send(DartMessenger.EventType.RTMP_RETRY, reason) + } else { + dartMessenger?.send(DartMessenger.EventType.RTMP_STOPPED, "Failed retry") + rtmpAudio.stopStream() + } + } + } + + override fun onConnectionStartedRtmp(rtmpUrl: String) { + Log.d(TAG, "onConnectionStartedRtmp") + }*/ - override fun onNewBitrateRtmp(bitrate: Long) { - Log.d(TAG, "onNewBitrateRtmp: $bitrate") - } - - override fun onDisconnectRtmp() { - Log.d(TAG, "onDisconnectRtmp") - activity?.runOnUiThread { - dartMessenger?.send(DartMessenger.EventType.RTMP_STOPPED, "Disconnected") - } + companion object { + const val TAG = "AudioStreaming" } - override fun onAuthErrorRtmp() { - Log.d(TAG, "onAuthErrorRtmp") + override fun onAuthErrorRtsp() { + Log.d(TAG, "onAuthErrorRtsp") activity?.runOnUiThread { dartMessenger?.send(DartMessenger.EventType.ERROR, "Auth error") } } - override fun onAuthSuccessRtmp() { - Log.d(TAG, "onAuthSuccessRtmp") + override fun onAuthSuccessRtsp() { + Log.d(TAG, "onAuthSuccessRtsp") } - override fun onConnectionFailedRtmp(reason: String) { - Log.d(TAG, "onConnectionFailedRtmp") + override fun onConnectionFailedRtsp(reason: String) { + Log.d(TAG, "onConnectionFailedRtsp") activity?.runOnUiThread { //Wait 5s and retry connect stream - if (rtmpAudio.reTry(5000, reason)) { + if (rtspAudio.reTry(5000, reason)) { dartMessenger?.send(DartMessenger.EventType.RTMP_RETRY, reason) } else { dartMessenger?.send(DartMessenger.EventType.RTMP_STOPPED, "Failed retry") - rtmpAudio.stopStream() + rtspAudio.stopStream() } } } - override fun onConnectionStartedRtmp(rtmpUrl: String) { - Log.d(TAG, "onConnectionStartedRtmp") + override fun onConnectionStartedRtsp(rtspUrl: String) { + Log.d(TAG, "onConnectionStartedRtsp") } - companion object { - const val TAG = "AudioStreaming" + override fun onConnectionSuccessRtsp() { + Log.d(TAG, "onConnectionSuccessRtsp") + } + + override fun onDisconnectRtsp() { + Log.d(TAG, "onDisconnectRtsp") + activity?.runOnUiThread { + dartMessenger?.send(DartMessenger.EventType.RTMP_STOPPED, "Disconnected") + } + } + + override fun onNewBitrateRtsp(bitrate: Long) { + Log.d(TAG, "onNewBitrateRtsp: $bitrate") } } \ No newline at end of file diff --git a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/DartMessenger.kt b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/DartMessenger.kt similarity index 57% rename from android/src/main/kotlin/com/mminh/flutter_audio_streaming/DartMessenger.kt rename to android/src/main/kotlin/com/resideo/flutter_audio_streaming/DartMessenger.kt index e75b206..3e69b1d 100644 --- a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/DartMessenger.kt +++ b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/DartMessenger.kt @@ -1,4 +1,4 @@ -package com.mminh.flutter_audio_streaming +package com.resideo.flutter_audio_streaming import android.text.TextUtils import io.flutter.plugin.common.BinaryMessenger @@ -6,8 +6,7 @@ import io.flutter.plugin.common.EventChannel import io.flutter.plugin.common.EventChannel.EventSink import java.util.* - -class DartMessenger(messenger: BinaryMessenger, id : String) { +class DartMessenger(messenger: BinaryMessenger, id: String) { private var eventSink: EventSink? = null enum class EventType { @@ -19,7 +18,8 @@ class DartMessenger(messenger: BinaryMessenger, id : String) { return } val event: MutableMap = HashMap() - event["eventType"] = eventType.toString().toLowerCase(Locale.ROOT) + // Fixed deprecated toLowerCase() usage + event["eventType"] = eventType.toString().lowercase(Locale.ROOT) // Only errors have a description. if (!TextUtils.isEmpty(description)) { event["errorDescription"] = description @@ -29,15 +29,16 @@ class DartMessenger(messenger: BinaryMessenger, id : String) { init { EventChannel(messenger, "plugins.flutter.io/flutter_audio_streaming/$id") - .setStreamHandler( - object : EventChannel.StreamHandler { - override fun onListen(arguments: Any?, sink: EventSink) { - eventSink = sink - } + .setStreamHandler( + object : EventChannel.StreamHandler { + override fun onListen(arguments: Any?, sink: EventSink) { + eventSink = sink + } - override fun onCancel(arguments: Any?) { - eventSink = null - } - }) + override fun onCancel(arguments: Any?) { + eventSink = null + } + } + ) } -} \ No newline at end of file +} diff --git a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/FlutterAudioStreamingPlugin.kt b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/FlutterAudioStreamingPlugin.kt similarity index 98% rename from android/src/main/kotlin/com/mminh/flutter_audio_streaming/FlutterAudioStreamingPlugin.kt rename to android/src/main/kotlin/com/resideo/flutter_audio_streaming/FlutterAudioStreamingPlugin.kt index a326a05..60bb22b 100644 --- a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/FlutterAudioStreamingPlugin.kt +++ b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/FlutterAudioStreamingPlugin.kt @@ -1,4 +1,4 @@ -package com.mminh.flutter_audio_streaming +package com.resideo.flutter_audio_streaming import android.app.Activity import android.util.Log diff --git a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/HandlerPermissions.kt b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/HandlerPermissions.kt similarity index 98% rename from android/src/main/kotlin/com/mminh/flutter_audio_streaming/HandlerPermissions.kt rename to android/src/main/kotlin/com/resideo/flutter_audio_streaming/HandlerPermissions.kt index fde6b83..856b436 100644 --- a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/HandlerPermissions.kt +++ b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/HandlerPermissions.kt @@ -1,4 +1,4 @@ -package com.mminh.flutter_audio_streaming +package com.resideo.flutter_audio_streaming import android.Manifest.permission import android.app.Activity diff --git a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/MethodCallHandlerImpl.kt b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/MethodCallHandlerImpl.kt similarity index 99% rename from android/src/main/kotlin/com/mminh/flutter_audio_streaming/MethodCallHandlerImpl.kt rename to android/src/main/kotlin/com/resideo/flutter_audio_streaming/MethodCallHandlerImpl.kt index ba444c6..e616673 100644 --- a/android/src/main/kotlin/com/mminh/flutter_audio_streaming/MethodCallHandlerImpl.kt +++ b/android/src/main/kotlin/com/resideo/flutter_audio_streaming/MethodCallHandlerImpl.kt @@ -1,4 +1,4 @@ -package com.mminh.flutter_audio_streaming +package com.resideo.flutter_audio_streaming import android.app.Activity import android.os.Build diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index b2121b6..e9467c5 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion 33 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -34,9 +34,9 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.mminh.flutter_audio_streaming_example" - minSdkVersion 21 - targetSdkVersion 30 + applicationId "com.resideo.flutter_audio_streaming_example" + minSdkVersion 26 + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml index 6ee11c2..51e49a4 100644 --- a/example/android/app/src/debug/AndroidManifest.xml +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.resideo.flutter_audio_streaming_example"> diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index bd48bc9..7de65fd 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.resideo.flutter_audio_streaming_example"> @@ -17,6 +17,7 @@ android:label="flutter_audio_streaming_example"> + package="com.resideo.flutter_audio_streaming_example"> diff --git a/example/android/build.gradle b/example/android/build.gradle index 8fc1df9..262abdd 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,12 +1,13 @@ buildscript { - ext.kotlin_version = '1.5.10' + ext.kotlin_version = '1.7.10' repositories { google() - jcenter() + mavenCentral() + } dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,7 +15,8 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() + } } @@ -26,6 +28,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 98f029c..6b66533 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/example/lib/streaming.dart b/example/lib/streaming.dart index c627f38..1bd7457 100644 --- a/example/lib/streaming.dart +++ b/example/lib/streaming.dart @@ -40,7 +40,7 @@ class _StreamingExampleState extends State void dispose() async { _timer?.cancel(); _timer = null; - WidgetsBinding.instance!.removeObserver(this); + WidgetsBinding.instance.removeObserver(this); super.dispose(); if (isStreaming) await controller.stop(); controller.dispose(); diff --git a/example/lib/streaming_and_record.dart b/example/lib/streaming_and_record.dart index d724603..562fb02 100644 --- a/example/lib/streaming_and_record.dart +++ b/example/lib/streaming_and_record.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:developer'; import 'dart:io'; -import 'package:audioplayers/audioplayers.dart'; import 'package:flutter/material.dart'; import 'package:flutter_audio_streaming/flutter_audio_streaming.dart'; import 'package:path_provider/path_provider.dart'; @@ -45,7 +44,7 @@ class _StreamingAndRecordExampleState extends State void dispose() async { _timer?.cancel(); _timer = null; - WidgetsBinding.instance!.removeObserver(this); + WidgetsBinding.instance.removeObserver(this); super.dispose(); if (isStreaming) await streamingController.stop(); streamingController.dispose(); @@ -238,8 +237,9 @@ class _StreamingAndRecordExampleState extends State final path = await recordingController.stop(); print('path: $path'); if (path != null && path.isNotEmpty) { - AudioPlayer audioPlayer = AudioPlayer(); - await audioPlayer.play(path, isLocal: true); + //TODO: add ne wplayer here + //AudioPlayer audioPlayer = AudioPlayer(); + //await audioPlayer.play(path, isLocal: true); } _timer?.cancel(); _timer = null; diff --git a/example/pubspec.lock b/example/pubspec.lock index ede17b4..12b6bf9 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,86 +5,66 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.6.1" - audioplayers: - dependency: "direct main" - description: - name: audioplayers - url: "https://pub.dartlang.org" - source: hosted - version: "0.19.1" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.15.0" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.1" + version: "1.18.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.5" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.0" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "2.0.2" flutter: dependency: "direct main" description: flutter @@ -96,122 +76,132 @@ packages: path: ".." relative: true source: path - version: "1.0.2" + version: "1.0.5" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - http: + leak_tracker: dependency: transitive description: - name: http - url: "https://pub.dartlang.org" + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" source: hosted - version: "0.13.3" - http_parser: + version: "10.0.0" + leak_tracker_flutter_testing: dependency: transitive description: - name: http_parser - url: "https://pub.dartlang.org" + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" source: hosted - version: "4.0.0" - js: + version: "2.0.1" + leak_tracker_testing: dependency: transitive description: - name: js - url: "https://pub.dartlang.org" + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" source: hosted - version: "0.6.3" + version: "2.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.11.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + url: "https://pub.dev" source: hosted - version: "2.0.2" - path_provider_linux: + version: "2.0.15" + path_provider_android: dependency: transitive description: - name: path_provider_linux - url: "https://pub.dartlang.org" + name: path_provider_android + sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + url: "https://pub.dev" + source: hosted + version: "2.0.27" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "916731ccbdce44d545414dd9961f26ba5fbaa74bcbb55237d8e65a623a8c7297" + url: "https://pub.dev" source: hosted - version: "2.0.0" - path_provider_macos: + version: "2.2.4" + path_provider_linux: dependency: transitive description: - name: path_provider_macos - url: "https://pub.dartlang.org" + name: path_provider_linux + sha256: ffbb8cc9ed2c9ec0e4b7a541e56fd79b138e8f47d2fb86815f15358a349b3b57 + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.11" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.6" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" + sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "2.1.7" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" + sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "2.1.5" sky_engine: dependency: transitive description: flutter @@ -221,114 +211,82 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "1.3.0" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.4" + version: "0.6.1" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - wakelock: - dependency: "direct main" - description: - name: wakelock - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.2" - wakelock_macos: - dependency: transitive - description: - name: wakelock_macos - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.0+1" - wakelock_platform_interface: - dependency: transitive - description: - name: wakelock_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.1+1" - wakelock_web: - dependency: transitive - description: - name: wakelock_web - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "0.2.0+1" - wakelock_windows: + version: "2.1.4" + vm_service: dependency: transitive description: - name: wakelock_windows - url: "https://pub.dartlang.org" + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" source: hosted - version: "0.1.0" + version: "13.0.0" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 + url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "5.0.6" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: e0b1147eec179d3911f1f19b59206448f78195ca1d20514134e10641b7d7fbff + url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "1.0.1" sdks: - dart: ">=2.13.0 <3.0.0" - flutter: ">=2.2.2" + dart: ">=3.2.0-0 <4.0.0" + flutter: ">=3.3.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 2d061d3..f1f9f05 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -13,9 +13,7 @@ dependencies: path: ../ cupertino_icons: ^1.0.3 - wakelock: ^0.5.2 path_provider: ^2.0.2 - audioplayers: ^0.19.1 dev_dependencies: flutter_test: diff --git a/ios/Classes/AudioStreaming.swift b/ios/Classes/AudioStreaming.swift index d302a8a..b4648ad 100644 --- a/ios/Classes/AudioStreaming.swift +++ b/ios/Classes/AudioStreaming.swift @@ -122,7 +122,7 @@ public class AudioStreaming { } return } - retries+=1 + retries += 1 Thread.sleep(forTimeInterval: pow(2.0, Double(retries))) rtmpConnection.connect(url!) if SwiftFlutterAudioStreamingPlugin.eventSink != nil { @@ -151,16 +151,30 @@ public class AudioStreaming { .muted: false, // mute audio .bitrate: 32 * 1000, ] - rtmpStream.appendSampleBuffer( buffer, withType: .audio) + rtmpStream.appendSampleBuffer(buffer, withType: .audio) } public func stop() { rtmpConnection.close() + deactivateAudioSession() // Mic indicator gone } public func dispose(){ - + deactivateAudioSession() // Final cleanup + rtmpStream = nil + rtmpConnection = RTMPConnection() + } + + // MARK: - Private Helper + private func deactivateAudioSession() { + let session = AVAudioSession.sharedInstance() + do { + try session.setActive(false, options: .notifyOthersOnDeactivation) + print("AVAudioSession deactivated successfully") + } catch { + print("Error deactivating AVAudioSession: \(error)") + } } } @@ -173,13 +187,14 @@ class AudioStreamingQoSDelegate: RTMPStreamDelegate { func rtmpStream(_ stream: RTMPStream, didPublishInsufficientBW connection: RTMPConnection){ guard let videoBitrate = stream.videoSettings[.bitrate] as? UInt32 else { return } - var newVideoBitrate = UInt32(videoBitrate / 2) + var newVideoBitrate = UInt32(videoBitrate / 2) if newVideoBitrate < minBitrate { newVideoBitrate = minBitrate } print("Insufficient: \(videoBitrate) -> \(newVideoBitrate)") stream.videoSettings[.bitrate] = newVideoBitrate } + func rtmpStream(_ stream: RTMPStream, didPublishSufficientBW connection: RTMPConnection){ guard let videoBitrate = stream.videoSettings[.bitrate] as? UInt32 else { return } @@ -190,12 +205,16 @@ class AudioStreamingQoSDelegate: RTMPStreamDelegate { print("Sufficient: \(videoBitrate) -> \(newVideoBitrate)") stream.videoSettings[.bitrate] = newVideoBitrate } + func rtmpStream(_ stream: RTMPStream, audio: AVAudioBuffer, presentationTimeStamp: CMTime){ } + func rtmpStream(_ stream: RTMPStream, didOutput video: CMSampleBuffer){ } + func rtmpStream(_ stream: RTMPStream, didStatics connection: RTMPConnection){ } + func rtmpStreamDidClear(_ stream: RTMPStream){ print("StreamDidClear") } diff --git a/ios/Classes/SwiftFlutterAudioStreamingPlugin.swift b/ios/Classes/SwiftFlutterAudioStreamingPlugin.swift index 19aafaa..4a52778 100644 --- a/ios/Classes/SwiftFlutterAudioStreamingPlugin.swift +++ b/ios/Classes/SwiftFlutterAudioStreamingPlugin.swift @@ -68,7 +68,8 @@ class StreamHandlerEvent: NSObject, FlutterStreamHandler { func onCancel(withArguments arguments: Any?) -> FlutterError? { SwiftFlutterAudioStreamingPlugin.eventSink = nil - SwiftFlutterAudioStreamingPlugin.eventChannel?.setStreamHandler(nil) + //checking remioving it to fix MissingPluginException(No implementation found for method cancel on channel plugins.flutter.io/flutter_audio_streaming/streaming_event + //SwiftFlutterAudioStreamingPlugin.eventChannel?.setStreamHandler(nil) print("StreamHandlerEvent: onCancel") return nil } diff --git a/pubspec.lock b/pubspec.lock index 6ff3863..a3b4cac 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,51 +5,50 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.6.1" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.18.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -60,27 +59,62 @@ packages: description: flutter source: sdk version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.8.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.11.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" sky_engine: dependency: transitive description: flutter @@ -90,58 +124,66 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" source: hosted - version: "0.3.0" - typed_data: + version: "0.6.1" + vector_math: dependency: transitive description: - name: typed_data - url: "https://pub.dartlang.org" + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "1.3.0" - vector_math: + version: "2.1.4" + vm_service: dependency: transitive description: - name: vector_math - url: "https://pub.dartlang.org" + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "13.0.0" sdks: - dart: ">=2.13.0 <3.0.0" + dart: ">=3.2.0-0 <4.0.0" flutter: ">=2.2.2" diff --git a/pubspec.yaml b/pubspec.yaml index 86fee22..c0a6577 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: flutter_audio_streaming description: A Flutter plugin for record or streaming audio by RTMP version: 1.0.5 -homepage: https://github.com/lqmminh/flutter_audio_streaming/tree/master +homepage: https://github.com/resideo/flutter_audio_streaming environment: sdk: ">=2.13.0 <3.0.0" @@ -19,7 +19,7 @@ flutter: plugin: platforms: android: - package: com.mminh.flutter_audio_streaming + package: com.resideo.flutter_audio_streaming pluginClass: FlutterAudioStreamingPlugin ios: pluginClass: FlutterAudioStreamingPlugin