Text-Tracks not parsed on iOS
See original GitHub issueBug
Subtitles listed in textTracks are null when utilizing version 6.0.0-alpha.1. This issue does not exist on the latest stable release 5.2.0.
Platform
Tested on iPhone 12 Simulator
Environment info
Library version: 6.0.0-alpha.1
Steps To Reproduce
Fetch the available textTracks from data provided via the onLoad-Event.
Video sample
https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8
Issue Analytics
- State:
 - Created a year ago
 - Reactions:4
 - Comments:10 (3 by maintainers)
 
Top Results From Across the Web
videojs player.textTracks() returns wrong type of object on ...
I am trying to work with some TextTrack information connected to a video. I've got a video embedded from Mux.com, which has metadata ......
Read more >HTMLMediaElement.textTracks - Web APIs | MDN
A TextTrackList object representing the list of text tracks included in the media element. The list of tracks can be accessed using textTracks[n] ......
Read more >Videojs Text Tracks
Subtitles: Translations of the dialogue in the video for when audio is available but not understood. · Captions: Transcription of the dialogue, sound...
Read more >WebVTT - Web Video Text Tracks | Can I use... Support tables ...
WebVTT - Web Video Text Tracks. - CR. Format for marking up text captions for ... Safari on iOS *. 3.2 - 6.1...
Read more >Adding Text Tracks to a Video
If no label is supplied, the language code is displayed. Select the Kind of text track. Options include: Captions - Similar to subtitles,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We’re facing this issue too (on 6.0.0-alpha3) but I believe the cause is different.
We’re passing a
.m3u8source with aselectedTextTrack. It looks like setSelectedTextTrack is called immediately because the prop is set. This calls RCTPlayerOperations.setMediaSelectionTrackForCharacteristic which relies on_playerto not benil… but during the initial render it isnilsince it is not instantiated until this line (which intentionally has a built in delay and some setup code first).And so it is crashing on this line because
groupisnil.This ^ crash also lines up with the stack trace provided by @awinograd.
We were able to fix this by simply adding a guard against
groupbeingnil.And I believe this fix might be a good one since
setSelectedTextTrackis called again immediately after_playeris instantiated (via applyModifiers). If anyone has more insight and agrees I’m happy to put up a PRThe main issue is that we pass a custom class array in a react native event. I had not time yet to make a PR, but could successfully test it with this line change.