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]: Subtitle not working in iOS #4361

Open
Nardeep opened this issue Jan 7, 2025 · 2 comments
Open

[BUG]: Subtitle not working in iOS #4361

Nardeep opened this issue Jan 7, 2025 · 2 comments
Labels

Comments

@Nardeep
Copy link

Nardeep commented Jan 7, 2025

Version

6.7.0

What platforms are you having the problem on?

iOS

System Version

Any IOS

On what device are you experiencing the issue?

Real device

Architecture

New architecture with interop layer

What happened?

After loading textTracks , its working fine in android but its not showing in iOS

Reproduction Link

repository link

Reproduction

Step to reproduce this bug are:
Add the text tracks in player and check in iOS its not showing

@Nardeep Nardeep added the bug label Jan 7, 2025
Copy link

github-actions bot commented Jan 7, 2025

Thank you for your issue report. Please note that the following information is missing or incomplete:

  • reproduction link

Please update your issue with this information to help us address it more effectively.

Note: issues without complete information have a lower priority

There is a newer version of the library available. You are using version 6.7.0, while the latest stable version is 6.9.0. Please update to the latest version and check if the issue still exists.

Note: If the issue still exists, please update the issue report with the latest information.

@Nardeep
Copy link
Author

Nardeep commented Jan 8, 2025

<Video
ignoreSilentSwitch={'ignore'}
playWhenInactive={false}
playInBackground={false}
viewType={ViewType.SURFACE}

  controls={false}
  disableFocus={true}
  shutterColor="transparent"
  hideShutterView={true}
  poster={getEnvVars()?.videoUrl + seletedTukan?.thumbnail_url}
  ref={videoPlayerRef}
   source={{
    uri: getEnvVars().videoUrl + seletedTukan.media_url,
    bufferConfig:{
      minBufferMs: 10000, // Minimum buffer before playback starts
      maxBufferMs: 25000, // Maximum buffer allowed
      bufferForPlaybackMs: 300, // Buffer required to start playback
      bufferForPlaybackAfterRebufferMs: 2500, }
    ,textTracks:[
      {
        title: 'English Subtitles',
        language: 'en',
        type: TextTrackType.VTT, 
       uri:getEnvVars().videoUrl +seletedTukan?.caption_url,
      },
  
  ]}
  
  onTextTracks={(e)=>{
    console.log("video "," onTextTracks >> "+JSON.stringify(e.textTracks))
  }}
  selectedTextTrack={{
    type: SelectedTrackType.LANGUAGE, // Type of track selection: 'index' or 'title'
    value: 'en', // Index of the selected subtitle track
  }}
  onTextTrackDataChanged={(e)=>{
 //   setSubtitle(e.subtitleTracks)
    console.log("video "," onTextTrackDataChanged ",JSON.stringify(e.subtitleTracks))
  }}
  subtitleStyle={{
  
   paddingBottom:vs(400)
 
  }}



  style={{ width: width, height: height, backgroundColor:"black",aspectRatio: DeviceInfo.isTablet() ?undefined:9 / 16 }}
  resizeMode={Platform.OS=='ios'?"contain":"stretch" }
  // resizeMode="cover" // Crops to fill the aspect ratio area
  posterResizeMode="cover"

  paused={false}
  muted={false}
  onProgress={onProgress}
  onLoad={handleVideoLoad} // Log when the video loads
  onEnd={handleVideoEnd}
  repeat={false}
/>

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