diff --git a/readme.md b/readme.md index f71e6ec2..444d2f83 100644 --- a/readme.md +++ b/readme.md @@ -205,7 +205,7 @@ The constructor will return a Plyr object that can be used with the [API](#api) Options can be passed as an object to the constructor as above or as JSON in `data-plyr` attribute on each of your target elements: ```html - + ``` Note the single quotes encapsulating the JSON and double quotes on the object keys. Only string values need double quotes. @@ -213,6 +213,15 @@ Note the single quotes encapsulating the JSON and double quotes on the object ke Option | Type | Default | Description ------ | ---- | ------- | ----------- `enabled` | Boolean | `true` | Completely disable Plyr. This would allow you to do a User Agent check or similar to programmatically enable or disable Plyr for a certain UA. Example below. +`debug` | Boolean | `false` | Display debugging information in the console +`controls` | Function or Array | ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen' ] | If a function is passed, it is assumed your method will return a string of HTML for the controls. Three arguments will be passed to your function; id (the unique id for the player), seektime (the seektime step in seconds), and title (the media title). See [controls.md](controls.md) for more info on how the html needs to be structured. +`settings` | Array | ['captions', 'quality', 'speed', 'loop'] | If you're using the default controls are used then you can specify which settings to show in the menu +`i18n` | Object | See [defaults.js](/src/js/defaults.js) | Used for internationalization (i18n) of the tooltips/labels within the buttons. +`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. + + @@ -224,60 +233,12 @@ Option | Type | Default | Description - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
enabledBooleantrueCompletely disable Plyr. This would allow you to do a User Agent check or similar to programmatically enable or disable Plyr for a certain UA. Example below.
htmlStringSee controls.mdSee controls.md for more info on how the html needs to be structured.
controlsArray['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'fullscreen']Toggle which control elements you would like to display when using the default controls html. If you specify a html option, this is redundant. The default value is to display everything.
i18nObjectSee controls.mdUsed for internationalization (i18n) of the tooltips/labels within the buttons.
loadSpriteBooleantrueLoad the SVG sprite specified as the iconUrl option (if a URL). If false, it is assumed you are handling sprite loading yourself.
iconUrlStringnullSpecify a URL or path to the SVG sprite. See the SVG section for more info.
iconPrefixStringplyrSpecify 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.
blankUrl String https://cdn.selz.com/plyr/blank.mp4 Specify a URL or path to a blank video file used to properly cancel network requests. See issue #174 for more info.
debugBooleanfalseDisplay debugging information on what Plyr is doing.
autoplay Boolean