Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development'
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Jun 21, 2023
2 parents 9e497c4 + 8cceecf commit 8cad591
Show file tree
Hide file tree
Showing 21 changed files with 382 additions and 180 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Expand Up @@ -4066,7 +4066,7 @@ declare namespace dashjs {
serviceLocation: string;
startTime: number;
timescale: number;
type: 'InitializationSegment' | 'MediaSegment';
type: 'InitializationSegment' | 'MediaSegment' | null;
url: string;
wallStartTime: number | null;
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "dashjs",
"version": "4.7.0",
"version": "4.7.1",
"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 All @@ -11,6 +11,7 @@
"start": "webpack serve --config build/webpack.dev.js",
"lint": "eslint src/**/*.js test/unit/mocks/*.js test/unit/*.js",
"build": "tsc && rimraf dist && webpack --config build/webpack.prod.js",
"postbuild": "cp index.d.ts dash.d.ts",
"doc": "jsdoc -c build/jsdoc/jsdoc_conf.json -d docs/jsdoc",
"test": "karma start karma.unit.conf.js",
"test-browserunit": "karma start build/karma.conf.js",
Expand Down
51 changes: 22 additions & 29 deletions samples/dash-if-reference-player/app/main.js
Expand Up @@ -241,6 +241,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
mpd: encodeURIComponent('https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd'),
loop: true,
autoPlay: true,
autoLoad: false,
muted: false,
drmToday: false,
forceQualitySwitchSelected: false,
drmPrioritiesEnabled: false,
Expand Down Expand Up @@ -290,6 +292,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'

// Starting Options
$scope.autoPlaySelected = true;
$scope.autoLoadSelected = false;
$scope.muted = false;
$scope.cmcdEnabled = false;
$scope.cmsdEnabled = false;
$scope.cmsdApplyMb = false;
Expand Down Expand Up @@ -497,6 +501,10 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
$scope.player.setAutoPlay($scope.autoPlaySelected);
};

$scope.toggleMuted = function () {
$scope.player.setMute($scope.muted)
}

$scope.changeFetchThroughputCalculation = function (mode) {
$scope.player.updateSettings({
streaming: {
Expand Down Expand Up @@ -1495,6 +1503,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
mpd: encodeURIComponent(decodeURIComponent($scope.selectedItem.url)),
loop: $scope.loopSelected,
autoPlay: $scope.autoPlaySelected,
autoLoad: $scope.autoLoadSelected,
muted: $scope.muted,
drmToday: $scope.drmToday,
forceQualitySwitchSelected: $scope.forceQualitySwitchSelected,
drmPrioritiesEnabled: $scope.prioritiesEnabled,
Expand Down Expand Up @@ -1559,12 +1569,10 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
for (var setting in settings) {
if (typeof defaultSettings[setting] === 'object' && defaultSettings[setting] !== null && !(defaultSettings[setting] instanceof Array)) {
settingDifferencesObject[setting] = this.makeSettingDifferencesObject(settings[setting], defaultSettings[setting], false);
}
else if(settings[setting] !== defaultSettings[setting]){
if(Array.isArray(settings[setting])){
} else if (settings[setting] !== defaultSettings[setting]) {
if (Array.isArray(settings[setting])) {
settingDifferencesObject[setting] = _arraysEqual(settings[setting], defaultSettings[setting]) ? {} : settings[setting];
}
else {
} else {
settingDifferencesObject[setting] = settings[setting];
}

Expand Down Expand Up @@ -1763,6 +1771,13 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
$scope.autoPlaySelected = this.parseBoolean(value);
$scope.toggleAutoPlay();
break;
case 'autoLoad':
$scope.autoLoadSelected = this.parseBoolean(value);
break;
case 'muted':
$scope.muted = this.parseBoolean(value);
$scope.toggleMuted();
break;
case 'drmToday':
$scope.drmToday = this.parseBoolean(value);
break;
Expand Down Expand Up @@ -2295,18 +2310,6 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
var vars = getUrlVars();
var item = {};

if (vars && vars.hasOwnProperty('url')) {
item.url = vars.url;
}

// if (vars && vars.hasOwnProperty('mpd')) {
// item.url = vars.mpd;
// }

if (vars && vars.hasOwnProperty('source')) {
item.url = vars.source;
}

if (vars && vars.hasOwnProperty('stream')) {
try {
item = JSON.parse(atob(vars.stream));
Expand All @@ -2326,18 +2329,8 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
}
}

if (item.url) {
var startPlayback = false;

$scope.selectedItem = item;

if (vars.hasOwnProperty('autoplay')) {
startPlayback = (vars.autoplay === 'true');
}

if (startPlayback) {
$scope.doLoad();
}
if ($scope.autoLoadSelected && $scope.selectedItem) {
$scope.doLoad();
}
}

Expand Down

0 comments on commit 8cad591

Please sign in to comment.