Docs updates
This commit is contained in:
parent
95431639a0
commit
93e3f8946a
@ -2,9 +2,10 @@
|
||||
|
||||
- Typescript typings (thanks @ondratra)
|
||||
- `togglePlay` now also returns a `Promise` (thanks @azizhk)
|
||||
- Documentation improvements (thanks @MaxGiting, @0xflotus and @thatrobotdev)
|
||||
- Documentation improvements and typo fixes (thanks @ffpetrovic, @skerbis, @ayunami2000, @pjbaert, @MaxGiting, @0xflotus and @thatrobotdev)
|
||||
- Accessibility tweak for the play button (thanks @lunika)
|
||||
- Fix for ads configuration (thanks @SoftCreatR)
|
||||
- Fix handling listener return value (thanks @taion)
|
||||
- Added localisation key for PIP (picture-in-picture) (thanks @lmislm)
|
||||
- Preserve viewBox attribute in SVG sprite symbols (thanks @bseib)
|
||||
- Fix being unable to unmute autoplayed video on iOS (thanks @sumanbh)
|
||||
@ -17,6 +18,11 @@
|
||||
- Fix for multiple poster image downloads (use the native poster only for HTML5 videos)
|
||||
- Various presentational fixes
|
||||
- Removed logic to hide/show volume controls based on audio track detection due to it's problematic nature. If you want to hide volume control, use the `controls` option to do so.
|
||||
- Fix preview thumbnail scrubbing not working on mobile touch devices (thanks @ydylla)
|
||||
- Add download attribute to download button (thanks @Code1110)
|
||||
- Trap keyboard focus only when fullscreen (thanks @k-jensen)
|
||||
- Improvements to speed options - you can now specify all options in the UI (YouTube and Vimeo only accept 0.5-2) (thanks @ydylla)
|
||||
- Improve/fix quality change state restoring (thanks @ydylla)
|
||||
|
||||
_Note:_ This update contains CSS changes.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plyr",
|
||||
"version": "3.5.7-beta.0",
|
||||
"version": "3.5.7",
|
||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||
"homepage": "https://plyr.io",
|
||||
"author": "Sam Potts <sam@potts.es>",
|
||||
|
61
src/js/plyr.d.ts
vendored
61
src/js/plyr.d.ts
vendored
@ -6,7 +6,6 @@
|
||||
export = Plyr;
|
||||
export as namespace Plyr;
|
||||
|
||||
|
||||
declare class Plyr {
|
||||
/**
|
||||
* Setup a new instance
|
||||
@ -201,17 +200,26 @@ declare class Plyr {
|
||||
/**
|
||||
* Add an event listener for the specified event.
|
||||
*/
|
||||
on(event: Plyr.StandardEvent | Plyr.Html5Event | Plyr.YoutubeEvent, callback: (this: this, event: Plyr.PlyrEvent) => void): void;
|
||||
on(
|
||||
event: Plyr.StandardEvent | Plyr.Html5Event | Plyr.YoutubeEvent,
|
||||
callback: (this: this, event: Plyr.PlyrEvent) => void,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Add an event listener for the specified event once.
|
||||
*/
|
||||
once(event: Plyr.StandardEvent | Plyr.Html5Event | Plyr.YoutubeEvent, callback: (this: this, event: Plyr.PlyrEvent) => void): void;
|
||||
once(
|
||||
event: Plyr.StandardEvent | Plyr.Html5Event | Plyr.YoutubeEvent,
|
||||
callback: (this: this, event: Plyr.PlyrEvent) => void,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Remove an event listener for the specified event.
|
||||
*/
|
||||
off(event: Plyr.StandardEvent | Plyr.Html5Event | Plyr.YoutubeEvent, callback: (this: this, event: Plyr.PlyrEvent) => void): void;
|
||||
off(
|
||||
event: Plyr.StandardEvent | Plyr.Html5Event | Plyr.YoutubeEvent,
|
||||
callback: (this: this, event: Plyr.PlyrEvent) => void,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Check support for a mime type.
|
||||
@ -225,12 +233,39 @@ declare class Plyr {
|
||||
}
|
||||
|
||||
declare namespace Plyr {
|
||||
type MediaType = "audio" | "video";
|
||||
type Provider = "html5" | "youtube" | "vimeo";
|
||||
type StandardEvent = "progress" | "playing" | "play" | "pause" | "timeupdate" | "volumechange" | "seeking" | "seeked" | "ratechange" | "ended" | "enterfullscreen" | "exitfullscreen"
|
||||
| "captionsenabled" | "captionsdisabled" | "languagechange" | "controlshidden" | "controlsshown" | "ready";
|
||||
type Html5Event = "loadstart" | "loadeddata" | "loadedmetadata" | "canplay" | "canplaythrough" | "stalled" | "waiting" | "emptied" | "cuechange" | "error";
|
||||
type YoutubeEvent = "statechange" | "qualitychange" | "qualityrequested";
|
||||
type MediaType = 'audio' | 'video';
|
||||
type Provider = 'html5' | 'youtube' | 'vimeo';
|
||||
type StandardEvent =
|
||||
| 'progress'
|
||||
| 'playing'
|
||||
| 'play'
|
||||
| 'pause'
|
||||
| 'timeupdate'
|
||||
| 'volumechange'
|
||||
| 'seeking'
|
||||
| 'seeked'
|
||||
| 'ratechange'
|
||||
| 'ended'
|
||||
| 'enterfullscreen'
|
||||
| 'exitfullscreen'
|
||||
| 'captionsenabled'
|
||||
| 'captionsdisabled'
|
||||
| 'languagechange'
|
||||
| 'controlshidden'
|
||||
| 'controlsshown'
|
||||
| 'ready';
|
||||
type Html5Event =
|
||||
| 'loadstart'
|
||||
| 'loadeddata'
|
||||
| 'loadedmetadata'
|
||||
| 'canplay'
|
||||
| 'canplaythrough'
|
||||
| 'stalled'
|
||||
| 'waiting'
|
||||
| 'emptied'
|
||||
| 'cuechange'
|
||||
| 'error';
|
||||
type YoutubeEvent = 'statechange' | 'qualitychange' | 'qualityrequested';
|
||||
|
||||
interface FullscreenControl {
|
||||
/**
|
||||
@ -418,7 +453,7 @@ declare namespace Plyr {
|
||||
storage?: StorageOptions;
|
||||
|
||||
/**
|
||||
* selected: The default speed for playback. options: Options to display in the menu. Most browsers will refuse to play slower than 0.5.
|
||||
* selected: The default speed for playback. options: The speed options to display in the UI. YouTube and Vimeo will ignore any options outside of the 0.5-2 range, so options outside of this range will be hidden automatically.
|
||||
*/
|
||||
speed?: SpeedOptions;
|
||||
|
||||
@ -527,7 +562,7 @@ declare namespace Plyr {
|
||||
size?: number;
|
||||
}
|
||||
|
||||
type TrackKind = "subtitles" | "captions" | "descriptions" | "chapters" | "metadata";
|
||||
type TrackKind = 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
|
||||
interface Track {
|
||||
/**
|
||||
* Indicates how the text track is meant to be used
|
||||
@ -550,7 +585,7 @@ declare namespace Plyr {
|
||||
}
|
||||
|
||||
interface PlyrEvent extends CustomEvent {
|
||||
readonly detail: { readonly plyr: Plyr; };
|
||||
readonly detail: { readonly plyr: Plyr };
|
||||
}
|
||||
|
||||
interface Support {
|
||||
|
Loading…
x
Reference in New Issue
Block a user