Skip to content

[bug]Updates ios setCurrentCaptions to implement correctly #100

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

Merged

Conversation

Sccttt
Copy link
Contributor

@Sccttt Sccttt commented Nov 6, 2024

What does this Pull Request do?

Switches setCurrentCaptions to use setCaptionTrack(index:) instead of currentCaptionsTrack = index. This is what JWPlayer’s docs say to use. https://sdk.jwplayer.com/ios/v4/reference/Protocols/JWPlayerProtocol.html#/c:@M@JWPlayerKit@objc(pl)JWPlayerProtocol(im)setCaptionTrackWithIndex:error:

Why is this Pull Request needed?

The old way didn’t match their official docs, so this should be more correct and less likely to break.

Anything to double-check?

Make sure try is used right for the setCaptionTrack method, since it can throw errors.

Any related PRs?

Nope.

@Sccttt Sccttt requested a review from a team as a code owner November 6, 2024 17:07
@Sccttt Sccttt changed the title Updates ios setCurrentCaptions to implement correctly [bug]Updates ios setCurrentCaptions to implement correctly Nov 6, 2024
Copy link
Collaborator

@edougher edougher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current implementation does not render the captions for subsequent playlist items.
This Pr addresses this. I tested it and with the requested changes it works as expected.

@Jmilham21 Jmilham21 merged commit 62c8df0 into jwplayer:master Nov 15, 2024
@Sccttt Sccttt deleted the bug/ios-set-current-captions-not-working branch November 18, 2024 16:34
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.

3 participants