diff options
| author | len-odoo <len@odoo.com> | 2018-08-10 08:30:28 +0200 |
|---|---|---|
| committer | len-odoo <35492570+len-odoo@users.noreply.github.com> | 2018-08-10 09:30:41 +0200 |
| commit | 47c7d123da0050cc30d90ba5e983eaa005c18029 (patch) | |
| tree | ddec55a43542a0e5a56986497ad630fb3e8d9ba7 /addons/web_editor/static/src/js | |
| parent | 215754a7db0fb74276e26b9b53c1c5feace1b9a2 (diff) | |
[FIX] web_editor: remove related videos at the end of youtube embeds
If a user embeds a youtube video on his website, he has no option to remove the
suggestion of related videos at the end of playback.
Since there is no good reason to have it, we disable the related videos in all
cases.
opw 1868380
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/widgets/widgets.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index 4bad378490d..fe33e85b3c1 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -820,6 +820,9 @@ var VideoDialog = Widget.extend({ return {errorCode: 1}; } + if (ytMatch) { + $video.attr('src', $video.attr('src') + '&rel=0'); + } if (options.loop && (ytMatch || vimMatch)) { $video.attr('src', $video.attr('src') + '&loop=1'); } |
