mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-26 19:29:04 +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;
|
_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.");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue