feat: add new preference to unmute videos by default (#3218)
This commit is contained in:
parent
60b1d0224c
commit
41379627b5
4 changed files with 12 additions and 2 deletions
|
@ -71,6 +71,7 @@ const isVideo = computed(() => attachment.type === 'video')
|
|||
const isGif = computed(() => attachment.type === 'gifv')
|
||||
|
||||
const enableAutoplay = usePreferences('enableAutoplay')
|
||||
const unmuteVideos = usePreferences('unmuteVideos')
|
||||
|
||||
useIntersectionObserver(video, (entries) => {
|
||||
const ready = video.value?.dataset.ready === 'true'
|
||||
|
@ -132,7 +133,7 @@ watch(shouldLoadAttachment, () => {
|
|||
ref="video"
|
||||
preload="none"
|
||||
:poster="videoThumbnail"
|
||||
muted
|
||||
:muted="!unmuteVideos"
|
||||
loop
|
||||
playsinline
|
||||
:controls="shouldLoadAttachment"
|
||||
|
@ -172,7 +173,7 @@ watch(shouldLoadAttachment, () => {
|
|||
ref="video"
|
||||
preload="none"
|
||||
:poster="videoThumbnail"
|
||||
muted
|
||||
:muted="!unmuteVideos"
|
||||
loop
|
||||
playsinline
|
||||
rounded-lg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue