From 4b6e4db7cd1e4017315eb4b0210ff4452cdb3133 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 4 May 2022 20:38:13 +0800 Subject: [PATCH] Disable chapters for mobile for now... - Deemed not useful in mobile, unless you have an S-pen that can hover. - The chapters button (that invokes the chapters popup) would make more sense in Mobile, but we need to deal with the limited controlbar space first (e.g. overflow menu system) --- ui/component/viewers/videoViewer/internal/chapters.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/component/viewers/videoViewer/internal/chapters.jsx b/ui/component/viewers/videoViewer/internal/chapters.jsx index 8e57ac135..27630a228 100644 --- a/ui/component/viewers/videoViewer/internal/chapters.jsx +++ b/ui/component/viewers/videoViewer/internal/chapters.jsx @@ -1,4 +1,6 @@ // @flow +import { platform } from 'util/platform'; + const REQUIRED_DELAY_FOR_IOS_MS = 10; const MIN_SECONDS_BETWEEN_CHAPTERS = 10; const MIN_CHAPTERS = 3; @@ -148,6 +150,11 @@ function load(player: any, timestampData: TimestampData, duration: number) { export function parseAndLoad(player: any, claim: StreamClaim) { console.assert(claim, 'null claim'); + + if (platform.isMobile()) { + return; + } + const tsData = parse(claim); const duration = claim?.value?.video?.duration || claim?.value?.audio?.duration;