Skip to content

Commit e2a03bb

Browse files
authored
Add option to specify an artificial offset to the UTC time sync value (#4887)
1 parent 5b5edb2 commit e2a03bb

File tree

5 files changed

+130
-75
lines changed

5 files changed

+130
-75
lines changed

index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,8 @@ export class MediaPlayerSettingClass {
17541754
defaultTimingSource?: {
17551755
scheme?: string,
17561756
value?: string
1757-
}
1757+
},
1758+
artificialTimeOffsetToApply?: number
17581759
},
17591760
scheduling?: {
17601761
defaultTimeout?: number,

samples/dash-if-reference-player/app/main.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,16 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
759759
});
760760
};
761761

762+
$scope.updateUtcTimeSyncOffset = function () {
763+
$scope.player.updateSettings({
764+
streaming: {
765+
utcSynchronization: {
766+
artificialTimeOffsetToApply: parseInt($scope.utcTimeSyncOffset)
767+
}
768+
}
769+
});
770+
};
771+
762772
$scope.updateInitialBitrateVideo = function () {
763773
$scope.player.updateSettings({
764774
streaming: {
@@ -2511,6 +2521,11 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
25112521
$scope.useSuggestedPresentationDelay = currentConfig.streaming.delay.useSuggestedPresentationDelay;
25122522
}
25132523

2524+
function setUtcTimeSyncOptions() {
2525+
var currentConfig = $scope.player.getSettings();;
2526+
$scope.utcTimeSyncOffset = currentConfig.streaming.utcSynchronization.artificialTimeOffsetToApply;
2527+
}
2528+
25142529
function setStallThresholdOptions() {
25152530
var currentConfig = $scope.player.getSettings();
25162531
$scope.stallThreshold = currentConfig.streaming.buffer.stallThreshold;
@@ -2677,6 +2692,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
26772692
setDrmOptions();
26782693
setTextOptions();
26792694
setLiveDelayOptions();
2695+
setUtcTimeSyncOptions();
26802696
setStallThresholdOptions()
26812697
setInitialSettings();
26822698
setTrackSwitchModeSettings();

0 commit comments

Comments
 (0)