mirror of
https://github.com/dirtydishes/dreamio.git
synced 2026-06-06 13:37:24 +00:00
add captions selection proof logging
This commit is contained in:
parent
d8ebc7c7f9
commit
2cbe982a47
5 changed files with 184 additions and 4 deletions
|
|
@ -100,14 +100,26 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend {
|
|||
|
||||
func selectSubtitleTrack(id: Int32) {
|
||||
#if canImport(MobileVLCKit)
|
||||
#if DEBUG
|
||||
logSubtitleTracks(reason: "before-select-\(id)")
|
||||
#endif
|
||||
mediaPlayer.currentVideoSubTitleIndex = id
|
||||
#if DEBUG
|
||||
logSubtitleTracks(reason: "after-select-\(id)")
|
||||
#endif
|
||||
onSubtitleTracksChange?()
|
||||
#endif
|
||||
}
|
||||
|
||||
func adjustSubtitleDelay(by seconds: TimeInterval) {
|
||||
#if canImport(MobileVLCKit)
|
||||
#if DEBUG
|
||||
print("[DreamioVLC] subtitle delay before=\(subtitleDelay) delta=\(seconds)")
|
||||
#endif
|
||||
mediaPlayer.currentVideoSubTitleDelay += Int(seconds * 1_000_000)
|
||||
#if DEBUG
|
||||
print("[DreamioVLC] subtitle delay after=\(subtitleDelay)")
|
||||
#endif
|
||||
onSubtitleTracksChange?()
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue