mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Do not call playVideo on reconnects, but instead check MEDIA_STATUS.
This commit is contained in:
@@ -561,7 +561,6 @@ class ChromecastCastingDevice : CastingDevice {
|
|||||||
_transportId = transportId;
|
_transportId = transportId;
|
||||||
|
|
||||||
requestMediaStatus();
|
requestMediaStatus();
|
||||||
playVideo();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -641,6 +640,12 @@ class ChromecastCastingDevice : CastingDevice {
|
|||||||
stopVideo();
|
stopVideo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val needsLoad = statuses.length() == 0 || (statuses.getJSONObject(0).getString("playerState") == "IDLE")
|
||||||
|
if (needsLoad && _contentId != null && _mediaSessionId == null) {
|
||||||
|
Logger.i(TAG, "Receiver idle, sending initial LOAD")
|
||||||
|
playVideo()
|
||||||
|
}
|
||||||
} else if (type == "CLOSE") {
|
} else if (type == "CLOSE") {
|
||||||
if (message.sourceId == "receiver-0") {
|
if (message.sourceId == "receiver-0") {
|
||||||
Logger.i(TAG, "Close received.");
|
Logger.i(TAG, "Close received.");
|
||||||
|
|||||||
Reference in New Issue
Block a user