Encrypted HLS audio is not playing in ios using the just_audio package in flutter. Does just_audio support encrypted HLS audio playback in ios?


We have been building a cross platform audio playback application in flutter, using the just_audio: ^0.9.36, package we are able to play encrypted audio playback in android whereas in ios it is not playing.

Is there a fault with my configuration or just_audio natively does not support encrypted audio playback in IOS? If yes, are there any alternatives I can consider implementing encrypted audio playback in IOS using flutter.

Code

final audioSource = HlsAudioSource(
        Uri.parse(example.m3u8)
    );

Sample HLS file for reference:

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:30
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=AES-128,URI="key_file.key",IV=0x00000000000000000000000000000000
#EXTINF:30.000000,
data00
#EXTINF:30.000000,
data01
#EXTINF:30.000000,
data02
#EXTINF:30.000000,
data03
#EXTINF:30.000000,
data04
#EXTINF:30.000000,
data05
#EXT-X-ENDLIST

In the URI above, the key file can be loaded both locally and from key server, in the above example the key file is loaded locally and HLS audio is attempted to play locally. I have tried playing the HLS stream both using the key and HLS files in server as well as storing them in a folder locally.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img