From 4f0153dbcd59b3dec9a7f50addc57de31fabf160 Mon Sep 17 00:00:00 2001 From: Alex Barstow Date: Mon, 15 Aug 2022 16:00:09 -0400 Subject: [PATCH] fix conditional and test --- src/videojs-http-streaming.js | 2 +- test/videojs-http-streaming.test.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/videojs-http-streaming.js b/src/videojs-http-streaming.js index fdcb5c085..49df8d611 100644 --- a/src/videojs-http-streaming.js +++ b/src/videojs-http-streaming.js @@ -1067,7 +1067,7 @@ class VhsHandler extends Component { const masterPlaylist = this.masterPlaylistController_.master(); - if (masterPlaylist && masterPlaylist.playlists) { + if (!masterPlaylist || !masterPlaylist.playlists) { return; } diff --git a/test/videojs-http-streaming.test.js b/test/videojs-http-streaming.test.js index 70a49b653..4e6595e18 100644 --- a/test/videojs-http-streaming.test.js +++ b/test/videojs-http-streaming.test.js @@ -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;