Skip to content

Commit

Permalink
Feature/service description (#3831)
Browse files Browse the repository at this point in the history
* Wip: ServiceDescription cleanup

* Wip: Move catchup to CatchupController.js

* Move catchup logic to separate CatchupController.js

* Add ServiceDescriptionController and corresponding unit tests

* Add unit test to streaming.controllers.ServiceDescriptionController.js

* Only apply ServiceDescription settings if no value specified via Settings.js

* Fix unit tests

* Fix linting error in ServiceDescriptionController.js

* Fix typo in JSDoc

* Remove minDrift and latencyThreshold parameter for low latency streaming

* Fix unit tests

* WiP: Remove lowLatencyEnabled from Settings.js

* Calculate the live delay only in PlaybackController.js and remove from MediaPlayerModel.js. Once settings are updated trigger recalculation in PlaybackController.js

* Use live delay from PlaybackController.js in MediaPlayerModel.js

* Wip turn catchup on/off automatically

* Deactivate catchup when user seeks

* Fix unit tests

* Fix linting errors

* Remove outdated low latency samples

* Add a keymap to dispatch specific events once a setting is updated

* Remove lowLatencyEnabled and lowLatencyEnabledByManifest

* Cap the live delay to the DVR window size

* Add playbackrate to reference UI

* Move custom ABR rules to MediaPlayer.js similar to custom capabilities

* Move all custom filters to CustomParametersModel.js. Prepare MediaPlayerModel.js to be used as a logical proxy between Settings.js and other classes

* Fix linting issues

* Use MediaPlayerModel.js as a proxy to Settings.js for everything that requires additional logic. Do not overwrite settings coming from ServiceDescription elements.

* Remove unused function

* Do not update catchupModeEnabled setting in PlaybackController.js.

* Increase version number

* Change log level

* Remove unused attribute from low latency demo page

* Remove falsely added controlbar

* Remove reference to lowLatencyEnabled in InsufficientBufferRule.js

* Add missing customParametersModel for ProtectionController

* Fix linting error

* Fix unit tests
  • Loading branch information
dsilhavy authored Apr 6, 2022
1 parent 095ad26 commit 2c87ac4
Show file tree
Hide file tree
Showing 62 changed files with 2,907 additions and 2,651 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/simple.html
samples/mpds
#################
## Node.js
#################
Expand Down
12 changes: 7 additions & 5 deletions contrib/akamai/controlbar/ControlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

/**
/**
* @module ControlBar
* @param {object=} dashjsMediaPlayer - dashjs reference
* @param {boolean=} displayUTCTimeCodes - true if time is displayed in UTC format, false otherwise
Expand All @@ -51,7 +51,7 @@ var ControlBar = function (dashjsMediaPlayer, displayUTCTimeCodes) {
var lastVolumeLevel = NaN;
var seeking = false;
var videoControllerVisibleTimeout = 0;
var liveThresholdSecs = 12;
var liveThresholdSecs = 1;
var textTrackList = {};
var forceQuality = false;
var video,
Expand Down Expand Up @@ -384,7 +384,9 @@ var ControlBar = function (dashjsMediaPlayer, displayUTCTimeCodes) {
}
if (self.player.isDynamic() && self.player.duration()) {
var liveDelay = self.player.duration() - value;
if (liveDelay < liveThresholdSecs) {
var targetLiveDelay = self.player.getTargetLiveDelay();

if (liveDelay < targetLiveDelay + liveThresholdSecs) {
durationDisplay.classList.add('live');
} else {
durationDisplay.classList.remove('live');
Expand Down Expand Up @@ -428,7 +430,7 @@ var ControlBar = function (dashjsMediaPlayer, displayUTCTimeCodes) {

var enterFullscreen = function () {
var element = videoContainer || video;
if(!document.fullscreenElement){
if (!document.fullscreenElement) {
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.msRequestFullscreen) {
Expand Down Expand Up @@ -464,7 +466,7 @@ var ControlBar = function (dashjsMediaPlayer, displayUTCTimeCodes) {
if (document.fullscreenElement) {

if (document.exitFullscreen) {
document.exitFullscreen();
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.msExitFullscreen) {
Expand Down
7 changes: 2 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ declare namespace dashjs {
streaming?: {
abandonLoadTimeout?: number,
wallclockTimeUpdateInterval?: number,
lowLatencyEnabled?: boolean,
lowLatencyEnabledByManifest?: boolean,
manifestUpdateRetryInterval?: number,
applyServiceDescription?: boolean,
cacheInitSegments?: boolean,
eventControllerRefreshDelay?: number,
capabilities?: {
Expand All @@ -170,8 +169,7 @@ declare namespace dashjs {
delay?: {
liveDelayFragmentCount?: number,
liveDelay?: number,
useSuggestedPresentationDelay?: boolean,
applyServiceDescription?: boolean
useSuggestedPresentationDelay?: boolean
},
protection?: {
keepProtectionMediaKeys?: boolean,
Expand Down Expand Up @@ -224,7 +222,6 @@ declare namespace dashjs {
defaultEnabled?: boolean
},
liveCatchup?: {
minDrift?: number;
maxDrift?: number;
playbackRate?: number;
latencyThreshold?: number,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashjs",
"version": "4.3.1",
"version": "4.4.0",
"description": "A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.",
"author": "Dash Industry Forum",
"license": "BSD-3-Clause",
Expand Down
Loading

0 comments on commit 2c87ac4

Please sign in to comment.