mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-20 16:37:08 +00:00
VideoOverlay: add controls
option (#9666)
This commit is contained in:
@ -32,6 +32,7 @@
|
||||
opacity: 0.8,
|
||||
interactive: true,
|
||||
autoplay: true,
|
||||
controls: true,
|
||||
loop: true,
|
||||
muted: true,
|
||||
playsInline: true
|
||||
|
@ -31,6 +31,10 @@ export const VideoOverlay = ImageOverlay.extend({
|
||||
// On some browsers autoplay will only work with `muted: true`
|
||||
autoplay: true,
|
||||
|
||||
// @option loop: Boolean = false
|
||||
// Whether the browser will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback.
|
||||
controls: false,
|
||||
|
||||
// @option loop: Boolean = true
|
||||
// Whether the video will loop back to the beginning when played.
|
||||
loop: true,
|
||||
@ -76,6 +80,7 @@ export const VideoOverlay = ImageOverlay.extend({
|
||||
vid.style['objectFit'] = 'fill';
|
||||
}
|
||||
vid.autoplay = !!this.options.autoplay;
|
||||
vid.controls = !!this.options.controls;
|
||||
vid.loop = !!this.options.loop;
|
||||
vid.muted = !!this.options.muted;
|
||||
vid.playsInline = !!this.options.playsInline;
|
||||
|
Reference in New Issue
Block a user