diff options
author | Vitaly Takmazov | 2019-04-03 03:19:24 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-04-03 03:19:24 +0300 |
commit | 55e6924b822417940f7aae2075acae3492684bbb (patch) | |
tree | f0ef479170965367b0ed69640261cb2c3ffb13b7 /src | |
parent | cebeca61c4c11d8d83afab5de7f4c3f90588029e (diff) |
YouTube embed API: trying to prevent errors on old browsers
Diffstat (limited to 'src')
-rw-r--r-- | src/main/assets/embed.js | 6 |
1 files changed, 5 insertions, 1 deletions
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); |