mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-26 11:19:05 +00:00
Do not call playVideo on reconnects, but instead check MEDIA_STATUS.
This commit is contained in:
parent
769ec9f59a
commit
3d7b347e49
1 changed files with 6 additions and 1 deletions
|
@ -561,7 +561,6 @@ class ChromecastCastingDevice : CastingDevice {
|
|||
_transportId = transportId;
|
||||
|
||||
requestMediaStatus();
|
||||
playVideo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -641,6 +640,12 @@ class ChromecastCastingDevice : CastingDevice {
|
|||
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") {
|
||||
if (message.sourceId == "receiver-0") {
|
||||
Logger.i(TAG, "Close received.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue