bigscreen-player
Advanced tools
Comparing version 1.4.0 to 1.5.0
{ | ||
"name": "bigscreen-player", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Simplified media playback for bigscreen devices.", | ||
@@ -5,0 +5,0 @@ "main": "script/bigscreenplayer.js", |
@@ -964,3 +964,3 @@ require( | ||
it('should publish a media state update of fatal if playback is live hls simulcast', function () { | ||
it('should publish a media state update of fatal when playing a hls simulcast', function () { | ||
spyOn(mockStrategy, 'getDuration').and.returnValue(100); | ||
@@ -981,3 +981,3 @@ spyOn(mockStrategy, 'getCurrentTime').and.returnValue(94); | ||
it('should publish a media state update of fatal if playback is live hls webcast with playable', function () { | ||
it('should publish a media state update of fatal when playing a hls webcast on a restartable device', function () { | ||
spyOn(mockStrategy, 'getDuration').and.returnValue(100); | ||
@@ -987,3 +987,3 @@ spyOn(mockStrategy, 'getCurrentTime').and.returnValue(94); | ||
setUpPlayerComponent({multiCdn: true, manifestType: 'm3u8', windowType: WindowTypes.GROWING, liveSupport: LiveSupport.PLAYABLE}); | ||
setUpPlayerComponent({multiCdn: true, manifestType: 'm3u8', windowType: WindowTypes.GROWING, liveSupport: LiveSupport.RESTARTABLE}); | ||
@@ -999,3 +999,3 @@ mockStrategy.mockingHooks.fireErrorEvent({errorProperties: {}}); | ||
it('should cdn failover on hls webcast with seekable', function () { | ||
it('should failover on a seekable device when playing hls webcasts', function () { | ||
var secondCdn = 'b'; | ||
@@ -1008,3 +1008,3 @@ var currentTime = 10; | ||
setUpPlayerComponent({multiCdn: true, manifestType: 'm3u8', windowType: WindowTypes.GROWING, liveSupport: 'seekable', type: type}); | ||
setUpPlayerComponent({multiCdn: true, manifestType: 'm3u8', windowType: WindowTypes.GROWING, liveSupport: LiveSupport.SEEKABLE, type: type}); | ||
@@ -1033,2 +1033,34 @@ // Set playback cause to normal | ||
it('should failover on a playable device when playing hls webcasts', function () { | ||
var secondCdn = 'b'; | ||
var currentTime = 10; | ||
var type = 'application/vnd.apple.mpegurl'; | ||
spyOn(mockStrategy, 'load'); | ||
spyOn(mockStrategy, 'getCurrentTime').and.returnValue(currentTime); | ||
setUpPlayerComponent({multiCdn: true, manifestType: 'm3u8', windowType: WindowTypes.GROWING, liveSupport: LiveSupport.PLAYABLE, type: type}); | ||
// Set playback cause to normal | ||
mockStrategy.mockingHooks.fireEvent(MediaState.PLAYING); | ||
mockStrategy.mockingHooks.fireEvent(MediaState.WAITING); | ||
jasmine.clock().tick(19999); | ||
expect(mockStrategy.load).toHaveBeenCalledTimes(1); | ||
expect(corePlaybackData.media.urls.length).toBe(3); | ||
expect(corePlaybackData.media.urls).toContain(jasmine.objectContaining({cdn: 'cdn-a'})); | ||
jasmine.clock().tick(1); | ||
expect(mockStrategy.load).toHaveBeenCalledTimes(2); | ||
expect(mockStrategy.load).toHaveBeenCalledWith(secondCdn, type, currentTime); | ||
expect(corePlaybackData.media.urls.length).toBe(2); | ||
expect(corePlaybackData.media.urls).not.toContain(jasmine.objectContaining({cdn: 'cdn-a'})); | ||
}); | ||
it('should failover after buffering for 20 seconds on live dash playback', function () { | ||
@@ -1035,0 +1067,0 @@ var secondCdn = 'b'; |
@@ -219,3 +219,3 @@ define( | ||
var canVodFailover = windowType === WindowTypes.STATIC && !aboutToEndVod; | ||
var canHlsLiveFailover = windowType === WindowTypes.GROWING && liveSupport === LiveSupport.SEEKABLE; | ||
var canHlsLiveFailover = windowType === WindowTypes.GROWING && (liveSupport === LiveSupport.SEEKABLE || liveSupport === LiveSupport.PLAYABLE) && transferFormat === 'hls'; | ||
var canDashLiveFailover = windowType !== WindowTypes.STATIC && transferFormat === 'dash'; | ||
@@ -222,0 +222,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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
7238278
64906
2