diff --git a/readme.md b/readme.md index 2ba37e07..39b14452 100644 --- a/readme.md +++ b/readme.md @@ -220,160 +220,26 @@ Option | Type | Default | Description `loadSprite` | Boolean | `true` | Load the SVG sprite specified as the `iconUrl` option (if a URL). If `false`, it is assumed you are handling sprite loading yourself. `iconUrl` | String | `null` | Specify a URL or path to the SVG sprite. See the [SVG section](#svg) for more info. `iconPrefix` | String | `plyr` | Specify the id prefix for the icons used in the default controls (e.g. "plyr-play" would be "plyr"). This is to prevent clashes if you're using your own SVG sprite but with the default controls. Most people can ignore this option. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OptionTypeDefaultDescription
blankUrlStringhttps://cdn.selz.com/plyr/blank.mp4Specify a URL or path to a blank video file used to properly cancel network requests. See issue #174 for more info.
autoplayBooleanfalseAutoplay the media on load. This is generally advised against on UX grounds. It is also disabled on iOS (an Apple limitation).
seekTimeNumber10The time, in seconds, to seek when a user hits fast forward or rewind.
volumeNumber5A number, between 1 and 10, representing the initial volume of the player.
clickToPlayBooleantrueClick (or tap) of the video container will toggle pause/play.
disableContextMenuBooleantrueDisable right click menu on video to help as very primitive obfuscation to prevent downloads of content.
hideControlsBooleantrueHide video controls automatically after 2s of no mouse or focus movement, on control element blur (tab out), on playback start or entering fullscreen. As soon as the mouse is moved, a control element is focused or playback is paused, the controls reappear instantly.
showPosterOnEndBooleanfalseThis will restore and *reload* HTML5 video once playback is complete. Note: depending on the browser caching, this may result in the video downloading again (or parts of it). Use with caution.
keyboardObject{ focused: true, global: false }Enable keyboard shortcuts for focused players only or globally as well (this will only work if there's one player in the document)
tooltipsObject{ controls: false, seek: true } - controls: Display control labels as tooltips on :hover & :focus (by default, the labels are screen reader only). -

- seek: Display a seek tooltip to indicate on click where the media would seek to. -
durationNumbernullSpecify a custom duration.
displayDurationBooleantrueDisplays the duration of the media on the "metadataloaded" event (on startup) in the current time display. This will only work if the `preload` attribute is not set to `none` (or is not set at all) and you choose not to display the duration (see controls option).
listenersObjectAllows early binding of event listeners to the controls. See controls above for list of controls and see plyr.js in /src for more info.
captionsObjectTwo properties: defaultActive which toggles if captions should be on by default. The default value is false. The selectedIndex property sets the default starting index for the caption tracks.
fullscreenObjectSee below
storageObjectTwo properties; enabled which toggles if local storage should be enabled (if the browser supports it). The default value is `true`. This enables storing user settings, currently it only stores volume but more will be added later. The second property key is the key used for the local storage. The default is plyr_volume until more settings are stored.
speedsArray[1.0, 1.5, 2.0, 0.5]Playback speed list.
loopsArray[Loop All, Loop in, Loop out, No Loop]Playback loop list.
- -#### Fullscreen options - - - - - - - - - - - - - - - - - - - - - - - - -
OptionTypeDefaultDescription
enabledBooleantrueToggles if fullscreen should be enabled (if the browser supports it).
fallbackBooleantrueEnable a full viewport view for older browsers.
+`blankUrl` | String | `https://cdn.plyr.io/static/blank.mp4` | Specify a URL or path to a blank video file used to properly cancel network requests. See [issue #174](#174) for more info. +`autoplay` | Boolean | `false` | Autoplay the media on load. This is generally advised against on UX grounds. It is also disabled by default in some browsers. If the `autoplay` attribute is present on a `