mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-21 23:26:12 +00:00
VideoOverlay: add controls
option (#9666)
This commit is contained in:
@ -32,6 +32,7 @@
|
|||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
interactive: true,
|
interactive: true,
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
|
controls: true,
|
||||||
loop: true,
|
loop: true,
|
||||||
muted: true,
|
muted: true,
|
||||||
playsInline: true
|
playsInline: true
|
||||||
|
@ -31,6 +31,10 @@ export const VideoOverlay = ImageOverlay.extend({
|
|||||||
// On some browsers autoplay will only work with `muted: true`
|
// On some browsers autoplay will only work with `muted: true`
|
||||||
autoplay: 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
|
// @option loop: Boolean = true
|
||||||
// Whether the video will loop back to the beginning when played.
|
// Whether the video will loop back to the beginning when played.
|
||||||
loop: true,
|
loop: true,
|
||||||
@ -76,6 +80,7 @@ export const VideoOverlay = ImageOverlay.extend({
|
|||||||
vid.style['objectFit'] = 'fill';
|
vid.style['objectFit'] = 'fill';
|
||||||
}
|
}
|
||||||
vid.autoplay = !!this.options.autoplay;
|
vid.autoplay = !!this.options.autoplay;
|
||||||
|
vid.controls = !!this.options.controls;
|
||||||
vid.loop = !!this.options.loop;
|
vid.loop = !!this.options.loop;
|
||||||
vid.muted = !!this.options.muted;
|
vid.muted = !!this.options.muted;
|
||||||
vid.playsInline = !!this.options.playsInline;
|
vid.playsInline = !!this.options.playsInline;
|
||||||
|
Reference in New Issue
Block a user