diff --git a/README.md b/README.md index 895daca7..bdd9fdf3 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Feature | LGPL | GPL | |Annex-B async hardware decoding(Live Stream)|✅|❌| |Use the fonts in the video to render subtitles|✅|❌| |Use memory cache for fast seek in short time range|✅|❌| +|Offline AI real-time subtitle generation and translation|✅|❌| |Full display of ass subtitles effect(Render as image using libass)|✅|❌| |Play videos in a small window in the App (resumable, supports tvos and ios)|✅|❌| |FFmpeg version|7.0.2|6.1.0| diff --git a/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift b/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift index c40e548d..8add7d58 100644 --- a/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift +++ b/Sources/KSPlayer/AVPlayer/KSPlayerLayer.swift @@ -689,6 +689,7 @@ extension KSPlayerLayer { switch type { case .began: pause() + case .ended: // An interruption ended. Resume playback, if appropriate. diff --git a/Sources/KSPlayer/MEPlayer/AudioGraphPlayer.swift b/Sources/KSPlayer/MEPlayer/AudioGraphPlayer.swift index afafcaee..610ee571 100644 --- a/Sources/KSPlayer/MEPlayer/AudioGraphPlayer.swift +++ b/Sources/KSPlayer/MEPlayer/AudioGraphPlayer.swift @@ -165,8 +165,8 @@ public final class AudioGraphPlayer: AudioOutput, AudioDynamicsProcessor { var audioStreamBasicDescription = audioFormat.formatDescription.audioStreamBasicDescription let audioStreamBasicDescriptionSize = UInt32(MemoryLayout.size) let channelLayout = audioFormat.channelLayout?.layout - [audioUnitForTimePitch, audioUnitForDynamicsProcessor, audioUnitForMixer, audioUnitForOutput].forEach { unit in - guard let unit else { return } + for unit in [audioUnitForTimePitch, audioUnitForDynamicsProcessor, audioUnitForMixer, audioUnitForOutput] { + guard let unit else { continue } AudioUnitSetProperty(unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, diff --git a/Sources/KSPlayer/MEPlayer/Model.swift b/Sources/KSPlayer/MEPlayer/Model.swift index 241b58ea..15766265 100644 --- a/Sources/KSPlayer/MEPlayer/Model.swift +++ b/Sources/KSPlayer/MEPlayer/Model.swift @@ -110,7 +110,6 @@ public extension KSOptions { } else { return CGColorSpace(name: CGColorSpace.itur_2020) } - default: return CGColorSpace(name: CGColorSpace.sRGB) }