Skip to content

Commit d009fc7

Browse files
author
Tom Jenkinson
committed
remove 'geo_blocked' and 'no_connection' errors
they no longer exist in the playback library, plus they would never be triggered before anyway. If a track is geoblocked the `SC.stream()` promise rejects, because the api returns a 403 at that point. We also always retry to retrieve urls on a connection timeout, whilst the player is not killed, so the 'no_connection' error would never be triggered
1 parent 21878c4 commit d009fc7

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/player-api.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const BackboneEvents = require('backbone-events-standalone');
22
const { errors: { PlayerFatalError }, State } = require('../vendor/playback/playback').MaestroCore;
3-
const { errors: { GeoBlockedError, NoStreamsError, TimedOutError, NotSupportedError } } = require('../vendor/playback/playback').SCAudio;
3+
const { errors: { NoStreamsError, NotSupportedError } } = require('../vendor/playback/playback').SCAudio;
44

55
const TIMEUPDATE_INTERVAL = 1000 / 60;
66

@@ -57,12 +57,8 @@ module.exports = function(scaudioPlayer) {
5757
scaudioPlayer.onLoadEnd.subscribe(() => playerApi.trigger('buffering_end'));
5858
scaudioPlayer.onEnded.subscribe(() => playerApi.trigger('finish'));
5959
scaudioPlayer.onError.subscribe((error) => {
60-
if (error instanceof GeoBlockedError) {
61-
playerApi.trigger('geo_blocked');
62-
} else if (error instanceof NoStreamsError) {
60+
if (error instanceof NoStreamsError) {
6361
playerApi.trigger('no_streams');
64-
} else if (error instanceof TimedOutError) {
65-
playerApi.trigger('no_connection');
6662
} else if (error instanceof NotSupportedError) {
6763
playerApi.trigger('no_protocol');
6864
} else if (error instanceof PlayerFatalError) {

0 commit comments

Comments
 (0)