diff --git a/DarockBili Watch App/Video/AudioPlayerView.swift b/DarockBili Watch App/Video/AudioPlayerView.swift index 6886c83b4..3f28ba252 100644 --- a/DarockBili Watch App/Video/AudioPlayerView.swift +++ b/DarockBili Watch App/Video/AudioPlayerView.swift @@ -175,7 +175,7 @@ struct AudioPlayerView: View { .onAppear { // Background Session do { - try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [.mixWithOthers]) + try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, policy: .longFormAudio, options: [.duckOthers]) try AVAudioSession.sharedInstance().setActive(true) } catch { print(error) diff --git a/DarockBili Watch App/Video/VideoDetailView.swift b/DarockBili Watch App/Video/VideoDetailView.swift index f000a2ff0..920861f3f 100644 --- a/DarockBili Watch App/Video/VideoDetailView.swift +++ b/DarockBili Watch App/Video/VideoDetailView.swift @@ -130,9 +130,8 @@ struct VideoDetailView: View { DarockKit.Network.shared.requestJSON("https://api.bilibili.com/x/player/playurl?platform=html5&bvid=\(videoDetails["BV"]!)&cid=\(cid)", headers: headers) { respJson, isSuccess in if !CheckBApiError(from: respJson) { return } VideoDetailView.willPlayVideoLink = respJson["data"]["durl"][0]["url"].string!.replacingOccurrences(of: "\\u0026", with: "&") - //debugPrint(response) VideoDetailView.willPlayVideoBV = videoDetails["BV"]! - isVideoPlayerPresented = true + isNowPlayingPresented = true isLoading = false } }