mirror of
https://github.com/videojs/video.js.git
synced 2025-03-29 22:07:10 +02:00
feat(tech): add a scrubbing getter. (#6920)
This is helpful for source handlers and anything else that could have customer behavior for when we're scrubbing or not.
This commit is contained in:
parent
a0d09c107a
commit
a803484a39
@ -54,6 +54,8 @@ class Html5 extends Tech {
|
||||
this.setupSourcesetHandling_();
|
||||
}
|
||||
|
||||
this.isScrubbing_ = false;
|
||||
|
||||
if (this.el_.hasChildNodes()) {
|
||||
|
||||
const nodes = this.el_.childNodes;
|
||||
@ -537,6 +539,17 @@ class Html5 extends Tech {
|
||||
this.isScrubbing_ = isScrubbing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether we are scrubbing or not.
|
||||
*
|
||||
* @return {boolean} isScrubbing
|
||||
* - true for we are currently scrubbing
|
||||
* - false for we are no longer scrubbing
|
||||
*/
|
||||
scrubbing() {
|
||||
return this.isScrubbing_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set current time for the `HTML5` tech.
|
||||
*
|
||||
|
@ -501,6 +501,15 @@ class Tech extends Component {
|
||||
*/
|
||||
setScrubbing() {}
|
||||
|
||||
/**
|
||||
* Get whether we are scrubbing or not
|
||||
*
|
||||
* @abstract
|
||||
*
|
||||
* @see {Html5#scrubbing}
|
||||
*/
|
||||
scrubbing() {}
|
||||
|
||||
/**
|
||||
* Causes a manual time update to occur if {@link Tech#manualTimeUpdatesOn} was
|
||||
* previously called.
|
||||
|
Loading…
x
Reference in New Issue
Block a user