feat: add toggle to show NSFW content by default

This commit is contained in:
codytseng 2025-08-14 22:56:44 +08:00
parent 352eecc416
commit cb2ad30b1d
23 changed files with 108 additions and 55 deletions

View file

@ -1,10 +1,10 @@
import { cn, isInViewport } from '@/lib/utils'
import { useAutoplay } from '@/providers/AutoplayProvider'
import { useContentPolicy } from '@/providers/ContentPolicyProvider'
import mediaManager from '@/services/media-manager.service'
import { useEffect, useRef } from 'react'
export default function VideoPlayer({ src, className }: { src: string; className?: string }) {
const { autoplay } = useAutoplay()
const { autoplay } = useContentPolicy()
const videoRef = useRef<HTMLVideoElement>(null)
const containerRef = useRef<HTMLDivElement>(null)