Merge pull request #1319 from fanmio/issues/1316-allow-to-customize-vimeo-url-params
Adds options for vimeo plugin #1316
This commit is contained in:
		| @ -85,6 +85,9 @@ import Raven from 'raven-js'; | |||||||
|                         'https://cdn.plyr.io/static/demo/thumbs/240p.vtt', |                         'https://cdn.plyr.io/static/demo/thumbs/240p.vtt', | ||||||
|                     ], |                     ], | ||||||
|                 }, |                 }, | ||||||
|  |                 vimeo: { | ||||||
|  |                     transparent: true, | ||||||
|  |                 }, | ||||||
|             }); |             }); | ||||||
|  |  | ||||||
|             // Expose for tinkering in the console |             // Expose for tinkering in the console | ||||||
|  | |||||||
| @ -335,6 +335,7 @@ Note the single quotes encapsulating the JSON and double quotes on the object ke | |||||||
| | `loop`               | Object                     | `{ active: false }`                                                                                                            | `active`: Whether to loop the current video. If the `loop` attribute is present on a `<video>` or `<audio>` element, this will be automatically set to true This is an object to support future functionality.                                                                                                                                                         | | | `loop`               | Object                     | `{ active: false }`                                                                                                            | `active`: Whether to loop the current video. If the `loop` attribute is present on a `<video>` or `<audio>` element, this will be automatically set to true This is an object to support future functionality.                                                                                                                                                         | | ||||||
| | `ads`                | Object                     | `{ enabled: false, publisherId: '' }`                                                                                          | `enabled`: Whether to enable advertisements. `publisherId`: Your unique [vi.ai](https://vi.ai/publisher-video-monetization/?aid=plyrio) publisher ID.                                                                                                                                                                                                                  | | | `ads`                | Object                     | `{ enabled: false, publisherId: '' }`                                                                                          | `enabled`: Whether to enable advertisements. `publisherId`: Your unique [vi.ai](https://vi.ai/publisher-video-monetization/?aid=plyrio) publisher ID.                                                                                                                                                                                                                  | | ||||||
| | `urls`               | Object                     | See source.                                                                                                                    | If you wish to override any API URLs then you can do so here. You can also set a custom download URL for the download button.                                                                                                                                                                                                                                          | | | `urls`               | Object                     | See source.                                                                                                                    | If you wish to override any API URLs then you can do so here. You can also set a custom download URL for the download button.                                                                                                                                                                                                                                          | | ||||||
|  | | `vimeo`               | Object                     | `{ byline: false, portrait: false, title: false, speed: true, transparent: false }`                                                                                                                    | `byline`: Wheather to show the vimeo uploader. `portrait`: Wheather to show the vimeo portrait (avatar). `title`: Wheather to show the vimeo title. `speed`: Wheather to show speed controls. `transparent`: Makes the background transparent. Might be helpful to add your custom styles.                                                                                                                                                                                                                                          | | ||||||
| | `previewThumbnails`  | Object                     | `{ enabled: false, src: '' }`                                                                                                  | `enabled`: Whether to enable the preview thumbnails (they must be generated by you). `src` must be either a string or an array of strings representing URLs for the VTT files containing the image URL(s). Learn more about [preview thumbnails](#preview-thumbnails) below.                                                                                           | | | `previewThumbnails`  | Object                     | `{ enabled: false, src: '' }`                                                                                                  | `enabled`: Whether to enable the preview thumbnails (they must be generated by you). `src` must be either a string or an array of strings representing URLs for the VTT files containing the image URL(s). Learn more about [preview thumbnails](#preview-thumbnails) below.                                                                                           | | ||||||
|  |  | ||||||
| 1.  Vimeo only | 1.  Vimeo only | ||||||
|  | |||||||
| @ -415,6 +415,15 @@ const defaults = { | |||||||
|         enabled: false, |         enabled: false, | ||||||
|         src: '', |         src: '', | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
|  |     // Vimeo plugin | ||||||
|  |     vimeo: { | ||||||
|  |         byline: false, | ||||||
|  |         portrait: false, | ||||||
|  |         title: false, | ||||||
|  |         speed: true, | ||||||
|  |         transparent: false, | ||||||
|  |     }, | ||||||
| }; | }; | ||||||
|  |  | ||||||
| export default defaults; | export default defaults; | ||||||
|  | |||||||
| @ -70,11 +70,11 @@ const vimeo = { | |||||||
|             loop: player.config.loop.active, |             loop: player.config.loop.active, | ||||||
|             autoplay: player.autoplay, |             autoplay: player.autoplay, | ||||||
|             muted: player.muted, |             muted: player.muted, | ||||||
|             byline: false, |             byline: player.config.vimeo.byline, | ||||||
|             portrait: false, |             portrait: player.config.vimeo.portrait, | ||||||
|             title: false, |             title: player.config.vimeo.title, | ||||||
|             speed: true, |             speed: player.config.vimeo.speed, | ||||||
|             transparent: 0, |             transparent: player.config.vimeo.transparent === true ? 1 : 0, | ||||||
|             gesture: 'media', |             gesture: 'media', | ||||||
|             playsinline: !this.config.fullscreen.iosNative, |             playsinline: !this.config.fullscreen.iosNative, | ||||||
|         }; |         }; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user