Merge branch 'marcus/casting-stop-playback-before-disconnect' into 'master'

Casting: stop video playback before disconnecting from the active device

See merge request videostreaming/grayjay!152
This commit is contained in:
Koen
2025-11-12 12:41:10 +00:00
@@ -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")