diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-07-04 17:35:07 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-07-04 17:35:07 +0200 |
| commit | 1debaa89f14cf662c43744b5cefb476f10eb8a93 (patch) | |
| tree | b23925966cbcb713e3adec503ad4f4926cdfa8cf /addons/web_editor/static/src/js/widgets | |
| parent | 79ef03d4cc07a7e75eba2ca0f9231d841ecf7b8e (diff) | |
| parent | 56ce29e71f75a657d4b518d86c1d7084891e898e (diff) | |
[MERGE] forward port branch 11.0 up to 56ce29e71f7
Diffstat (limited to 'addons/web_editor/static/src/js/widgets')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/widgets.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index d1a5a905651..e621cae3692 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -926,7 +926,7 @@ var VideoWidget = MediaWidget.extend({ return {errorCode: 0}; } - var autoplay = options.autoplay ? '?autoplay=1' : '?autoplay=0'; + var autoplay = options.autoplay ? '?autoplay=1&mute=1' : '?autoplay=0'; if (ytMatch && ytMatch[2].length === 11) { $video.attr('src', '//www.youtube' + (ytMatch[1] || '') + '.com/embed/' + ytMatch[2] + autoplay); @@ -955,7 +955,8 @@ var VideoWidget = MediaWidget.extend({ $video.attr('src', $video.attr('src') + '&rel=0'); } if (options.loop && (ytMatch || vimMatch)) { - $video.attr('src', $video.attr('src') + '&loop=1'); + var videoSrc = _.str.sprintf('%s&loop=1', $video.attr('src')); + $video.attr('src', ytMatch ? _.str.sprintf('%s&playlist=%s', videoSrc, ytMatch[2]) : videoSrc); } if (options.hide_controls && (ytMatch || dmMatch)) { $video.attr('src', $video.attr('src') + '&controls=0'); |
