Skip to content

Commit

Permalink
fix conditional and test
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-barstow committed Aug 15, 2022
1 parent 7174b72 commit 4f0153d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/videojs-http-streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ class VhsHandler extends Component {

const masterPlaylist = this.masterPlaylistController_.master();

if (masterPlaylist && masterPlaylist.playlists) {
if (!masterPlaylist || !masterPlaylist.playlists) {
return;
}

Expand Down
5 changes: 3 additions & 2 deletions test/videojs-http-streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4696,8 +4696,9 @@ QUnit.test('eme handles keystatuschange where status is output-restricted', func
assert.equal(
warning,
'DRM keystatus changed to "output-restricted." Removing the following HD playlists ' +
'that will most likely fail to play and clearing already buffered HD segments. ' +
'Check for HDCP content.' + [playlists[0], playlists[1]].join('')
'that will most likely fail to play and clearing the buffer. ' +
'This may be due to HDCP restrictions on the stream and the capabilities of the current device.' +
[playlists[0], playlists[1]].join('')
);

videojs.log.warn = originalWarn;
Expand Down

0 comments on commit 4f0153d

Please sign in to comment.