feat: extend media library controls and playback
- Add safe CarrierNode media deletion and rating support - Count tag suggestions across visible, processed media - Support muted autoplay in MediaPlayer
This commit is contained in:
1 parent
5d9e3063c5
commit
0c4dc3aacb
5 files changed
+161
-4
No files matched your search
@@ -13,6 +13,7 @@
|
||||
poster = '',
|
||||
title = '',
|
||||
autoplay = false,
|
||||
autoplayMuted = false,
|
||||
class: className = '',
|
||||
mediaClass = '',
|
||||
showSeekButtons: _showSeekButtons = true,
|
||||
@@ -41,6 +42,8 @@
|
||||
poster?: string
|
||||
title?: string
|
||||
autoplay?: boolean
|
||||
/** Start autoplaying video muted, so browser autoplay policies allow playback. */
|
||||
autoplayMuted?: boolean
|
||||
class?: string
|
||||
mediaClass?: string
|
||||
/** @deprecated Seeking is available with the arrow keys and mobile double-tap. */
|
||||
@@ -291,6 +294,7 @@
|
||||
$effect(() => {
|
||||
const nextSource = src
|
||||
if (!mediaElement || !nextSource) return
|
||||
if (!audio && autoplay && autoplayMuted) mediaElement.muted = true
|
||||
mediaElement.load()
|
||||
if (autoplay) void mediaElement.play().catch(() => undefined)
|
||||
})
|
||||
@@ -361,6 +365,7 @@
|
||||
{src}
|
||||
{poster}
|
||||
{autoplay}
|
||||
muted={autoplay && autoplayMuted}
|
||||
preload="auto"
|
||||
playsinline
|
||||
tabindex="0"
|
||||
|
||||
Reference in new issue
Block a user