-
Notifications
You must be signed in to change notification settings - Fork 2
Improvement/migrate interceptor #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| return subtitlem3u8.data(using: .utf8) | ||
| } | ||
|
|
||
| fileprivate func getSubtitleManifest(for originalURL: URL) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the first is entry is taken into account. I will add that as a limitation.
dfdf8a6 to
c2fd5f0
Compare
No description provided.