bigscreen-player
Advanced tools
Comparing version 2.3.0 to 2.4.0
{ | ||
"name": "bigscreen-player", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Simplified media playback for bigscreen devices.", | ||
@@ -5,0 +5,0 @@ "main": "script/bigscreenplayer.js", |
@@ -49,6 +49,17 @@ require( | ||
var testManifestObject; | ||
beforeEach(function (done) { | ||
cdnArray = []; | ||
cdnArray.push({url: 'testcdn1/test/', cdn: 'cdn1'}); | ||
cdnArray.push({url: 'http://testcdn1/test/', cdn: 'cdn1'}); | ||
testManifestObject = { | ||
type: 'manifestLoaded', | ||
data: { | ||
Period: { | ||
BaseURL: 'dash/' | ||
} | ||
} | ||
}; | ||
injector.mock({ | ||
@@ -196,10 +207,5 @@ 'dashjs': mockDashjs, | ||
setUpMSE(); | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
mseStrategy.load(cdnArray, null, 0); | ||
var testManifestObject = { | ||
type: 'manifestLoaded', | ||
data: {} | ||
}; | ||
dashEventCallback(dashjsMediaPlayerEvents.MANIFEST_LOADED, testManifestObject); | ||
@@ -335,3 +341,3 @@ | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
@@ -355,4 +361,4 @@ mockDashInstance.getSource.and.returnValue('src'); | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'testcdn3/test/', cdn: 'cdn3'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn3/test/', cdn: 'cdn3'}); | ||
@@ -382,3 +388,3 @@ mockDashInstance.getSource.and.returnValue('src'); | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
@@ -415,5 +421,5 @@ mockDashInstance.getSource.and.returnValue('src'); | ||
setUpMSE(); | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
mseStrategy.load(cdnArray, WindowTypes.STATIC, 3); | ||
dashEventCallback(dashjsMediaPlayerEvents.MANIFEST_LOADED, testManifestObject); | ||
@@ -802,4 +808,5 @@ eventHandlers.baseUrlSelected({ | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
mseStrategy.load(cdnArray, null, 0); | ||
dashEventCallback(dashjsMediaPlayerEvents.MANIFEST_LOADED, testManifestObject); | ||
@@ -824,3 +831,3 @@ dashEventCallback(dashjsMediaPlayerEvents.CDN_FAILOVER, mockEvent); | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
mseStrategy.load(cdnArray, null, 0); | ||
@@ -846,3 +853,3 @@ | ||
cdnArray.push({url: 'testcdn2/test/', cdn: 'cdn2'}); | ||
cdnArray.push({url: 'http://testcdn2/test/', cdn: 'cdn2'}); | ||
mseStrategy.load(cdnArray, null, 0); | ||
@@ -849,0 +856,0 @@ |
@@ -14,5 +14,5 @@ define('bigscreenplayer/bigscreenplayer', | ||
'bigscreenplayer/utils/timeutils', | ||
'bigscreenplayer/utils/manifestutils' | ||
'bigscreenplayer/utils/livesupportutils' | ||
], | ||
function (MediaState, PlayerComponent, PauseTriggers, DynamicWindowUtils, WindowTypes, MockBigscreenPlayer, Plugins, Chronicle, DebugTool, ManifestLoader, SlidingWindowUtils, ManifestUtils) { | ||
function (MediaState, PlayerComponent, PauseTriggers, DynamicWindowUtils, WindowTypes, MockBigscreenPlayer, Plugins, Chronicle, DebugTool, ManifestLoader, SlidingWindowUtils, LiveSupportUtils) { | ||
'use strict'; | ||
@@ -137,3 +137,3 @@ function BigscreenPlayer () { | ||
if (ManifestUtils.needToGetManifest(windowType, getLiveSupport(device)) && !bigscreenPlayerData.time) { | ||
if (LiveSupportUtils.needToGetManifest(windowType, getLiveSupport(device)) && !bigscreenPlayerData.time) { | ||
ManifestLoader.load( | ||
@@ -140,0 +140,0 @@ bigscreenPlayerData.media.urls, |
@@ -10,3 +10,3 @@ define('bigscreenplayer/playbackstrategy/msestrategy', | ||
'bigscreenplayer/pluginenums', | ||
'bigscreenplayer/manifest/manifestfilter', | ||
'bigscreenplayer/manifest/manifestmodifier', | ||
'bigscreenplayer/utils/playbackutils', | ||
@@ -18,3 +18,3 @@ 'bigscreenplayer/models/livesupport', | ||
], | ||
function (MediaState, WindowTypes, DebugTool, MediaKinds, Plugins, PluginData, PluginEnums, ManifestFilter, PlaybackUtils, LiveSupport) { | ||
function (MediaState, WindowTypes, DebugTool, MediaKinds, Plugins, PluginData, PluginEnums, ManifestModifier, PlaybackUtils, LiveSupport) { | ||
var MSEStrategy = function (windowType, mediaKind, timeData, playbackElement, isUHD, device, cdnDebugOutput) { | ||
@@ -127,7 +127,4 @@ var mediaPlayer; | ||
var manifest = event.data; | ||
ManifestFilter.filter(manifest, window.bigscreenPlayer.representationOptions || {}); | ||
manifest.BaseURL_asArray = generateBaseUrls(mediaSources); | ||
if (manifest && manifest.Period && manifest.Period.BaseURL) delete manifest.Period.BaseURL; | ||
if (manifest && manifest.Period && manifest.Period.BaseURL_asArray) delete manifest.Period.BaseURL_asArray; | ||
ManifestModifier.filter(manifest, window.bigscreenPlayer.representationOptions || {}); | ||
ManifestModifier.generateBaseUrls(manifest, mediaSources); | ||
} | ||
@@ -168,3 +165,3 @@ } | ||
// Initial playback | ||
if (cdn === mediaSources[0].cdn) return; | ||
if (mediaSources.length <= 1 || cdn !== mediaSources[1].cdn) return; | ||
@@ -241,15 +238,2 @@ var errorProperties = PlaybackUtils.merge(createPlaybackProperties(), event.errorProperties); | ||
function generateBaseUrls (sources) { | ||
var regexp = /.*\//; | ||
return sources.map(function (source, priority) { | ||
var sourceUrl = regexp.exec(source.url)[0]; | ||
return { | ||
__text: sourceUrl + 'dash/', | ||
'dvb:priority': priority, | ||
serviceLocation: source.cdn | ||
}; | ||
}); | ||
} | ||
function setUpMediaElement (playbackElement) { | ||
@@ -256,0 +240,0 @@ if (mediaKind === MediaKinds.AUDIO) { |
@@ -14,7 +14,7 @@ define( | ||
'bigscreenplayer/manifest/manifestloader', | ||
'bigscreenplayer/utils/manifestutils', | ||
'bigscreenplayer/utils/livesupportutils', | ||
'bigscreenplayer/mediaresilience', | ||
'bigscreenplayer/debugger/cdndebugoutput' | ||
], | ||
function (MediaState, CaptionsContainer, PlaybackStrategy, WindowTypes, PlaybackUtils, PluginData, PluginEnums, Plugins, DebugTool, TransferFormats, ManifestLoader, ManifestUtils, MediaResilience, CdnDebugOutput) { | ||
function (MediaState, CaptionsContainer, PlaybackStrategy, WindowTypes, PlaybackUtils, PluginData, PluginEnums, Plugins, DebugTool, TransferFormats, ManifestLoader, LiveSupportUtils, MediaResilience, CdnDebugOutput) { | ||
'use strict'; | ||
@@ -237,3 +237,3 @@ | ||
var failoverTime = getCurrentTime(); | ||
if (transferFormat === TransferFormats.HLS && ManifestUtils.needToGetManifest(windowType, getLiveSupport(device))) { | ||
if (transferFormat === TransferFormats.HLS && LiveSupportUtils.needToGetManifest(windowType, getLiveSupport(device))) { | ||
manifestReloadFailover(failoverTime, thenPause, errorProperties, bufferingTimeoutError); | ||
@@ -240,0 +240,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7555067
95
72023