aboutsummaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/plyr.d.ts30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/js/plyr.d.ts b/src/js/plyr.d.ts
index 4b332aeb..479cfa98 100644
--- a/src/js/plyr.d.ts
+++ b/src/js/plyr.d.ts
@@ -139,9 +139,14 @@ declare class Plyr {
ratio?: string;
/**
+ * Access Elements cache
+ */
+ elements: Plyr.Elements;
+
+ /**
* Returns the current video Provider
*/
- readonly provider: 'html5' | 'vimeo' | 'youtube';
+ readonly provider: Plyr.Provider;
/**
* Returns the native API for Vimeo or Youtube players
@@ -510,6 +515,8 @@ declare namespace Plyr {
interface QualityOptions {
default: number;
+ forced?: boolean;
+ onChange?: (quality: number) => void;
options: number[];
}
@@ -560,6 +567,27 @@ declare namespace Plyr {
src?: string | string[];
}
+ export interface Elements {
+ buttons: {
+ airplay?: HTMLButtonElement;
+ captions?: HTMLButtonElement;
+ download?: HTMLButtonElement;
+ fastForward?: HTMLButtonElement;
+ fullscreen?: HTMLButtonElement;
+ mute?: HTMLButtonElement;
+ pip?: HTMLButtonElement;
+ play?: HTMLButtonElement | HTMLButtonElement[];
+ restart?: HTMLButtonElement;
+ rewind?: HTMLButtonElement;
+ settings?: HTMLButtonElement;
+ };
+ captions: HTMLElement | null;
+ container: HTMLElement | null;
+ controls: HTMLElement | null;
+ fullscreen: HTMLElement | null;
+ wrapper: HTMLElement | null;
+ }
+
interface SourceInfo {
/**
* Note: YouTube and Vimeo are currently not supported as audio sources.