aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demo/src/js/demo.js3
-rw-r--r--readme.md1
-rw-r--r--src/js/config/defaults.js9
-rw-r--r--src/js/plugins/vimeo.js10
4 files changed, 18 insertions, 5 deletions
diff --git a/demo/src/js/demo.js b/demo/src/js/demo.js
index e4dabde6..7cc22434 100644
--- a/demo/src/js/demo.js
+++ b/demo/src/js/demo.js
@@ -85,6 +85,9 @@ import Raven from 'raven-js';
'https://cdn.plyr.io/static/demo/thumbs/240p.vtt',
],
},
+ vimeo: {
+ transparent: true,
+ },
});
// Expose for tinkering in the console
diff --git a/readme.md b/readme.md
index 86537481..50a81bd0 100644
--- a/readme.md
+++ b/readme.md
@@ -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. |
| `ads` | Object | `{ enabled: false, publisherId: '' }` | `enabled`: Whether to enable vi.ai ads. `publisherId`: Your unique vi.ai 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. |
+| `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. |
1. Vimeo only
diff --git a/src/js/config/defaults.js b/src/js/config/defaults.js
index 14019ca2..1891074d 100644
--- a/src/js/config/defaults.js
+++ b/src/js/config/defaults.js
@@ -413,6 +413,15 @@ const defaults = {
previewThumbnails: {
enabled: false,
},
+
+ // Vimeo plugin
+ vimeo: {
+ byline: false,
+ portrait: false,
+ title: false,
+ speed: true,
+ transparent: false,
+ },
};
export default defaults;
diff --git a/src/js/plugins/vimeo.js b/src/js/plugins/vimeo.js
index c0bcf8af..5fcd9ac8 100644
--- a/src/js/plugins/vimeo.js
+++ b/src/js/plugins/vimeo.js
@@ -70,11 +70,11 @@ const vimeo = {
loop: player.config.loop.active,
autoplay: player.autoplay,
muted: player.muted,
- byline: false,
- portrait: false,
- title: false,
- speed: true,
- transparent: 0,
+ byline: player.config.vimeo.byline,
+ portrait: player.config.vimeo.portrait,
+ title: player.config.vimeo.title,
+ speed: player.config.vimeo.speed,
+ transparent: player.config.vimeo.transparent === true ? 1 : 0,
gesture: 'media',
playsinline: !this.config.fullscreen.iosNative,
};