From 2dce484a2aa6403968367e0001e505c09ba07ed3 Mon Sep 17 00:00:00 2001 From: piotrruss Date: Sun, 19 Sep 2021 13:31:30 +0200 Subject: video playinline param added --- app.js | 4 ++-- apps/Player/components/Video.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 37ec8e2..70ded1f 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,5 @@ const { createServer } = require('http') -const { URL } = require('url') +const { parse } = require('url') const next = require('next') const dev = process.env.NODE_ENV !== 'production' @@ -10,7 +10,7 @@ app.prepare().then(() => { createServer((req, res) => { // Be sure to pass `true` as the second argument to `url.parse`. // This tells it to parse the query portion of the URL. - const parsedUrl = new URL(req.url, true) + const parsedUrl = parse(req.url, true) const { pathname, query } = parsedUrl if (pathname === '/a') { diff --git a/apps/Player/components/Video.js b/apps/Player/components/Video.js index 7028f1f..e1f4c0b 100644 --- a/apps/Player/components/Video.js +++ b/apps/Player/components/Video.js @@ -53,6 +53,8 @@ const Video = ({ playlist, current, setCurrent, audioOnly = false, setDetails }) ref={videoEl} key={data.id} controls + playsInline + webkit-playsInline autoPlay style={audioOnly ? { backgroundImage: 'url(' + playlist[current].thumbnail + ')' } : {}} > -- cgit v1.2.3