Skip to content
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

Sideloaded text tracks & include text track info in onLoad #1063

Merged
merged 9 commits into from
Jun 13, 2018

Conversation

cobarx
Copy link
Contributor

@cobarx cobarx commented Jun 12, 2018

This adds the ability to sideload text tracks in Android ExoPlayer. Text tracks must be loaded at the same time the source is set, adding text tracks later will cause the video to reload.

Unfortunately, iOS doesn't support sideloading text tracks without using additional dependencies.

The format for specifying text tracks is:

textTracks={[
  {
    index: 0
    title: "English CC",
    language: "en",
    type: "text/vtt",
    uri: "..."
  },
  {
    index: 1
    title: "Spanish Subtitles",
    language: "es",
    type: "application/x-subrip",
    uri: "..."
  }
]}

Sideloaded text tracks can co-exist side-by-side with embedded captions or captions loaded in an HLS playlist.

Text tracks are also reported as part of the onLoad payload in the textTracks payload. This is support on iOS & Android ExoPlayer.

I will add documentation for this shortly.

@cobarx cobarx merged commit 20aae50 into master Jun 13, 2018
@cobarx cobarx deleted the feature/sidecar-text-tracks branch June 13, 2018 04:23
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.

1 participant