File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -773,6 +773,8 @@ import Events from './events/Events';
773
773
* Overwrite the manifest segments base information timescale attributes with the timescale set in initialization segments
774
774
* @property {boolean } [enableManifestTimescaleMismatchFix=false]
775
775
* Defines the delay in milliseconds between two consecutive checks for events to be fired.
776
+ * @property {boolean } [seekWithoutReadyStateCheck=false]
777
+ * This allows a seek by setting currentTime regardless of the loadedmetadata event being emitted
776
778
* @property {boolean } [parseInbandPrft=false]
777
779
* Set to true if dash.js should parse inband prft boxes (ProducerReferenceTime) and trigger events.
778
780
* @property {module:Settings~Metrics } metrics Metric settings
@@ -898,6 +900,7 @@ function Settings() {
898
900
enableManifestDurationMismatchFix : true ,
899
901
parseInbandPrft : false ,
900
902
enableManifestTimescaleMismatchFix : false ,
903
+ seekWithoutReadyStateCheck : false ,
901
904
capabilities : {
902
905
filterUnsupportedEssentialProperties : true ,
903
906
useMediaCapabilitiesApi : false
Original file line number Diff line number Diff line change @@ -104,7 +104,14 @@ function VideoModel() {
104
104
removeEventListener ( setCurrentTimeReadyStateFunction . event , setCurrentTimeReadyStateFunction . func ) ;
105
105
}
106
106
_currentTime = currentTime ;
107
- setCurrentTimeReadyStateFunction = waitForReadyState ( Constants . VIDEO_ELEMENT_READY_STATES . HAVE_METADATA , ( ) => {
107
+
108
+ let elementReadyStateEvent = Constants . VIDEO_ELEMENT_READY_STATES . HAVE_METADATA ;
109
+
110
+ if ( settings . get ( ) . streaming . seekWithoutReadyStateCheck ) {
111
+ elementReadyStateEvent = Constants . VIDEO_ELEMENT_READY_STATES . HAVE_NOTHING ;
112
+ }
113
+
114
+ setCurrentTimeReadyStateFunction = waitForReadyState ( elementReadyStateEvent , ( ) => {
108
115
if ( ! element ) {
109
116
return ;
110
117
}
You can’t perform that action at this time.
0 commit comments