Better stop error handling
This commit is contained in:
parent
22b2c10e0c
commit
6208754e22
1 changed files with 6 additions and 1 deletions
|
@ -20,6 +20,11 @@ var castModule = (function () {
|
|||
launchBtn.classList.remove('cast_hidden');
|
||||
}
|
||||
|
||||
function onStopCastError(e) {
|
||||
onStopCast();
|
||||
throw e.description;
|
||||
}
|
||||
|
||||
function updateListener() {
|
||||
if (session.status !== chrome.cast.SessionStatus.CONNECTED) {
|
||||
onStopCast();
|
||||
|
@ -36,7 +41,7 @@ var castModule = (function () {
|
|||
}
|
||||
|
||||
function stopCast() {
|
||||
session.stop(onStopCast);
|
||||
session.stop(onStopCast, onStopCastError);
|
||||
}
|
||||
|
||||
function onMediaError() {
|
||||
|
|
Loading…
Reference in a new issue