Conversation
| return subtitlem3u8.data(using: .utf8) | ||
| } | ||
|
|
||
| fileprivate func getSubtitleManifest(for originalURL: URL) -> String { |
There was a problem hiding this comment.
I think we are missing a guard in this method (or somewhere up the chain)
Right now (if I see this code correctly), we intercept all SUBTITLE manifest requests and override it.
There was a problem hiding this comment.
I looked into this, and there are no changes in the flow in this refactor. We always intercept yes, but we don't always override it. If we can't find the track description then we return the original.
| public static var sourceWithSideloadedTextTrack: SourceDescription { | ||
| let typedSource = TypedSource(src: "https://sourceURL.com/manifest.m3u8, type: "application/x-mpegurl") | ||
| let textTrack = TextTrackDescription(src: "https://sideloadedurl.com/subtitle.vtt", srclang: "language_code", isDefault: false, kind: .subtitles, label: "Label", format: .WebVTT) | ||
| let textTrack = TextTrackDescription(src: "https://sideloadedurl.com/subtitle.vtt", srclang: "language_code", isDefault: true, kind: .subtitles, label: "Label", format: .WebVTT) |
There was a problem hiding this comment.
did we check the AVplayer behavior in case of 2 DEFAULT=YES subtitles? (most probably one of the already existing subtitles in the manifest could have this set to YES already)
There was a problem hiding this comment.
Only the first is entry is taken into account. I will add that as a limitation.
dfdf8a6 to
c2fd5f0
Compare
No description provided.