bigscreen-player
Advanced tools
Comparing version 3.17.0 to 3.18.0
{ | ||
"name": "bigscreen-player", | ||
"version": "3.17.0", | ||
"version": "3.18.0", | ||
"description": "Simplified media playback for bigscreen devices.", | ||
@@ -5,0 +5,0 @@ "main": "script/bigscreenplayer.js", |
@@ -52,3 +52,3 @@ require( | ||
'reset', 'isPaused', 'pause', 'play', 'seek', 'isReady', 'refreshManifest', 'getDashMetrics', 'getDashAdapter', | ||
'getBitrateInfoListFor', 'getAverageThroughput', 'getDVRWindowSize', 'updateSettings']); | ||
'getBitrateInfoListFor', 'getAverageThroughput', 'getDVRWindowSize', 'updateSettings', 'setDuration']); | ||
mockPluginsInterface = jasmine.createSpyObj('interface', ['onErrorCleared', 'onBuffering', 'onBufferingCleared', 'onError', 'onFatalError', 'onErrorHandled', 'onPlayerInfoUpdated']); | ||
@@ -819,2 +819,84 @@ mockPlugins = { | ||
describe('mseDurationOverride', function () { | ||
beforeEach(function () { | ||
// due to interaction with emitPlayerInfo() | ||
mockDashInstance.getBitrateInfoListFor.and.returnValue([{ bitrate: 1024000 }, { bitrate: 200000 }, { bitrate: 3000000 }]); | ||
window.bigscreenPlayer.mseDurationOverride = undefined; | ||
}); | ||
afterEach(function () { | ||
mockDashInstance.setDuration.calls.reset(); | ||
}); | ||
describe('overrides dynamic stream duration', function () { | ||
it('when mseDurationOverride configration property is true and window type is sliding', function () { | ||
window.bigscreenPlayer.mseDurationOverride = true; | ||
setUpMSE(0, WindowTypes.SLIDING); | ||
mseStrategy.load(null, 0); | ||
eventHandlers.streamInitialized(); | ||
expect(mockDashInstance.setDuration).toHaveBeenCalledWith(Number.MAX_SAFE_INTEGER); | ||
}); | ||
it('when mseDurationOverride configration property is true and window type is growing', function () { | ||
window.bigscreenPlayer.mseDurationOverride = true; | ||
setUpMSE(0, WindowTypes.GROWING); | ||
mseStrategy.load(null, 0); | ||
eventHandlers.streamInitialized(); | ||
expect(mockDashInstance.setDuration).toHaveBeenCalledWith(Number.MAX_SAFE_INTEGER); | ||
}); | ||
}); | ||
describe('does not override stream duration', function () { | ||
it('when mseDurationOverride configration property is true and window type is static', function () { | ||
window.bigscreenPlayer.mseDurationOverride = true; | ||
setUpMSE(0, WindowTypes.STATIC); | ||
mseStrategy.load(null, 0); | ||
eventHandlers.streamInitialized(); | ||
expect(mockDashInstance.setDuration).not.toHaveBeenCalledWith(Number.MAX_SAFE_INTEGER); | ||
}); | ||
it('when mseDurationOverride configration property is false and window type is static', function () { | ||
window.bigscreenPlayer.mseDurationOverride = undefined; | ||
setUpMSE(0, WindowTypes.STATIC); | ||
mseStrategy.load(null, 0); | ||
eventHandlers.streamInitialized(); | ||
expect(mockDashInstance.setDuration).not.toHaveBeenCalledWith(Number.MAX_SAFE_INTEGER); | ||
}); | ||
it('when mseDurationOverride configration property is false and window type is sliding', function () { | ||
window.bigscreenPlayer.mseDurationOverride = undefined; | ||
setUpMSE(0, WindowTypes.SLIDING); | ||
mseStrategy.load(null, 0); | ||
eventHandlers.streamInitialized(); | ||
expect(mockDashInstance.setDuration).not.toHaveBeenCalledWith(Number.MAX_SAFE_INTEGER); | ||
}); | ||
it('when mseDurationOverride configration property is false and window type is growing', function () { | ||
window.bigscreenPlayer.mseDurationOverride = undefined; | ||
setUpMSE(0, WindowTypes.GROWING); | ||
mseStrategy.load(null, 0); | ||
eventHandlers.streamInitialized(); | ||
expect(mockDashInstance.setDuration).not.toHaveBeenCalledWith(Number.MAX_SAFE_INTEGER); | ||
}); | ||
}); | ||
}); | ||
describe('onMetricAdded and onQualityChangeRendered', function () { | ||
@@ -821,0 +903,0 @@ var mockEvent = { |
@@ -172,2 +172,6 @@ define('bigscreenplayer/playbackstrategy/msestrategy', | ||
function onStreamInitialised () { | ||
if (window.bigscreenPlayer.mseDurationOverride && (windowType === WindowTypes.SLIDING || windowType === WindowTypes.GROWING)) { | ||
// Workaround for no setLiveSeekableRange/clearLiveSeekableRange | ||
mediaPlayer.setDuration(Number.MAX_SAFE_INTEGER); | ||
} | ||
emitPlayerInfo(); | ||
@@ -174,0 +178,0 @@ } |
define('bigscreenplayer/version', | ||
function () { | ||
return '3.17.0'; | ||
return '3.18.0'; | ||
} | ||
); |
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
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
649953
14236