Better stop error handling

This commit is contained in:
Pierre Rudloff 2016-06-22 12:56:02 +02:00
parent 22b2c10e0c
commit 6208754e22

View file

@ -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() {