Forum Discussion

AlexB1lu's avatar
AlexB1lu
Reel Rookie
3 years ago

Setting subtitleConfig cause video suddenly stops

I've encountered a problem while playing videos. Whenever I switch the subtitles, the video suddenly stops. I'm using the following code to change the subtitle URL for m.videoPlayercontent.subtitleConfig = { trackName: captionURL }. Surprisingly, the logs show that the video is still in the playing state, and the URL seems to be correct.
I wanted  to see if anyone has experienced a similar issue or has any insights into what might be causing this problem. It's worth mentioning that the backend response's manifest </AdaptationSet> contains multiple subtitles, and I have attempted to use the subtitleTracks option in the API.
and I aslo tried using subtitleTrack, but the terminal displays an error stating that it is a nonexistent field (even though I have added this field in the VideoPlayerContentNode).
Your assistance or suggestions would be greatly appreciated. Thank you in advance for your help!

3 Replies

    • AlexB1lu's avatar
      AlexB1lu
      Reel Rookie

      Since my closed caption and language are a custom UI, I have set up the SubtitleTracks before playing the startup video. However, regarding allowing users to change the subtitles during video playback. What code changes do I need to make in order to enable subtitle switching when the user clicks on it?

      • renojim's avatar
        renojim
        Community Streaming Expert

        You shouldn't have to do anything.  The configured subtitle options should show up under "Captioning track" under "Accessibility & captions" when the user presses *.  I have to admit that I've only ever had one captioning track for my own videos, but that's how it's supposed to work.