@@ -332,6 +332,9 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
332332 $scope . cmcdMode = 'query' ;
333333 $scope . cmcdAllKeys = [ 'br' , 'd' , 'ot' , 'tb' , 'bl' , 'dl' , 'mtp' , 'nor' , 'nrr' , 'su' , 'bs' , 'rtp' , 'cid' , 'pr' , 'sf' , 'sid' , 'st' , 'v' ]
334334
335+ $scope . stallThreshold = 0.3 ;
336+ $scope . lowLatencyStallThreshold = 0.3 ;
337+
335338 // Persistent license
336339 $scope . persistentSessionId = { } ;
337340 $scope . selectedKeySystem = null ;
@@ -778,6 +781,26 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
778781 } ) ;
779782 } ;
780783
784+ $scope . updateStallThreshold = function ( ) {
785+ $scope . player . updateSettings ( {
786+ streaming : {
787+ buffer : {
788+ stallThreshold : parseFloat ( $scope . stallThreshold )
789+ }
790+ }
791+ } ) ;
792+ }
793+
794+ $scope . updateLowLatencyStallThreshold = function ( ) {
795+ $scope . player . updateSettings ( {
796+ streaming : {
797+ buffer : {
798+ lowLatencyStallThreshold : parseFloat ( $scope . lowLatencyStallThreshold )
799+ }
800+ }
801+ } ) ;
802+ }
803+
781804 $scope . updateInitialRoleVideo = function ( ) {
782805 $scope . player . setInitialMediaSettingsFor ( 'video' , {
783806 role : $scope . initialSettings . video
@@ -813,7 +836,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
813836
814837 $scope . _backconvertRoleScheme = function ( setting ) {
815838 var scheme = 'off' ;
816-
839+
817840 if ( setting ) {
818841 scheme = undefined ;
819842 switch ( setting . schemeIdUri ) {
@@ -1136,6 +1159,16 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
11361159 config . streaming . abr . maxBitrate = { 'video' : maxBitrate } ;
11371160 }
11381161
1162+ const stallThreshold = parseFloat ( $scope . stallThreshold ) ;
1163+ if ( ! isNaN ( stallThreshold ) ) {
1164+ config . streaming . buffer . stallThreshold = stallThreshold ;
1165+ }
1166+
1167+ const lowLatencyStallThreshold = parseFloat ( $scope . lowLatencyStallThreshold ) ;
1168+ if ( ! isNaN ( lowLatencyStallThreshold ) ) {
1169+ config . streaming . buffer . lowLatencyStallThreshold = lowLatencyStallThreshold ;
1170+ }
1171+
11391172 config . streaming . cmcd . sid = $scope . cmcdSessionId ? $scope . cmcdSessionId : null ;
11401173 config . streaming . cmcd . cid = $scope . cmcdContentId ? $scope . cmcdContentId : null ;
11411174 config . streaming . cmcd . rtp = $scope . cmcdRtp ? $scope . cmcdRtp : null ;
@@ -1935,7 +1968,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
19351968 if ( scheme === 'off' ) {
19361969 delete settings . accessibility ;
19371970 } else {
1938- Object . assign ( settings , { accessibility : $scope . _genSettingsAudioAccessibility ( scheme , $scope . initialSettings . audioAccessibility ) } ) ;
1971+ Object . assign ( settings , { accessibility : $scope . _genSettingsAudioAccessibility ( scheme , $scope . initialSettings . audioAccessibility ) } ) ;
19391972 }
19401973 $scope . player . setInitialMediaSettingsFor ( 'audio' , settings ) ;
19411974 break ;
@@ -2308,6 +2341,12 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
23082341 $scope . useSuggestedPresentationDelay = currentConfig . streaming . delay . useSuggestedPresentationDelay ;
23092342 }
23102343
2344+ function setStallThresholdOptions ( ) {
2345+ var currentConfig = $scope . player . getSettings ( ) ;
2346+ $scope . stallThreshold = currentConfig . streaming . buffer . stallThreshold ;
2347+ $scope . lowLatencyStallThreshold = currentConfig . streaming . buffer . lowLatencyStallThreshold ;
2348+ }
2349+
23112350 function setInitialSettings ( ) {
23122351 var currentConfig = $scope . player . getSettings ( ) ;
23132352 if ( currentConfig . streaming . abr . initialBitrate . video !== - 1 ) {
@@ -2468,6 +2507,7 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
24682507 setDrmOptions ( ) ;
24692508 setTextOptions ( ) ;
24702509 setLiveDelayOptions ( ) ;
2510+ setStallThresholdOptions ( )
24712511 setInitialSettings ( ) ;
24722512 setTrackSwitchModeSettings ( ) ;
24732513 setInitialLogLevel ( ) ;
0 commit comments