mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 09:41:45 +00:00
[video.js]: add player networkState
This commit is contained in:
Vendored
+14
@@ -3721,6 +3721,13 @@ declare namespace videojs {
|
||||
HaveEnoughData = 4
|
||||
}
|
||||
|
||||
enum NetworkState {
|
||||
Empty = 0,
|
||||
Idle = 1,
|
||||
Loading = 2,
|
||||
NoSource = 3
|
||||
}
|
||||
|
||||
/**
|
||||
* An instance of the `Player` class is created when any of the Video.js setup methods
|
||||
* are used to initialize a video.
|
||||
@@ -4257,6 +4264,13 @@ declare namespace videojs {
|
||||
|
||||
muted(): boolean;
|
||||
|
||||
/**
|
||||
* Returns the current state of network activity for the element
|
||||
*
|
||||
* @return The current network state
|
||||
*/
|
||||
networkState(): NetworkState;
|
||||
|
||||
/**
|
||||
* Pause the video playback
|
||||
* @check
|
||||
|
||||
@@ -61,6 +61,8 @@ videojs("example_video_1").ready(function() {
|
||||
|
||||
this.requestFullscreen();
|
||||
|
||||
const networkState: videojs.NetworkState = this.networkState();
|
||||
|
||||
testEvents(this);
|
||||
|
||||
testComponents(this);
|
||||
|
||||
Reference in New Issue
Block a user