Skip to content

Conversation

@therama
Copy link
Contributor

@therama therama commented Dec 3, 2025

No description provided.

return subtitlem3u8.data(using: .utf8)
}

fileprivate func getSubtitleManifest(for originalURL: URL) -> String {
Copy link
Contributor

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.

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)
Copy link
Contributor

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants