From 33708f2b7bd7b57156710e9bc41bf9599946f4e8 Mon Sep 17 00:00:00 2001 From: Ante Sepic Date: Fri, 24 Aug 2018 15:55:42 +0200 Subject: [PATCH] Fix origin --- src/providers/youtube.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/youtube.js b/src/providers/youtube.js index c840e55..02aa681 100644 --- a/src/providers/youtube.js +++ b/src/providers/youtube.js @@ -94,7 +94,9 @@ export default function( vidim ) { fs: 0, iv_load_policy: 3, modestbranding: 1, - origin: window.location.host, + origin: typeof window.location.origin !== 'undefined' + ? window.location.origin + : `${window.location.protocol}//${window.location.hostname}${(window.location.port ? ':' + window.location.port : '')}`, playsinline: 1, rel: 0, showinfo: 0,