aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-03 03:19:24 +0300
committerGravatar Vitaly Takmazov2019-04-03 03:19:24 +0300
commit55e6924b822417940f7aae2075acae3492684bbb (patch)
treef0ef479170965367b0ed69640261cb2c3ffb13b7 /src
parentcebeca61c4c11d8d83afab5de7f4c3f90588029e (diff)
YouTube embed API: trying to prevent errors on old browsers
Diffstat (limited to 'src')
-rw-r--r--src/main/assets/embed.js6
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);