feat(media): port MediaViewer ratings and visible-only tag counts
MediaViewer committed these changes to its vendored shared copy
(e83afad, ca8a89e) without upstreaming them, so the next shared sync
would have removed them from MediaViewer and broken its build.
Ported here as a three-way merge against 74942e5, the snapshot
MediaViewer last synced from:
- media.MediaRecord.Rating, read in FindMedia and returned by ToJSON,
with the rating column added in migrate.go
- tagSuggestions counts media items through the library's visibility
rules instead of raw media_tags rows
- MediaPlayer autoplayMuted prop (defaults to false, so existing
callers are unaffected)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
61d8da5fb3
commit
60befcd883
3 files changed
+26
-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