@@ -440,6 +440,17 @@ goog.requireType('shaka.media.PresentationTimeline');
440
440
*/
441
441
442
442
443
+ /**
444
+ * @event shaka.Player.CanUpdateStartTimeEvent
445
+ * @description Fired when it is safe to update the start time of a stream. You
446
+ * may use this event to get the seek range and update the start time,
447
+ * eg: on live streams.
448
+ * @property {string } type
449
+ * 'canupdatestarttime'
450
+ * @exportDoc
451
+ */
452
+
453
+
443
454
/**
444
455
* @event shaka.Player.AbrStatusChangedEvent
445
456
* @description Fired when the state of abr has been changed.
@@ -2831,6 +2842,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2831
2842
this . streamingEngine_ . applyPlayRange (
2832
2843
this . config_ . playRangeStart , this . config_ . playRangeEnd ) ;
2833
2844
2845
+ this . fullyLoaded_ = true ;
2846
+
2847
+ this . dispatchEvent ( shaka . Player . makeEvent_ (
2848
+ shaka . util . FakeEvent . EventName . CanUpdateStartTime ) ) ;
2849
+
2834
2850
const setupPlayhead = ( startTime ) => {
2835
2851
this . playhead_ = this . createPlayhead ( startTime ) ;
2836
2852
this . playheadObservers_ =
@@ -2989,8 +3005,6 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
2989
3005
if ( this . adManager_ ) {
2990
3006
this . adManager_ . onManifestUpdated ( isLive ) ;
2991
3007
}
2992
-
2993
- this . fullyLoaded_ = true ;
2994
3008
}
2995
3009
2996
3010
/**
@@ -3139,6 +3153,9 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
3139
3153
unloaded = true ;
3140
3154
} ) ;
3141
3155
3156
+ this . dispatchEvent ( shaka . Player . makeEvent_ (
3157
+ shaka . util . FakeEvent . EventName . CanUpdateStartTime ) ) ;
3158
+
3142
3159
if ( this . startTime_ != null ) {
3143
3160
this . playhead_ . setStartTime ( this . startTime_ ) ;
3144
3161
}
0 commit comments