From 9d8dd67a3eec739ab9c2d78518f70fa16f71855e Mon Sep 17 00:00:00 2001 From: dtyszka Date: Mon, 19 Jun 2017 14:03:00 +0200 Subject: [PATCH 1/2] Change HLS VOD player plugin Switch HLS VOD to use StreamingPlayer plugin instead on Player plugin --- .../tests/devices/mediaplayer/samsung_streaming.js | 4 ++-- static/script/devices/mediaplayer/samsung_streaming.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/static/script-tests/tests/devices/mediaplayer/samsung_streaming.js b/static/script-tests/tests/devices/mediaplayer/samsung_streaming.js index ab08f0d5..269196fa 100644 --- a/static/script-tests/tests/devices/mediaplayer/samsung_streaming.js +++ b/static/script-tests/tests/devices/mediaplayer/samsung_streaming.js @@ -265,7 +265,7 @@ assert(playerPlugin.Open.notCalled); assert(playerPlugin._methods.InitPlayer.notCalled); this._mediaPlayer.setSource(MediaPlayer.TYPE.VIDEO, 'testURL', 'application/vnd.apple.mpegurl'); - assert(playerPlugin.Open.calledWith('Player', '1.010', 'Player')); + assert(playerPlugin.Open.calledWith('StreamingPlayer', '1.0', 'StreamingPlayer')); assert(playerPlugin.Open.calledOnce); assert(playerPlugin._methods.InitPlayer.calledWith('testURL|COMPONENT=HLS')); assert(playerPlugin._methods.InitPlayer.calledOnce); @@ -282,7 +282,7 @@ assert(playerPlugin.Open.notCalled); assert(playerPlugin._methods.InitPlayer.notCalled); this._mediaPlayer.setSource(MediaPlayer.TYPE.VIDEO, 'testURL', 'application/vnd.apple.mpegurl'); - assert(playerPlugin.Open.calledWith('Player', '1.010', 'Player')); + assert(playerPlugin.Open.calledWith('StreamingPlayer', '1.0', 'StreamingPlayer')); assert(playerPlugin.Open.calledOnce); assert(playerPlugin._methods.InitPlayer.calledWith('testURL|COMPONENT=HLS')); assert(playerPlugin._methods.InitPlayer.calledOnce); diff --git a/static/script/devices/mediaplayer/samsung_streaming.js b/static/script/devices/mediaplayer/samsung_streaming.js index 4d4b15cc..b5a43a5f 100644 --- a/static/script/devices/mediaplayer/samsung_streaming.js +++ b/static/script/devices/mediaplayer/samsung_streaming.js @@ -82,12 +82,13 @@ require.def( this._toStopped(); if (this._isHlsMimeType()) { + this._openStreamingPlayerPlugin(); if (this._isLiveMedia()) { this._source += '|HLSSLIDING|COMPONENT=HLS'; - this._openStreamingPlayerPlugin(); + //this._openStreamingPlayerPlugin(); } else { this._source += '|COMPONENT=HLS'; - this._openPlayerPlugin(); + //this._openPlayerPlugin(); } } else { this._openPlayerPlugin(); From 4cf9aac1c83c548a0383ce457e554d1169b7eedf Mon Sep 17 00:00:00 2001 From: dtyszka Date: Mon, 19 Jun 2017 14:06:23 +0200 Subject: [PATCH 2/2] clean code after player switch clean code after player switch --- static/script/devices/mediaplayer/samsung_streaming.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/static/script/devices/mediaplayer/samsung_streaming.js b/static/script/devices/mediaplayer/samsung_streaming.js index b5a43a5f..2cdf109f 100644 --- a/static/script/devices/mediaplayer/samsung_streaming.js +++ b/static/script/devices/mediaplayer/samsung_streaming.js @@ -85,10 +85,8 @@ require.def( this._openStreamingPlayerPlugin(); if (this._isLiveMedia()) { this._source += '|HLSSLIDING|COMPONENT=HLS'; - //this._openStreamingPlayerPlugin(); } else { this._source += '|COMPONENT=HLS'; - //this._openPlayerPlugin(); } } else { this._openPlayerPlugin();