mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-14 05:50:20 +00:00
Fix types from last big addition (#27834)
* Fix some type from last big addition * Version * Test player.play * Remove patch version * remove whitespaces
This commit is contained in:
committed by
Sheetal Nandi
parent
6d2581cf26
commit
9241cf1a2b
Vendored
+7
-7
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Video.js 7.0
|
||||
// Type definitions for Video.js 7.2
|
||||
// Project: https://github.com/videojs/video.js
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone>
|
||||
// Simon Clériot <https://github.com/scleriot>
|
||||
@@ -1962,7 +1962,7 @@ declare namespace videojs {
|
||||
};
|
||||
|
||||
interface ControlBarOptions extends ComponentOptions {
|
||||
VolumePanel?: VolumePanelOptions;
|
||||
volumePanel?: VolumePanelOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3527,7 +3527,7 @@ declare namespace videojs {
|
||||
*
|
||||
* @return The current content of the modal dialog
|
||||
*/
|
||||
content(value: Content): any;
|
||||
content(value?: Content): any;
|
||||
|
||||
/**
|
||||
* Create the `ModalDialog`'s DOM element
|
||||
@@ -3570,7 +3570,7 @@ declare namespace videojs {
|
||||
* @param [content]
|
||||
* The same rules apply to this as apply to the `content` option.
|
||||
*/
|
||||
fillWith(content: Content): void;
|
||||
fillWith(content?: Content): void;
|
||||
|
||||
/**
|
||||
* Keydown handler. Attached when modal is focused.
|
||||
@@ -4073,7 +4073,7 @@ declare namespace videojs {
|
||||
*
|
||||
* @return The current MediaError when getting (or null)
|
||||
*/
|
||||
error(err: MediaError | string | number): void;
|
||||
error(err: MediaError | string | number | null): void;
|
||||
|
||||
error(): MediaError | null;
|
||||
|
||||
@@ -4243,7 +4243,7 @@ declare namespace videojs {
|
||||
* is ready to begin playback. For some browsers and all non-ready
|
||||
* situations, this will return `undefined`.
|
||||
*/
|
||||
play(): Player;
|
||||
play(): Promise<void> | undefined;
|
||||
|
||||
/**
|
||||
* Gets or sets the current playback rate. A playback rate of
|
||||
@@ -4741,7 +4741,7 @@ declare namespace videojs {
|
||||
* @return For advanced plugins, a factory function for that plugin. For
|
||||
* basic plugins, a wrapper function that initializes the plugin.
|
||||
*/
|
||||
registerPlugin<T>(name: string, plugin: (this: Player, options: any) => T): () => T;
|
||||
registerPlugin<T, K>(name: string, plugin: (this: Player, ...options: K[]) => T): (...options: K[]) => T;
|
||||
registerPlugin<T extends typeof Plugin>(name: string, plugin: T): () => T;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@ import * as videojs from 'video.js';
|
||||
|
||||
videojs("example_video_1").ready(function() {
|
||||
// EXAMPLE: Start playing the video.
|
||||
this.play();
|
||||
const playPromise = this.play();
|
||||
|
||||
if (playPromise) {
|
||||
playPromise.then(() => {});
|
||||
}
|
||||
|
||||
this.pause();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user