Allow video to play sound full screen
This commit is contained in:
parent
ca9dd5b469
commit
a80d36227e
|
@ -37,7 +37,7 @@ struct NotificationsTab: View {
|
||||||
Button {
|
Button {
|
||||||
routerPath.presentedSheet = .accountPushNotficationsSettings
|
routerPath.presentedSheet = .accountPushNotficationsSettings
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "bell.badge")
|
Image(systemName: "bell")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ToolbarTab(routerPath: $routerPath)
|
ToolbarTab(routerPath: $routerPath)
|
||||||
|
|
|
@ -2,6 +2,7 @@ import Models
|
||||||
import Nuke
|
import Nuke
|
||||||
import QuickLook
|
import QuickLook
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import AVFoundation
|
||||||
|
|
||||||
public struct MediaUIView: View, @unchecked Sendable {
|
public struct MediaUIView: View, @unchecked Sendable {
|
||||||
private let data: [DisplayData]
|
private let data: [DisplayData]
|
||||||
|
@ -40,11 +41,15 @@ public struct MediaUIView: View, @unchecked Sendable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
try? AVAudioSession.sharedInstance().setCategory(.playback)
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.15) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.15) {
|
||||||
scrolledItem = initialItem
|
scrolledItem = initialItem
|
||||||
isFocused = true
|
isFocused = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onDisappear {
|
||||||
|
try? AVAudioSession.sharedInstance().setCategory(.ambient)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue