Skip to content

Commit

Permalink
Add a little protection from js errors if a media update event is sen…
Browse files Browse the repository at this point in the history
…t before the client has received the session. (Can happen on occaision when resuming a session on page reload or app restart).
Lindsay-Needs-Sleep committed Jan 21, 2020
1 parent e343fee commit d7371ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions www/chrome.cast.js
Original file line number Diff line number Diff line change
@@ -1414,6 +1414,9 @@ execute('setup', function (err, args) {
}
},
MEDIA_UPDATE: function (media) {
if (!_session) {
return;
}
_session._updateMedia(media);
_session._emitMediaUpdated(media ? !!media.isAlive : false);
},

0 comments on commit d7371ff

Please sign in to comment.