Skip to content

Updating video subtitles dynamically #329

Description

@Exelenz9

Hi. I have a problem with setting video subtitles at runtime via React Player.
As I found in docs, subtitles should be set through config -> file -> tracks. When I set them like this it works perfectly:

config={{ file: {
  tracks: [
    {kind: 'subtitles', src: 'subs/subtitles.en.vtt', srcLang: 'en', default: true},
    {kind: 'subtitles', src: 'subs/subtitles.ja.vtt', srcLang: 'ja'},
    {kind: 'subtitles', src: 'subs/subtitles.de.vtt', srcLang: 'de'}
  ]
}}}

However, if I want to set another current subtitles file there is no way to do it. As I understood config is set only once.

Is there any workaround to dynamically update current subtitles?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions