mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
casting: stop video playback before disconnecting from device
This commit is contained in:
@@ -90,6 +90,7 @@ class ConnectedCastingDialog(context: Context?) : AlertDialog(context) {
|
|||||||
_buttonClose.setOnClickListener { dismiss(); };
|
_buttonClose.setOnClickListener { dismiss(); };
|
||||||
_buttonDisconnect.setOnClickListener {
|
_buttonDisconnect.setOnClickListener {
|
||||||
try {
|
try {
|
||||||
|
StateCasting.instance.stopVideo()
|
||||||
StateCasting.instance.activeDevice?.disconnect()
|
StateCasting.instance.activeDevice?.disconnect()
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
Logger.e(TAG, "Active device failed to disconnect: $e")
|
Logger.e(TAG, "Active device failed to disconnect: $e")
|
||||||
|
|||||||
Reference in New Issue
Block a user