Skip to content

Commit

Permalink
Fix JavaScript exception when canPlayItem receives a bad input
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Sep 9, 2020
1 parent 438072d commit 9a6c46e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/assets/native/externalplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define(['events', 'playbackManager', 'toast'], function (events, playbackManager
};

self.canPlayItem = function (item, playOptions) {
var mediaSource = item.MediaSources[0] || false;
var mediaSource = item.MediaSources && item.MediaSources[0];
return window.ExternalPlayer.isEnabled() && mediaSource && mediaSource.SupportsDirectStream;
};

Expand Down

0 comments on commit 9a6c46e

Please sign in to comment.