diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-07-15 07:07:48 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-07-15 08:12:26 +0000 |
| commit | fd15ca19183a765e1307c4d197bf0dda30b73ab7 (patch) | |
| tree | 896042073ebc752e8bcf535f21696320c69bbe13 /addons/web_editor/static/src/js | |
| parent | 6b8a0beda65dce688ecd0ee34828097b67a13dab (diff) | |
| parent | 1f5a4649a67908ecb6acfec37673c8149de0471f (diff) | |
[MERGE] Forward port of saas-12.4 to master up to 1f5a4649a67908
closes odoo/odoo#34850
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/wysiwyg/widgets/media.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/media.js b/addons/web_editor/static/src/js/wysiwyg/widgets/media.js index 3f808964beb..b196552709d 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/media.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/media.js @@ -1108,7 +1108,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); @@ -1137,7 +1137,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'); |
