mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-02 13:19:45 +00:00
UBERF-9374 Disable HLS preload and hide loading spinner (#7992)
Some checks failed
CI / build (push) Has been cancelled
CI / uitest (push) Has been cancelled
CI / uitest-pg (push) Has been cancelled
CI / uitest-qms (push) Has been cancelled
CI / svelte-check (push) Has been cancelled
CI / formatting (push) Has been cancelled
CI / test (push) Has been cancelled
CI / docker-build (push) Has been cancelled
CI / dist-build (push) Has been cancelled
Some checks failed
CI / build (push) Has been cancelled
CI / uitest (push) Has been cancelled
CI / uitest-pg (push) Has been cancelled
CI / uitest-qms (push) Has been cancelled
CI / svelte-check (push) Has been cancelled
CI / formatting (push) Has been cancelled
CI / test (push) Has been cancelled
CI / docker-build (push) Has been cancelled
CI / dist-build (push) Has been cancelled
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
f904f263ab
commit
3a5fbf6d6e
@ -31,10 +31,16 @@
|
||||
const meta = await getVideoMeta(value, name)
|
||||
if (meta != null && meta.status === 'ready' && HLS.isSupported()) {
|
||||
hls?.destroy()
|
||||
hls = new HLS()
|
||||
hls = new HLS({ autoStartLoad: false })
|
||||
hls.loadSource(meta.hls)
|
||||
hls.attachMedia(video)
|
||||
|
||||
video.poster = meta.thumbnail
|
||||
video.onplay = () => {
|
||||
// autoStartLoad disables autoplay, so we need to enable it manually
|
||||
video.onplay = null
|
||||
hls.startLoad()
|
||||
}
|
||||
} else {
|
||||
video.src = src
|
||||
}
|
||||
@ -64,3 +70,13 @@
|
||||
>
|
||||
<track kind="captions" label={name} />
|
||||
</video>
|
||||
|
||||
<style lang="scss">
|
||||
video::-webkit-media-controls {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
video::-webkit-media-controls-enclosure {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user