Mute video player by default

This commit is contained in:
Stanislas Lange 2022-12-31 00:07:42 +01:00
parent 0423351f5d
commit 18bbc96624
No known key found for this signature in database

View file

@ -11,6 +11,7 @@ class VideoPlayerViewModel: ObservableObject {
func preparePlayer() {
player = .init(url: url)
player?.isMuted = true
player?.play()
guard let player else { return }
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime,