Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avplayer implement subtitles using .srt file in iOS swift

How to implement subtitles using .srt file with avplayer in iOS. When using the avplayer is there a way to use .srt file in avplayer to show the subtitle on the player

like image 558
Alok Kumar Avatar asked Oct 31 '25 06:10

Alok Kumar


1 Answers

You can't just put .srt file in your AVPlayer and show them. If you can put subtitles inside your .m3u8 HLS stream on server side - this will be the solution to handle subtitles by AVPLayer automatically.

Until then - I'm using this library

Very simple to use and is handling all for you.

like image 79
Pete Streem Avatar answered Nov 04 '25 00:11

Pete Streem



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!