From 15cd255839b538d4ed00a0f924ac6fee3cfc863b Mon Sep 17 00:00:00 2001 From: shiyiya Date: Sun, 23 Oct 2022 23:23:47 +0800 Subject: [PATCH] . --- packages/ui/src/components/Progress.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/components/Progress.ts b/packages/ui/src/components/Progress.ts index 291d9d9a..450b5068 100644 --- a/packages/ui/src/components/Progress.ts +++ b/packages/ui/src/components/Progress.ts @@ -29,11 +29,12 @@ const render = (player: Player, el: HTMLElement, config: UiConfig) => { ` ) + const firstElement = $dom.firstElementChild! as HTMLDivElement const { init: initThumbnail, update: thumbnailUpdater } = config.thumbnails?.isVTT - ? renderVTTThumbnail(player, $dom.firstChild, config.thumbnails) - : renderThumbnail(player, $dom.firstChild, config.thumbnails) + ? renderVTTThumbnail(player, firstElement, config.thumbnails) + : renderThumbnail(player, firstElement, config.thumbnails) - renderHighlight(player, $dom.firstChild, config.highlight) + renderHighlight(player, firstElement, config.highlight) const $buffered = $dom.querySelector(`.${buffered}`)! const $played = $dom.querySelector(`.${played}`)!