Skip to content

Commit 2a312ea

Browse files
committed
Clean up if an animation frame transition error occurs + increase waiting time until throwing an animation frame transition timeout
1 parent 2453ccc commit 2a312ea

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

controller/js/app.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,18 @@ var APP = {
208208
// Re-connect controls
209209
controls.connect();
210210
}, 1000 );
211+
} ).catch( function() {
212+
// Clean-up on error
213+
sendMessage(
214+
window.parent, {
215+
'action': 'playbackEnded'
216+
}
217+
);
218+
219+
_this.setManualOrientation( _a0, _b0, _g0 );
220+
221+
// Re-connect controls
222+
controls.connect();
211223
} );
212224

213225
};
@@ -285,7 +297,7 @@ var APP = {
285297
var throwError = window.setTimeout( function() {
286298
tweenInProgress = false;
287299
reject();
288-
}, waitTime + 2000 );
300+
}, waitTime + 5000 );
289301

290302
var o = {
291303
t: 0

0 commit comments

Comments
 (0)