bigscreen-player
Advanced tools
Comparing version 3.14.3 to 3.15.0
@@ -14,2 +14,10 @@ 📺 What | ||
✅ Testing [Semi-optional] | ||
[MANDATORY for contributions being tested and released by the contributing team] | ||
| Test engineer sign off | :x: | | ||
| ---- | ---- | | ||
[How will this change be tested?] | ||
👀 See [optional] | ||
@@ -16,0 +24,0 @@ |
{ | ||
"name": "bigscreen-player", | ||
"version": "3.14.3", | ||
"version": "3.15.0", | ||
"description": "Simplified media playback for bigscreen devices.", | ||
@@ -50,3 +50,3 @@ "main": "script/bigscreenplayer.js", | ||
"dependencies": { | ||
"dashjs": "github:bbc/dash.js#smp-v2.9.3-3" | ||
"dashjs": "github:bbc/dash.js#smp-v2.9.3-4" | ||
}, | ||
@@ -53,0 +53,0 @@ "repository": { |
@@ -28,2 +28,8 @@ # Bigscreen Player | ||
```javascript | ||
// configure the media player that will be used before loading | ||
// see below for further details of ths config | ||
// options are: msestrategy, nativestrategy, hybridstrategy, talstrategy (deprecated) | ||
window.bigscreenPlayer.playbackStrategy = 'msestrategy'; | ||
require( | ||
@@ -38,8 +44,2 @@ [ | ||
// configure the media player that will be used before loading | ||
// see below for further details of ths config | ||
// options are: msestrategy, talstrategy, hybridstrategy | ||
window.bigscreenPlayer.playbackStrategy = 'msestrategy'; | ||
var bigscreenPlayer = BigscreenPlayer(); | ||
@@ -99,3 +99,3 @@ | ||
```javascript | ||
window.bigscreenPlayer.playbackStrategy = 'msestrategy' // OR 'talstrategy' OR 'hybridstrategy') | ||
window.bigscreenPlayer.playbackStrategy = 'msestrategy' // OR 'nativestrategy' OR 'hybridstrategy' OR 'talstrategy' (deprecated) | ||
``` | ||
@@ -232,3 +232,3 @@ | ||
1. `npm run pre-release:major|minor|patch` will bump the package.json and internal version. | ||
1. `npm run pre-release:major|minor|patch` will bump the package.json and internal version. | ||
2. Create a Github release. | ||
@@ -243,3 +243,3 @@ 3. Publishing to NPM is handled with our [Travis CI integration](https://github.com/bbc/bigscreen-player/blob/master/.travis.yml). | ||
Whilst it is the intention of the BBC to fully Open Source this project, it is currently work in progress, and as such, there is no contribution model, support model or roadmap. Each of these will be made available in due course. | ||
See [CONTRIBUTING.md](CONTRIBUTING.md) | ||
@@ -246,0 +246,0 @@ ## License |
@@ -7,6 +7,5 @@ require( | ||
'bigscreenplayer/mediasources', | ||
'bigscreenplayer/models/livesupport', | ||
'bigscreenplayer/playbackstrategy/growingwindowrefresher' | ||
'bigscreenplayer/models/livesupport' | ||
], | ||
function (Squire, MediaKinds, WindowTypes, MediaSources, LiveSupport, GrowingWindowRefresher) { | ||
function (Squire, MediaKinds, WindowTypes, MediaSources, LiveSupport) { | ||
var injector = new Squire(); | ||
@@ -32,3 +31,2 @@ var MSEStrategy; | ||
var mockVideoElement = document.createElement('video'); | ||
var mockRefresher; | ||
var testManifestObject; | ||
@@ -67,7 +65,2 @@ var timeUtilsMock; | ||
mockRefresher = { | ||
GrowingWindowRefresher: GrowingWindowRefresher | ||
}; | ||
spyOn(mockRefresher, 'GrowingWindowRefresher').and.callThrough(); | ||
mockVideoElement.addEventListener.and.callFake(function (eventType, handler) { | ||
@@ -795,2 +788,3 @@ eventHandlers[eventType] = handler; | ||
mockVideoElement.currentTime = 50; | ||
mockDashInstance.refreshManifest.calls.reset(); | ||
}); | ||
@@ -801,3 +795,3 @@ | ||
expect(mockRefresher.GrowingWindowRefresher).not.toHaveBeenCalled(); | ||
expect(mockDashInstance.refreshManifest).not.toHaveBeenCalled(); | ||
@@ -808,6 +802,8 @@ expect(mockDashInstance.seek).toHaveBeenCalledWith(40); | ||
it('should call seek on media player with the original user requested seek time when manifest refreshes but doesnt have a duration', function () { | ||
mockDashInstance.refreshManifest.and.callFake(function (callback) { | ||
callback({}); | ||
}); | ||
mseStrategy.setCurrentTime(60); | ||
dashEventCallback(dashjsMediaPlayerEvents.MANIFEST_LOADED, {data: {}}); | ||
expect(mockDashInstance.seek).toHaveBeenCalledWith(60); | ||
@@ -817,6 +813,8 @@ }); | ||
it('should call seek on media player with the time clamped to new end when manifest refreshes and contains a duration', function () { | ||
mockDashInstance.refreshManifest.and.callFake(function (callback) { | ||
callback({mediaPresentationDuration: 80}); | ||
}); | ||
mseStrategy.setCurrentTime(90); | ||
dashEventCallback(dashjsMediaPlayerEvents.MANIFEST_LOADED, {data: {mediaPresentationDuration: 80}}); | ||
expect(mockDashInstance.seek).toHaveBeenCalledWith(78.9); | ||
@@ -823,0 +821,0 @@ }); |
@@ -36,2 +36,4 @@ define('bigscreenplayer/captions', | ||
DebugTool.info('Loading captions from: ' + uri); | ||
function loadData (dataFeedUrl) { | ||
@@ -38,0 +40,0 @@ var req = new XMLHttpRequest(); |
@@ -11,3 +11,2 @@ define('bigscreenplayer/playbackstrategy/msestrategy', | ||
'bigscreenplayer/dynamicwindowutils', | ||
'bigscreenplayer/playbackstrategy/growingwindowrefresher', | ||
'bigscreenplayer/utils/timeutils', | ||
@@ -18,3 +17,3 @@ | ||
], | ||
function (MediaState, WindowTypes, DebugTool, MediaKinds, Plugins, ManifestModifier, LiveSupport, DynamicWindowUtils, GrowingWindowRefresher, TimeUtils) { | ||
function (MediaState, WindowTypes, DebugTool, MediaKinds, Plugins, ManifestModifier, LiveSupport, DynamicWindowUtils, TimeUtils) { | ||
var MSEStrategy = function (mediaSources, windowType, mediaKind, playbackElement, isUHD, device) { | ||
@@ -425,3 +424,5 @@ var LIVE_DELAY_SECONDS = 1.1; | ||
refreshFailoverTime = seekToTime; | ||
GrowingWindowRefresher(mediaPlayer, function (mediaPresentationDuration) { | ||
mediaPlayer.refreshManifest(function (manifest) { | ||
var mediaPresentationDuration = manifest && manifest.mediaPresentationDuration; | ||
if (!isNaN(mediaPresentationDuration)) { | ||
@@ -428,0 +429,0 @@ DebugTool.info('Stream ended. Clamping seek point to end of stream'); |
define('bigscreenplayer/version', | ||
function () { | ||
return '3.14.3'; | ||
return '3.15.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
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
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
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
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
29
7853642
107
76296