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

[BUG]: onTextTracks Callback Not Logging Subtitles Correctly Despite VTT Files Being Fetched #3527

Closed
coofzilla opened this issue Feb 12, 2024 · 2 comments
Labels

Comments

@coofzilla
Copy link
Contributor

coofzilla commented Feb 12, 2024

Version

v6 (Beta)

What platforms are you having the problem on?

iOS

What happened?

A bug happened!

I am experiencing an issue with the onTextTracks callback where the callback does not log subtitle track information as expected. Despite the subtitles being visibly selected and VTT files being fetched (as observed in the network tab), the callback output does not reflect the subtitle tracks.

Implemented onTextTracks and they should work according to this PR

image

Reproduction

Step to reproduce this bug are:

I tried to make a snack; however, it seems react-native-video is unsupported. Please view this snippet as the minimal reproduction code:

import Video, {
  VideoRef,
  SelectedTrackType,
  OnTextTracksData,
} from 'react-native-video';

function App(): React.JSX.Element {
  const videoRef = useRef<VideoRef>(null);

  const handleTextTracks = (e: OnTextTracksData) => {
    console.log(`TEXT TRACKS: ${JSON.stringify(e, null, 2)}`);
  };

  return (
    <SafeAreaView>
      <Video
        ref={videoRef}
        style={styles.videoContainer}
        selectedTextTrack={{
          type: SelectedTrackType.INDEX,
          value: 1,
        }}
        controls
        source={{
          uri: 'https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
        }}
        muted={true}
        onTextTracks={handleTextTracks}
      />
    </SafeAreaView>
  );
}

Logs

TEXT TRACKS: {
  "textTracks": [
    null,
    null,
    null,
    null
  ],
  "target": 3
}
  • Using react-native-video version ^6.0.0-beta.5.
@coofzilla coofzilla added the bug label Feb 12, 2024
@coofzilla
Copy link
Contributor Author

I tried running my test uri in the example app and got the same thing when trying to log the data from onTextTracks

@freeboub Do you think you could give this a look 🙏🏽.

Or could you tell me what uri you used when testing?

image

@coofzilla
Copy link
Contributor Author

Not a bug. For the actual subtitles, follow #3541

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant