From 55e6924b822417940f7aae2075acae3492684bbb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 3 Apr 2019 03:19:24 +0300 Subject: YouTube embed API: trying to prevent errors on old browsers --- src/main/assets/embed.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/assets/embed.js b/src/main/assets/embed.js index 02c48038..48473764 100644 --- a/src/main/assets/embed.js +++ b/src/main/assets/embed.js @@ -205,7 +205,11 @@ function getEmbeddableLinkTypes() { .split('&') .map(s => s.split('=')) .forEach(z => pp[z[0]] = z[1]); - let embedArgs = { rel: '0' }; + let embedArgs = { + rel: '0', + enablejsapi: '1', + origin: `${window.location.protocol}//${window.location.host}` + }; if (pp.t) { const tre = /^(?:(\d+)|(?:(\d+)h)?(?:(\d+)m)?(\d+)s|(?:(\d+)h)?(\d+)m|(\d+)h)$/i; let [, t, h, m, s, h1, m1, h2] = tre.exec(pp.t); -- cgit v1.2.3