From 319bbd2f8113a775990895fff952a0228fb8f9e1 Mon Sep 17 00:00:00 2001 From: AHOHNMYC <24810600+AHOHNMYC@users.noreply.github.com> Date: Thu, 19 May 2022 07:15:17 +0300 Subject: [PATCH] JS code minor formatting Co-authored-by: Samantaz Fox --- assets/js/player.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index e8c18e21..d09892cb 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -54,8 +54,13 @@ var player = videojs('player', options); player.on('error', function () { if (video_data.params.quality === 'dash') return; - var localNotDisabled = !player.currentSrc().includes('local=true') && !video_data.local_disabled; - var reloadMakesSense = player.error().code === MediaError.MEDIA_ERR_NETWORK || player.error().code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED; + var localNotDisabled = ( + !player.currentSrc().includes('local=true') && !video_data.local_disabled + ); + var reloadMakesSense = ( + player.error().code === MediaError.MEDIA_ERR_NETWORK || + player.error().code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED + ); if (localNotDisabled) { // add local=true to all current sources