From 87c94e3c1c2cd33568e9d02af8606cf3a7f0abb4 Mon Sep 17 00:00:00 2001 From: mayeaux Date: Fri, 10 Jun 2022 18:18:58 +0200 Subject: [PATCH] Reuse videojs instance between video reload, return mobile UI plugin for iOS (#1512) * add mobile plugin back on ios * further touchups and fix ios * finish mobile functionality * dont show big play button on mobile * remove logs * proof of concept * dont go full screen on rotate * add back functionality * replace dispose event with navigate away * bugfix * turn off show if you liked button and nag only on homepage * add back old functionality * ending event not working * test here * working but needs cleanup * more player touchups * bugfix * add settings button on mobile * more touchups * more cleanups * touchup loading functionality * fix hover thumbnails * touchup and eslint fix * fix repopulation bug * change recsys event name * bugfix events * change the way buttons are removed and added * finish chapters button * refactor to use videojs methods * refactor to fix autoplay next * ux touchups * seems to be behaving properly * control bar behaving how it should * fix control bar on ios * working on flow and eslint errors * bugfix and flow fixes * bring back nudge * fix playlist button bug * remove chapter markers properly * show big play button * bugfix recsys closed event * fix analytics bug * fix embeds * bugfix * possible bugfix for kp * bugfix playlist buttons * fix issue with mobile ui plugin * fix firefox autoplay issue * fix bug for play on floating player closed * bugfix volume control for ios * instantiate new player if switching between claim types * fix flow and lint errors * fix control bar not showing up when switching sources * dispose old player if recreating * bugfix save position * reset recsys data between videos * fix audio upload posters * clear claimSrcVhs on reload * bugfix errant image previews showing up * reset player value of having already switched quality * fix watch position not being used * bugfix switching between sources not perserving position * fix save position bug * fix playlist buttons * bugfix * code cleanup and add back 5 second feature --- ui/component/fileReactions/view.jsx | 4 +- ui/component/nagLocaleSwitch/view.jsx | 1 + .../viewers/videoViewer/internal/chapters.jsx | 18 + .../internal/effects/use-autoplay-next.js | 6 +- .../internal/effects/use-theater-mode.js | 8 +- .../viewers/videoViewer/internal/play-next.js | 6 +- .../videoViewer/internal/play-previous.js | 6 +- .../internal/plugins/canAutoplay.js | 2086 ----------------- .../videojs-hls-quality-selector/plugin.js | 17 +- .../plugins/videojs-mobile-ui/plugin.js | 15 +- .../internal/plugins/videojs-recsys/plugin.js | 2 +- .../videoViewer/internal/videojs-events.jsx | 37 +- .../internal/videojs-functions.jsx | 2 +- .../viewers/videoViewer/internal/videojs.jsx | 255 +- ui/component/viewers/videoViewer/view.jsx | 172 +- ui/scss/component/_videojs.scss | 15 +- yarn.lock | 1 + 17 files changed, 388 insertions(+), 2263 deletions(-) delete mode 100644 ui/component/viewers/videoViewer/internal/plugins/canAutoplay.js diff --git a/ui/component/fileReactions/view.jsx b/ui/component/fileReactions/view.jsx index dac668856..736b2e4f8 100644 --- a/ui/component/fileReactions/view.jsx +++ b/ui/component/fileReactions/view.jsx @@ -97,12 +97,12 @@ export default function FileReactions(props: Props) { return ( <> - {channelTitle && !isCollection && ( + {channelTitle && !isCollection && ( - )} + )}