diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-07-04 18:57:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-07-04 18:57:17 +0200 |
| commit | 7b74f4ca9a165a697853079d11d105eebc1f0cf9 (patch) | |
| tree | 077737d05893b3e25dd6092dc914076e143f60d3 /addons/web_editor/static/src/js/widgets/widgets.js | |
| parent | 789aa140b96226718bfecc52ec2fe33273e31d3f (diff) | |
| parent | 1debaa89f14cf662c43744b5cefb476f10eb8a93 (diff) | |
[MERGE] forward port branch saas-11.3 up to 1debaa89f14
Diffstat (limited to 'addons/web_editor/static/src/js/widgets/widgets.js')
| -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 af89b122732..f7d5e3f74c9 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -938,7 +938,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); @@ -967,7 +967,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'); |
