mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-08 16:29:24 +00:00
Fix #1841
This commit is contained in:
parent
753a0574b1
commit
4ebe486816
|
@ -19,6 +19,7 @@ import SwiftUI
|
||||||
func preparePlayer(autoPlay: Bool, isCompact: Bool) {
|
func preparePlayer(autoPlay: Bool, isCompact: Bool) {
|
||||||
player = .init(url: url)
|
player = .init(url: url)
|
||||||
player?.audiovisualBackgroundPlaybackPolicy = .pauses
|
player?.audiovisualBackgroundPlaybackPolicy = .pauses
|
||||||
|
player?.preventsDisplaySleepDuringVideoPlayback = false
|
||||||
if (autoPlay || forceAutoPlay) && !isCompact {
|
if (autoPlay || forceAutoPlay) && !isCompact {
|
||||||
player?.play()
|
player?.play()
|
||||||
isPlaying = true
|
isPlaying = true
|
||||||
|
|
Loading…
Reference in a new issue