mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 17:19:59 +00:00
Handle missing volume in status messages
This commit is contained in:
@@ -92,13 +92,16 @@ export default class Media {
|
||||
this.currentTime = status.currentTime;
|
||||
_lastCurrentTime.set(this, status._lastCurrentTime);
|
||||
this.customData = status.customData;
|
||||
this.volume = new Volume(
|
||||
status._volumeLevel
|
||||
, status._volumeMuted);
|
||||
this.playbackRate = status.playbackRate;
|
||||
this.playerState = status.playerState;
|
||||
this.repeatMode = status.repeatMode;
|
||||
|
||||
if (status.volume) {
|
||||
this.volume = new Volume(
|
||||
status._volumeLevel
|
||||
, status._volumeMuted);
|
||||
}
|
||||
|
||||
if (status.media) {
|
||||
this.media = status.media;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user