mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Improve bookmarks loading
This commit is contained in:
parent
eb9924bd4a
commit
ccded28468
@ -130,13 +130,8 @@ final class AVPlayerBackend: PlayerBackend {
|
|||||||
if var url = stream.singleAssetURL {
|
if var url = stream.singleAssetURL {
|
||||||
model.logger.info("playing stream with one asset\(stream.kind == .hls ? " (HLS)" : ""): \(url)")
|
model.logger.info("playing stream with one asset\(stream.kind == .hls ? " (HLS)" : ""): \(url)")
|
||||||
|
|
||||||
if video.isLocal, video.localStreamIsFile, let localURL = video.localStream?.localURL {
|
if video.isLocal, video.localStreamIsFile {
|
||||||
guard localURL.startAccessingSecurityScopedResource() else {
|
_ = url.startAccessingSecurityScopedResource()
|
||||||
model.navigation.presentAlert(title: "Could not open file")
|
|
||||||
model.closeCurrentItem()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
url = localURL
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadSingleAsset(url, stream: stream, of: video, preservingTime: preservingTime)
|
loadSingleAsset(url, stream: stream, of: video, preservingTime: preservingTime)
|
||||||
|
@ -290,12 +290,8 @@ final class MPVBackend: PlayerBackend {
|
|||||||
startPlaying()
|
startPlaying()
|
||||||
}
|
}
|
||||||
|
|
||||||
if video.isLocal, video.localStreamIsFile, let localStream = video.localStream {
|
if video.isLocal, video.localStreamIsFile {
|
||||||
guard localStream.localURL.startAccessingSecurityScopedResource() else {
|
_ = url.startAccessingSecurityScopedResource()
|
||||||
self.model.navigation.presentAlert(title: "Could not open file")
|
|
||||||
self.model.closeCurrentItem()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self.client.loadFile(url, sub: captions?.url, time: time, forceSeekable: stream.kind == .hls) { [weak self] _ in
|
self.client.loadFile(url, sub: captions?.url, time: time, forceSeekable: stream.kind == .hls) { [weak self] _ in
|
||||||
|
Loading…
Reference in New Issue
Block a user