-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
VTT Subtitles broken on iOS #3468
Comments
@james-cohen I had similar issues on iOS. Could you try #3461 and see if that resolves ur issues? |
Hi @brycnguyen, unfortunately not. It's now playing without freezing, but the sound is still missing and the text tracks aren't loading at all. This is the response body from onLoad:
I've confirmed in a separate console log that the transcriptionUri is definitely being supplied |
for me passing texttracks just breaks playback entirely |
Hey, I am facing a similar issue where the video doesn't work at all with the following props:
|
With a known .VTT file that works where the values on the ... when I enable captions (i.e. set the |
Cloud someone test this PR #3557 ? |
I'm also having freezes when using a VTT. In my case, the video uses a signed S3 URL but VTT is public. It seems that if both are public URLs, the video plays properly but subtitles are currently not appearing on v6.0.0-rc.0. |
Same problem here, any solution? |
|
IOSReact native video - v 5.2On Android everything works ok<Video |
Any updates? Facing the same problems |
As we identify this is a limitation from avplayer, but maybe we are wrong, there is no chance for a quick fix ... |
Could you please elaborate? What is the limitation from AvPlayer? |
I forgot to put the link ... |
Huh, I see. My use case might be a bit different. I'm scratching my head as to why for some
|
Your issue seems different, here the issue is that you cannot mix m3u and vtt. |
Are you saying the video url is m3u? Or the vtt file that I am trying to use is m3u? |
Nevermind, I see the issue. Thanks! |
Just reinforcing that this is still an issue and also lemme share my observations:
react-native-video@6.1.2 |
In case somebody wants an easy solution, I'm now using another package to handle showing subtitles. |
Should the title of this issue be altered to be more accurate? |
How has this solution been working for you? I am going to try your suggestions but am also searching for other options to add subtitles support for my app where subtitle support is a requirement for accessibility compliance |
This is still an issue. Is there a proposed fix or work around? How are others getting subtitle support for videos? |
@stuttskl - I used react-native-subtitles to solve this problem |
Any fix for this one? Subtitles work on Android but IOS causes video player to crash. Don't want to use a bit outdated react-native-subtitles |
@levantsivadze, the library is outdated, but relatively a pretty small library. I've also moved to this as the native subtitles just don't seem to work for me. My video on iOS would just stop producing audio after 3 minutes or so. The video would still progress, but no audio/video would be visible to the user, it would just freeze at where-ever the user left off. I'm assuming this library is trying to fetch the subtitles under the hood and failing, because I do see a native error It's also a lot easier to use with the react-native-subtitles library since it uses axios under the hood to fetch the subtitles. With iOS, I no longer have to download the subtitles onto the device via react-native-fs. If you do use react-native-subtitles, there was a few things I had to patch.
I had to patch the .vtt detection for the library since my url has query params in it. (i.e. .vtt?expires=123456) Lastly, my subtitles were getting the last word of each sentence chopped off. I fixed this by removing the substring logic that was done here: https://github.com/nriccar/react-native-subtitles/blob/main/lib/utils/subtitle-parser.ts#L51C9-L54C11 |
@stuttskl sorry it took so long to reply. That said, I do like this video player, this subtitle issue is it's only weakspot, at least from what I needed. |
If someone want to integrate code of react native subtitles inside react native video, I would be have to review and merge it ! |
linked to : #4238 |
Bug
I am trying to show captions on my videos using the textTracks and selectedTextTrack properties. I am using VTT as per guidance in the documentation as it is the only type supported by iOS and Android.
On Android, I have no issues and it works perfectly. On iOS, there are several serious issues if textTracks and selectedTextTrack are provided - they resolve if removed:
The VTT file is being served from a signed S3 URL. By the fact that it works on Android and occasionally shows on iOS, I am assuming that the URL itself is not the problem.
Platform
Environment info
Library version: 6.0.0-beta.3
Device: iPhone 11, iOS 17.2
Steps To Reproduce
Watch streamed MP4 video with streamed VTT subtitles
Expected behaviour
Reproducible sample code
I have tried with 2 versions of the same VTT data, one with optional style and index properties set and one without. Both result in the same issues:
With style and order properties set:
Without:
The text was updated successfully, but these errors were encountered: