@locpd/vidstack 1.12.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +22 -0
  3. package/analyze.json.d.ts +8 -0
  4. package/bundle.d.ts +1 -0
  5. package/cdn/chunks/vidstack-2f5gzOW6.js +1 -0
  6. package/cdn/chunks/vidstack-BYgY9wmd.js +1 -0
  7. package/cdn/chunks/vidstack-BfBBPhXV.js +1 -0
  8. package/cdn/chunks/vidstack-Bjo5esRp.js +1 -0
  9. package/cdn/chunks/vidstack-BuL67v3q.js +1 -0
  10. package/cdn/chunks/vidstack-C0msPRTd.js +3 -0
  11. package/cdn/chunks/vidstack-CJNLoJPa.js +1 -0
  12. package/cdn/chunks/vidstack-CQSpZ7X8.js +16 -0
  13. package/cdn/chunks/vidstack-C_AxqLKV.js +1 -0
  14. package/cdn/chunks/vidstack-CioT3Yw2.js +1 -0
  15. package/cdn/chunks/vidstack-CrqkytHl.js +1 -0
  16. package/cdn/chunks/vidstack-D0M8R0ZU.js +1 -0
  17. package/cdn/chunks/vidstack-D40FSa5B.js +3 -0
  18. package/cdn/chunks/vidstack-DD2JwFVU.js +1 -0
  19. package/cdn/chunks/vidstack-DRH_1tFW.js +1 -0
  20. package/cdn/chunks/vidstack-DfDZuHNP.js +1 -0
  21. package/cdn/chunks/vidstack-DiNS2Vx5.js +1 -0
  22. package/cdn/chunks/vidstack-xjJ-ui_l.js +1 -0
  23. package/cdn/providers/vidstack-audio-2Dt_Ivbp.js +1 -0
  24. package/cdn/providers/vidstack-dash-CUtD4e6q.js +1 -0
  25. package/cdn/providers/vidstack-google-cast-BdORATUX.js +1 -0
  26. package/cdn/providers/vidstack-hls-R25Kb6DP.js +1 -0
  27. package/cdn/providers/vidstack-html-DaAUJYsD.js +1 -0
  28. package/cdn/providers/vidstack-video-Csvox7SO.js +1 -0
  29. package/cdn/providers/vidstack-vimeo-D4Z96kg2.js +1 -0
  30. package/cdn/providers/vidstack-youtube-DiND6h3s.js +1 -0
  31. package/cdn/vidstack.js +1 -0
  32. package/cdn/with-layouts/chunks/vidstack-2f5gzOW6.js +1 -0
  33. package/cdn/with-layouts/chunks/vidstack-45yH5los.js +1 -0
  34. package/cdn/with-layouts/chunks/vidstack-BBVMdOnf.js +1 -0
  35. package/cdn/with-layouts/chunks/vidstack-BB_ulI_T.js +1 -0
  36. package/cdn/with-layouts/chunks/vidstack-BcAewM33.js +1 -0
  37. package/cdn/with-layouts/chunks/vidstack-BfBBPhXV.js +1 -0
  38. package/cdn/with-layouts/chunks/vidstack-Bxv1Qnxe.js +1 -0
  39. package/cdn/with-layouts/chunks/vidstack-C2ZbG62f.js +3 -0
  40. package/cdn/with-layouts/chunks/vidstack-CCYIOKgL.js +1 -0
  41. package/cdn/with-layouts/chunks/vidstack-CL6PeIO1.js +1 -0
  42. package/cdn/with-layouts/chunks/vidstack-C_AxqLKV.js +1 -0
  43. package/cdn/with-layouts/chunks/vidstack-CifDkwDH.js +795 -0
  44. package/cdn/with-layouts/chunks/vidstack-Cry7aD59.js +3 -0
  45. package/cdn/with-layouts/chunks/vidstack-D065okCn.js +1 -0
  46. package/cdn/with-layouts/chunks/vidstack-DGuMoXmI.js +1 -0
  47. package/cdn/with-layouts/chunks/vidstack-DRH_1tFW.js +1 -0
  48. package/cdn/with-layouts/chunks/vidstack-DVBs1XoQ.js +1 -0
  49. package/cdn/with-layouts/chunks/vidstack-Dge3KT8k.js +1 -0
  50. package/cdn/with-layouts/chunks/vidstack-DiNS2Vx5.js +1 -0
  51. package/cdn/with-layouts/chunks/vidstack-HvYfJoen.js +1 -0
  52. package/cdn/with-layouts/providers/vidstack-audio-DE5vKIzW.js +1 -0
  53. package/cdn/with-layouts/providers/vidstack-dash-CA2agUuZ.js +1 -0
  54. package/cdn/with-layouts/providers/vidstack-google-cast-CGs-t8HM.js +1 -0
  55. package/cdn/with-layouts/providers/vidstack-hls-BHMbMFFR.js +1 -0
  56. package/cdn/with-layouts/providers/vidstack-html-Dm9gmNk6.js +1 -0
  57. package/cdn/with-layouts/providers/vidstack-video-C5it_Lbl.js +1 -0
  58. package/cdn/with-layouts/providers/vidstack-vimeo-BabLn9sy.js +1 -0
  59. package/cdn/with-layouts/providers/vidstack-youtube-D8UlccUL.js +1 -0
  60. package/cdn/with-layouts/vidstack.js +1 -0
  61. package/dev/chunks/vidstack-B7Zi3v_O.js +104 -0
  62. package/dev/chunks/vidstack-BFg1ZqiG.js +91 -0
  63. package/dev/chunks/vidstack-BGB2pa9s.js +58 -0
  64. package/dev/chunks/vidstack-BaIbHZE3.js +1519 -0
  65. package/dev/chunks/vidstack-Bb2rASIc.js +5188 -0
  66. package/dev/chunks/vidstack-Bcmx8pmK.js +224 -0
  67. package/dev/chunks/vidstack-Bl4b0Nen.js +29 -0
  68. package/dev/chunks/vidstack-Bo5OTJ06.js +58 -0
  69. package/dev/chunks/vidstack-BoAGnlRt.js +58 -0
  70. package/dev/chunks/vidstack-Bpr4fI4n.js +7 -0
  71. package/dev/chunks/vidstack-Bt8MP2DK.js +204 -0
  72. package/dev/chunks/vidstack-Bu2kfzUd.js +1637 -0
  73. package/dev/chunks/vidstack-C-ffXlSV.js +2995 -0
  74. package/dev/chunks/vidstack-C-ztJq-f.js +109 -0
  75. package/dev/chunks/vidstack-CFNlaVTR.js +55 -0
  76. package/dev/chunks/vidstack-C_l97D5j.js +254 -0
  77. package/dev/chunks/vidstack-CjhKISI0.js +114 -0
  78. package/dev/chunks/vidstack-CofXIJAy.js +57 -0
  79. package/dev/chunks/vidstack-CwTj4H1w.js +18 -0
  80. package/dev/chunks/vidstack-DDwbYVHV.js +66 -0
  81. package/dev/chunks/vidstack-DFImIcIL.js +11 -0
  82. package/dev/chunks/vidstack-DGDvUbvO.js +33 -0
  83. package/dev/chunks/vidstack-DO0kqA99.js +107 -0
  84. package/dev/chunks/vidstack-DXxIKXmd.js +50 -0
  85. package/dev/chunks/vidstack-DajrMUR0.js +297 -0
  86. package/dev/chunks/vidstack-DbBJlz7I.js +10 -0
  87. package/dev/chunks/vidstack-Dihypf8P.js +11 -0
  88. package/dev/chunks/vidstack-DlAhl87f.js +1193 -0
  89. package/dev/chunks/vidstack-Dm1xEU9Q.js +34 -0
  90. package/dev/chunks/vidstack-Dv_LIPFu.js +14 -0
  91. package/dev/chunks/vidstack-igYn0Apa.js +254 -0
  92. package/dev/chunks/vidstack-krOAtKMi.js +32 -0
  93. package/dev/chunks/vidstack-qh1N5_f_.js +26 -0
  94. package/dev/chunks/vidstack-rB-wqXw1.js +107 -0
  95. package/dev/chunks/vidstack-zG6PIeGg.js +66 -0
  96. package/dev/define/plyr-layout.js +51 -0
  97. package/dev/define/templates/plyr-layout.js +571 -0
  98. package/dev/define/templates/vidstack-audio-layout.js +167 -0
  99. package/dev/define/templates/vidstack-video-layout.js +390 -0
  100. package/dev/define/vidstack-icons.js +1 -0
  101. package/dev/define/vidstack-player-default-layout.js +21 -0
  102. package/dev/define/vidstack-player-layouts.js +25 -0
  103. package/dev/define/vidstack-player-ui.js +70 -0
  104. package/dev/define/vidstack-player.js +19 -0
  105. package/dev/global/plyr.js +501 -0
  106. package/dev/global/vidstack-player.js +129 -0
  107. package/dev/providers/vidstack-audio.js +35 -0
  108. package/dev/providers/vidstack-dash.js +516 -0
  109. package/dev/providers/vidstack-google-cast.js +474 -0
  110. package/dev/providers/vidstack-hls.js +408 -0
  111. package/dev/providers/vidstack-html.js +567 -0
  112. package/dev/providers/vidstack-video.js +207 -0
  113. package/dev/providers/vidstack-vimeo.js +554 -0
  114. package/dev/providers/vidstack-youtube.js +286 -0
  115. package/dev/vidstack-elements.js +36 -0
  116. package/dev/vidstack.js +91 -0
  117. package/dom.d.ts +91 -0
  118. package/elements.d.ts +1433 -0
  119. package/empty.vtt +1 -0
  120. package/global/player.d.ts +52 -0
  121. package/global/plyr.d.ts +343 -0
  122. package/google-cast.d.ts +1422 -0
  123. package/icons.d.ts +1 -0
  124. package/index.d.ts +402 -0
  125. package/package.json +199 -0
  126. package/player/index.d.ts +3 -0
  127. package/player/layouts/default.d.ts +3 -0
  128. package/player/layouts/index.d.ts +3 -0
  129. package/player/layouts/plyr.d.ts +3 -0
  130. package/player/styles/base.css +153 -0
  131. package/player/styles/default/buffering.css +55 -0
  132. package/player/styles/default/buttons.css +175 -0
  133. package/player/styles/default/captions.css +181 -0
  134. package/player/styles/default/chapter-title.css +26 -0
  135. package/player/styles/default/controls.css +56 -0
  136. package/player/styles/default/gestures.css +19 -0
  137. package/player/styles/default/icons.css +6 -0
  138. package/player/styles/default/keyboard.css +148 -0
  139. package/player/styles/default/layouts/audio.css +417 -0
  140. package/player/styles/default/layouts/video.css +590 -0
  141. package/player/styles/default/menus.css +959 -0
  142. package/player/styles/default/poster.css +52 -0
  143. package/player/styles/default/sliders.css +391 -0
  144. package/player/styles/default/theme.css +2461 -0
  145. package/player/styles/default/thumbnail.css +40 -0
  146. package/player/styles/default/time.css +45 -0
  147. package/player/styles/default/tooltips.css +141 -0
  148. package/player/styles/plyr/theme.css +1237 -0
  149. package/player/ui.d.ts +3 -0
  150. package/plugins.d.ts +19 -0
  151. package/plugins.js +13 -0
  152. package/prod/chunks/vidstack-B01xzxC4.js +7 -0
  153. package/prod/chunks/vidstack-BCeb7ryV.js +201 -0
  154. package/prod/chunks/vidstack-BGSTndAW.js +1590 -0
  155. package/prod/chunks/vidstack-BPitBBjh.js +1519 -0
  156. package/prod/chunks/vidstack-BQlOPwOu.js +45 -0
  157. package/prod/chunks/vidstack-BSDzlwxO.js +4778 -0
  158. package/prod/chunks/vidstack-BT0m6zEi.js +109 -0
  159. package/prod/chunks/vidstack-BTigPj2h.js +55 -0
  160. package/prod/chunks/vidstack-BiyXcJ_M.js +107 -0
  161. package/prod/chunks/vidstack-BoVf5n1M.js +2985 -0
  162. package/prod/chunks/vidstack-Bq6c3Bam.js +58 -0
  163. package/prod/chunks/vidstack-ByLCIBtB.js +297 -0
  164. package/prod/chunks/vidstack-C2US-gSO.js +248 -0
  165. package/prod/chunks/vidstack-C9vIqaYT.js +10 -0
  166. package/prod/chunks/vidstack-CF6fixCQ.js +1193 -0
  167. package/prod/chunks/vidstack-CTojmhKq.js +66 -0
  168. package/prod/chunks/vidstack-ChQTHmIQ.js +77 -0
  169. package/prod/chunks/vidstack-Cm6_unwd.js +246 -0
  170. package/prod/chunks/vidstack-CwTj4H1w.js +18 -0
  171. package/prod/chunks/vidstack-D3ltXc3a.js +33 -0
  172. package/prod/chunks/vidstack-D5EzK014.js +14 -0
  173. package/prod/chunks/vidstack-DDXt6fpN.js +58 -0
  174. package/prod/chunks/vidstack-DJDnh4xT.js +11 -0
  175. package/prod/chunks/vidstack-DXxIKXmd.js +50 -0
  176. package/prod/chunks/vidstack-D_-9AA6_.js +29 -0
  177. package/prod/chunks/vidstack-DbkZGjSn.js +107 -0
  178. package/prod/chunks/vidstack-Dihypf8P.js +11 -0
  179. package/prod/chunks/vidstack-Dm1xEU9Q.js +34 -0
  180. package/prod/chunks/vidstack-Dq5Yu0Vr.js +205 -0
  181. package/prod/chunks/vidstack-DqAw8m9J.js +26 -0
  182. package/prod/chunks/vidstack-DsPOyKtl.js +57 -0
  183. package/prod/chunks/vidstack-krOAtKMi.js +32 -0
  184. package/prod/chunks/vidstack-nLyr4NEP.js +58 -0
  185. package/prod/chunks/vidstack-xMS8dnYq.js +114 -0
  186. package/prod/chunks/vidstack-yEGTpgeA.js +104 -0
  187. package/prod/define/plyr-layout.js +51 -0
  188. package/prod/define/templates/plyr-layout.js +571 -0
  189. package/prod/define/templates/vidstack-audio-layout.js +167 -0
  190. package/prod/define/templates/vidstack-video-layout.js +390 -0
  191. package/prod/define/vidstack-icons.js +1 -0
  192. package/prod/define/vidstack-player-default-layout.js +21 -0
  193. package/prod/define/vidstack-player-layouts.js +25 -0
  194. package/prod/define/vidstack-player-ui.js +70 -0
  195. package/prod/define/vidstack-player.js +19 -0
  196. package/prod/global/plyr.js +493 -0
  197. package/prod/global/vidstack-player.js +129 -0
  198. package/prod/providers/vidstack-audio.js +35 -0
  199. package/prod/providers/vidstack-dash.js +501 -0
  200. package/prod/providers/vidstack-google-cast.js +468 -0
  201. package/prod/providers/vidstack-hls.js +393 -0
  202. package/prod/providers/vidstack-html.js +555 -0
  203. package/prod/providers/vidstack-video.js +204 -0
  204. package/prod/providers/vidstack-vimeo.js +548 -0
  205. package/prod/providers/vidstack-youtube.js +286 -0
  206. package/prod/vidstack-elements.js +36 -0
  207. package/prod/vidstack.js +158 -0
  208. package/server/chunks/vidstack-6juFdkKy.js +29 -0
  209. package/server/chunks/vidstack-B7iHmv7_.js +307 -0
  210. package/server/chunks/vidstack-BmxyML9v.js +1619 -0
  211. package/server/chunks/vidstack-BskfxwD3.js +566 -0
  212. package/server/chunks/vidstack-BvLV0SMz.js +4642 -0
  213. package/server/chunks/vidstack-BvWwluXZ.js +205 -0
  214. package/server/chunks/vidstack-C-413dj2.js +8 -0
  215. package/server/chunks/vidstack-C26K8z_-.js +55 -0
  216. package/server/chunks/vidstack-CJJiksDz.js +107 -0
  217. package/server/chunks/vidstack-CUNv52x1.js +141 -0
  218. package/server/chunks/vidstack-CqyBCODe.js +295 -0
  219. package/server/chunks/vidstack-CwTj4H1w.js +18 -0
  220. package/server/chunks/vidstack-DHAyGSOl.js +1502 -0
  221. package/server/chunks/vidstack-DLU3cjcp.js +381 -0
  222. package/server/chunks/vidstack-DXxIKXmd.js +50 -0
  223. package/server/chunks/vidstack-DbtDXDS2.js +104 -0
  224. package/server/chunks/vidstack-Dm1xEU9Q.js +34 -0
  225. package/server/chunks/vidstack-DzTHw_bw.js +207 -0
  226. package/server/chunks/vidstack-Wn3NH5Sg.js +1566 -0
  227. package/server/chunks/vidstack-krOAtKMi.js +32 -0
  228. package/server/chunks/vidstack-wNViAkr4.js +3045 -0
  229. package/server/define/plyr-layout.js +16 -0
  230. package/server/define/vidstack-icons.js +1 -0
  231. package/server/define/vidstack-player-default-layout.js +13 -0
  232. package/server/define/vidstack-player-layouts.js +16 -0
  233. package/server/define/vidstack-player-ui.js +11 -0
  234. package/server/define/vidstack-player.js +6 -0
  235. package/server/global/plyr.js +322 -0
  236. package/server/global/vidstack-player.js +58 -0
  237. package/server/vidstack-elements.js +46 -0
  238. package/server/vidstack.js +148 -0
  239. package/tailwind.cjs +101 -0
  240. package/tailwind.d.cts +15 -0
  241. package/types/vidstack-BOvzfZjK.d.ts +1269 -0
  242. package/types/vidstack-Cttpg6GU.d.ts +7474 -0
package/empty.vtt ADDED
@@ -0,0 +1 @@
1
+ WEBVTT
@@ -0,0 +1,52 @@
1
+ import '../types/vidstack-BOvzfZjK.js';
2
+ import { MediaAudioLayoutElement, MediaVideoLayoutElement, MediaPlyrLayoutElement, MediaPlayerElement } from '../elements.js';
3
+ import { DefaultLayoutProps, PlyrLayoutProps, MediaPlayerProps, TextTrackInit } from '../types/vidstack-Cttpg6GU.js';
4
+ import 'lit-html';
5
+ import 'media-captions';
6
+ import 'dashjs';
7
+ import 'hls.js';
8
+
9
+ interface VidstackPlayerLayoutLoader {
10
+ readonly name: string;
11
+ load(): void | Promise<void>;
12
+ create(): HTMLElement[] | Promise<HTMLElement[]>;
13
+ }
14
+
15
+ declare class VidstackPlayerLayout implements VidstackPlayerLayoutLoader {
16
+ readonly props?: Partial<DefaultLayoutProps> | undefined;
17
+ constructor(props?: Partial<DefaultLayoutProps> | undefined);
18
+ readonly name = "vidstack";
19
+ load(): Promise<void>;
20
+ create(): (MediaAudioLayoutElement | MediaVideoLayoutElement)[];
21
+ }
22
+
23
+ declare class PlyrLayout implements VidstackPlayerLayoutLoader {
24
+ readonly props?: Partial<PlyrLayoutProps> | undefined;
25
+ constructor(props?: Partial<PlyrLayoutProps> | undefined);
26
+ readonly name = "plyr";
27
+ load(): Promise<void>;
28
+ create(): MediaPlyrLayoutElement[];
29
+ }
30
+
31
+ declare class VidstackPlayer {
32
+ static create({ target, layout, tracks, ...props }: VidstackPlayerConfig): Promise<MediaPlayerElement>;
33
+ }
34
+ type VidstackPlayerTarget = string | HTMLElement;
35
+ interface VidstackPlayerConfig extends Partial<MediaPlayerProps> {
36
+ /**
37
+ * A document query selector string or `HTMLElement` to mount on. If an `<audio>`, `<video>`, or
38
+ * `<iframe>` element is given it will be enhanced.
39
+ */
40
+ target: VidstackPlayerTarget;
41
+ /**
42
+ * Text tracks to be included on initialization.
43
+ */
44
+ tracks?: TextTrackInit[];
45
+ /**
46
+ * Specify a layout to be loaded.
47
+ */
48
+ layout?: VidstackPlayerLayoutLoader;
49
+ }
50
+
51
+ export { PlyrLayout, VidstackPlayer, VidstackPlayerLayout };
52
+ export type { VidstackPlayerConfig, VidstackPlayerLayoutLoader, VidstackPlayerTarget };
@@ -0,0 +1,343 @@
1
+ import { MediaPlayerState, MediaViewType, PlayerSrc, TextTrackInit, FileDownloadInfo, MediaEvents, MediaTextTrackChangeEvent, MediaControlsChangeEvent, MediaFullscreenChangeEvent, MediaRateChangeEvent, MediaCanPlayEvent, MediaTimeUpdateEvent, MediaVolumeChangeEvent, MediaPlayerProps, PlyrLayoutProps, LogLevel, PlyrLayoutTranslations } from '../types/vidstack-Cttpg6GU.js';
2
+ import '../types/vidstack-BOvzfZjK.js';
3
+ import { MediaPlayerElement, MediaProviderElement, MediaPlyrLayoutElement } from '../elements.js';
4
+ import 'media-captions';
5
+ import 'dashjs';
6
+ import 'hls.js';
7
+ import 'lit-html';
8
+
9
+ declare class Plyr implements PlyrProps, PlyrMethods {
10
+ #private;
11
+ readonly target: PlyrTarget;
12
+ readonly config: Partial<PlyrConfig>;
13
+ static setup(targets: string | NodeList | HTMLElement[], config?: PlyrConfig): Plyr[];
14
+ static supported(type: 'audio' | 'video', provider: 'html5' | 'youtube' | 'vimeo'): boolean;
15
+ readonly player: MediaPlayerElement;
16
+ readonly provider: MediaProviderElement;
17
+ readonly layout: MediaPlyrLayoutElement;
18
+ readonly fullscreen: PlyrFullscreenAdapter;
19
+ playing: boolean;
20
+ paused: boolean;
21
+ ended: boolean;
22
+ currentTime: number;
23
+ seeking: boolean;
24
+ duration: number;
25
+ volume: number;
26
+ muted: boolean;
27
+ loop: boolean;
28
+ poster: string;
29
+ get type(): "" | "audio" | "video" | "google-cast" | "dash" | "hls" | "vimeo" | "youtube";
30
+ get isHTML5(): boolean;
31
+ get isEmbed(): boolean;
32
+ get buffered(): number;
33
+ get stopped(): boolean;
34
+ get hasAudio(): boolean;
35
+ get speed(): number;
36
+ set speed(speed: number);
37
+ get currentTrack(): number;
38
+ set currentTrack(index: number);
39
+ get pip(): boolean;
40
+ set pip(isActive: boolean);
41
+ get quality(): number | null;
42
+ set quality(value: number | null);
43
+ get source(): PlyrSource | null;
44
+ set source(source: PlyrSource | null);
45
+ get ratio(): string | null;
46
+ set ratio(ratio: string | null);
47
+ get download(): FileDownloadInfo;
48
+ set download(download: FileDownloadInfo);
49
+ constructor(target: PlyrTarget, config?: Partial<PlyrConfig>);
50
+ play(): Promise<void>;
51
+ pause(): Promise<void>;
52
+ togglePlay(toggle?: boolean): Promise<void>;
53
+ toggleCaptions(toggle?: boolean): void;
54
+ toggleControls(toggle?: boolean): void;
55
+ restart(): void;
56
+ stop(): void;
57
+ forward(seekTime?: number): void;
58
+ rewind(seekTime?: number): void;
59
+ increaseVolume(step?: number): void;
60
+ decreaseVolume(step?: number): void;
61
+ airplay(): Promise<void>;
62
+ on<T extends keyof PlyrEvents>(type: T, callback: (event: PlyrEvents[T]) => void): void;
63
+ once<T extends keyof PlyrEvents>(type: T, callback: (event: PlyrEvents[T]) => void): void;
64
+ off<T extends keyof PlyrEvents>(type: T, callback: (event: PlyrEvents[T]) => void): void;
65
+ supports(type: string): boolean;
66
+ destroy(): void;
67
+ }
68
+ type PlyrTarget = string | HTMLElement | NodeList | HTMLElement[];
69
+ interface PlyrConfig extends Partial<Omit<MediaPlayerProps, 'controls'>>, Partial<PlyrLayoutProps> {
70
+ /**
71
+ * Completely disable Plyr. This would allow you to do a User Agent check or similar to
72
+ * programmatically enable or disable Plyr for a certain UA.
73
+ *
74
+ * @defaultValue true
75
+ * @example
76
+ * ```ts
77
+ * enabled: !/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)
78
+ * ```
79
+ */
80
+ enabled: boolean;
81
+ /**
82
+ * Display debugging information in the console.
83
+ *
84
+ * @defaultValue 'warn'
85
+ */
86
+ debug: boolean | LogLevel;
87
+ /**
88
+ * Only allow one player playing at once.
89
+ *
90
+ * @defaultValue true
91
+ */
92
+ autoPause: boolean;
93
+ /**
94
+ * Gets or sets the video aspect ratio.
95
+ *
96
+ * @defaultValue 16/9
97
+ */
98
+ ratio: string | null;
99
+ /**
100
+ * Hide video controls automatically after 2s of no mouse or focus movement, on control element
101
+ * blur (tab out), on playback start or entering fullscreen. As soon as the mouse is moved,
102
+ * a control element is focused or playback is paused, the controls reappear instantly.
103
+ *
104
+ * @defaultValue true
105
+ */
106
+ hideControls: boolean;
107
+ /**
108
+ * Reset the playback to the start once playback is complete.
109
+ *
110
+ * @defaultValue false
111
+ */
112
+ resetOnEnd: boolean;
113
+ /**
114
+ * Disable right click menu on video to help as very primitive obfuscation to prevent downloads
115
+ * of content.
116
+ *
117
+ * @defaultValue true
118
+ */
119
+ disableContextMenu: boolean;
120
+ /**
121
+ * Specify a URL or path to the SVG sprite. See the SVG section for more info.
122
+ *
123
+ * @defaultValue null
124
+ */
125
+ iconUrl: string | null;
126
+ /**
127
+ * Specify the id prefix for the icons used in the default controls (e.g. "plyr-play" would be
128
+ * "plyr"). This is to prevent clashes if you're using your own SVG sprite but with the default
129
+ * controls. Most people can ignore this option.
130
+ *
131
+ * @defaultValue 'plyr'
132
+ */
133
+ iconPrefix: 'plyr';
134
+ /**
135
+ * Enable keyboard shortcuts for focused players only or globally.
136
+ *
137
+ * @defaultValue `{ focused: true, global: false }`
138
+ */
139
+ keyboard: PlyrKeyboardConfig;
140
+ /**
141
+ * Used for internationalization (i18n) of the text within the UI.
142
+ *
143
+ * @defaultValue null
144
+ */
145
+ i18n: PlyrI18nConfig | null;
146
+ /**
147
+ * Text tracks to be included on initialization.
148
+ */
149
+ tracks?: TextTrackInit[];
150
+ }
151
+ interface PlyrKeyboardConfig {
152
+ /**
153
+ * Enable keyboard shortcuts when the player is focused.
154
+ *
155
+ * @defaultValue true
156
+ */
157
+ focused: boolean;
158
+ /**
159
+ * Enable keyboard shortcuts globally.
160
+ *
161
+ * @defaultValue false
162
+ */
163
+ global: boolean;
164
+ }
165
+ interface PlyrStorageConfig {
166
+ /**
167
+ * Allow use of local storage to store user settings.
168
+ *
169
+ * @defaultValue true
170
+ */
171
+ enabled: boolean;
172
+ /**
173
+ * The storage key prefix to use.
174
+ *
175
+ * @defaultValue 'plyr'
176
+ */
177
+ key: string;
178
+ }
179
+ interface PlyrI18nConfig extends Partial<PlyrLayoutTranslations> {
180
+ }
181
+ interface PlyrProps extends Pick<MediaPlayerState, 'playing' | 'paused' | 'ended' | 'currentTime' | 'seeking' | 'duration' | 'volume' | 'muted' | 'loop' | 'poster'> {
182
+ /**
183
+ * Returns a boolean indicating if the current player is HTML5.
184
+ */
185
+ readonly isHTML5: boolean;
186
+ /**
187
+ * Returns a boolean indicating if the current player is an embedded player.
188
+ */
189
+ readonly isEmbed: boolean;
190
+ /**
191
+ * Returns a float between 0 and 1 indicating how much of the media is buffered
192
+ */
193
+ readonly buffered: number;
194
+ /**
195
+ * Returns a boolean indicating if the current player is stopped.
196
+ */
197
+ readonly stopped: boolean;
198
+ /**
199
+ * Returns a boolean indicating if the current media has an audio track.
200
+ */
201
+ readonly hasAudio: boolean;
202
+ /**
203
+ * Fullscreen state and methods.
204
+ */
205
+ readonly fullscreen: PlyrFullscreenAdapter;
206
+ /**
207
+ * Gets or sets the speed for the player. Generally the minimum should be 0.5.
208
+ */
209
+ speed: number;
210
+ /**
211
+ * Gets or sets the caption track by index. -1 means the track is missing or captions is not
212
+ * active.
213
+ */
214
+ currentTrack: number;
215
+ /**
216
+ * Gets or sets the picture-in-picture state of the player.
217
+ */
218
+ pip: boolean;
219
+ /**
220
+ * Gets or sets the quality for the player based on height. Setting to -1 will use auto quality.
221
+ */
222
+ quality: number | null;
223
+ /**
224
+ * Gets or sets the current source for the player.
225
+ */
226
+ source: PlyrSource | null;
227
+ /**
228
+ * Gets or sets the video aspect ratio.
229
+ */
230
+ ratio: string | null;
231
+ /**
232
+ * Gets or sets the URL for the download button.
233
+ */
234
+ download: FileDownloadInfo;
235
+ }
236
+ interface PlyrSource {
237
+ title?: string;
238
+ type?: MediaViewType;
239
+ sources: PlayerSrc;
240
+ poster?: string;
241
+ thumbnails?: string;
242
+ tracks?: TextTrackInit[];
243
+ }
244
+ declare class PlyrFullscreenAdapter {
245
+ #private;
246
+ constructor(plyr: Plyr);
247
+ /**
248
+ * Returns a boolean indicating if the current player has fullscreen enabled.
249
+ */
250
+ get enabled(): boolean;
251
+ /**
252
+ * Returns a boolean indicating if the current player is in fullscreen mode.
253
+ */
254
+ get active(): boolean;
255
+ /**
256
+ * Request to enter fullscreen.
257
+ */
258
+ enter(): Promise<void>;
259
+ /**
260
+ * Request to exit fullscreen.
261
+ */
262
+ exit(): Promise<void>;
263
+ /**
264
+ * Request to toggle fullscreen.
265
+ */
266
+ toggle(): Promise<void>;
267
+ }
268
+ interface PlyrMethods extends Pick<MediaPlayerElement, 'play' | 'pause' | 'destroy'> {
269
+ /**
270
+ * Toggle playback, if no parameters are passed, it will toggle based on current status.
271
+ */
272
+ togglePlay(toggle?: boolean): Promise<void>;
273
+ /**
274
+ * Stop playback and reset to start.
275
+ */
276
+ stop(): void;
277
+ /**
278
+ * Restart playback.
279
+ */
280
+ restart(): void;
281
+ /**
282
+ * Rewind playback by the specified seek time. If no parameter is passed, the default seek time
283
+ * will be used.
284
+ */
285
+ rewind(seekTime?: number): void;
286
+ /**
287
+ * Fast forward by the specified seek time. If no parameter is passed, the default seek time
288
+ * will be used.
289
+ */
290
+ forward(seekTime?: number): void;
291
+ /**
292
+ * Increase volume by the specified step. If no parameter is passed, the default step will be used.
293
+ */
294
+ increaseVolume(step?: number): void;
295
+ /**
296
+ * Reduce volume by the specified step. If no parameter is passed, the default step will be used.
297
+ */
298
+ decreaseVolume(step?: number): void;
299
+ /**
300
+ * Toggle captions display. If no parameter is passed, it will toggle based on current status.
301
+ */
302
+ toggleCaptions(toggle?: boolean): void;
303
+ /**
304
+ * Trigger the airplay dialog on supported devices.
305
+ */
306
+ airplay(): void;
307
+ /**
308
+ * Toggle the controls (video only). Takes optional truthy value to force it on/off.
309
+ */
310
+ toggleControls(toggle?: boolean): void;
311
+ /**
312
+ * Add an event listener for the specified event.
313
+ */
314
+ on<T extends keyof PlyrEvents>(type: T, callback: (event: PlyrEvents[T]) => void): void;
315
+ /**
316
+ * Add an event listener for the specified event once.
317
+ */
318
+ once<T extends keyof PlyrEvents>(type: T, callback: (event: PlyrEvents[T]) => void): void;
319
+ /**
320
+ * Remove an event listener for the specified event.
321
+ */
322
+ off<T extends keyof PlyrEvents>(type: T, callback: (event: PlyrEvents[T]) => void): void;
323
+ /**
324
+ * Check support for a mime type.
325
+ */
326
+ supports(type: string): boolean;
327
+ }
328
+ interface PlyrEvents extends Pick<MediaEvents, 'ended' | 'pause' | 'play' | 'playing' | 'progress' | 'seeked' | 'seeking'> {
329
+ captionsdisabled: MediaTextTrackChangeEvent;
330
+ captionsenabled: MediaTextTrackChangeEvent;
331
+ controlshidden: MediaControlsChangeEvent;
332
+ controlsshown: MediaControlsChangeEvent;
333
+ enterfullscreen: MediaFullscreenChangeEvent;
334
+ exitfullscreen: MediaFullscreenChangeEvent;
335
+ languagechange: Event;
336
+ ratechange: MediaRateChangeEvent;
337
+ ready: MediaCanPlayEvent;
338
+ timeupdate: MediaTimeUpdateEvent;
339
+ volumechange: MediaVolumeChangeEvent;
340
+ }
341
+
342
+ export { Plyr, PlyrFullscreenAdapter };
343
+ export type { PlyrConfig, PlyrEvents, PlyrI18nConfig, PlyrKeyboardConfig, PlyrMethods, PlyrProps, PlyrSource, PlyrStorageConfig, PlyrTarget };