Skip to content

Commit

Permalink
Merge pull request #839 from zhannao456/fix_local_subtitle
Browse files Browse the repository at this point in the history
fix open local subtitle
  • Loading branch information
kingslay authored Feb 17, 2025
2 parents c8d1b3a + 33d7c21 commit 108240d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/KSPlayer/SwiftUI/KSVideoPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ public struct KSVideoPlayerView: View {

public func openURL(_ url: URL) {
runOnMainThread {
if url.isAudio || url.isMovie {
self.url = url
title = url.lastPathComponent
} else {
if url.isSubtitle {
let info = URLSubtitleInfo(url: url)
playerCoordinator.subtitleModel.selectedSubtitleInfo = info
} else if url.isAudio || url.isMovie {
self.url = url
title = url.lastPathComponent
}
}
}
Expand Down

0 comments on commit 108240d

Please sign in to comment.