Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

iOS SDk : Download Video and play it on device using only app


Hello, we have a JWPlayer enterprise account and we are building an app that plays encrypted movies (using apple FairPlay Streaming). We want to add the option to download a movie on device (the extension is m3u8), and play it using the app. I would appreciate if somebody could refer me some iOS demo or or give some general guidance post some code preferably in swift

Specifically I have 2 questions about the process:

1 . The file extensions are m3u8 so when I download an m3u8 file all I get is a text file. How do I get the actual video link to download it using the m3u8 file?
2. For encrypted movies, how to play them offline on the device in app player only?

Best Regards!

3 Community Answers

Daniel Berger

JW Player Support Agent  
0 rated :

Hi,

Thank you for the question. Here is a code example of FairPlay DRM in our SDK: https://github.com/jwplayer/jwplayer-ios-bestPracticeApps/tree/master/JWBestPracticeApps/JWFairPlayDrm

I am not sure I entirely understand what you mean by downloading the HLS file in your first question. The HLS file should contain a manifest with multiple quality levels.

With regard to offline playback, here is a code example for how you can achieve that: https://developer.jwplayer.com/sdk/ios/docs/developer-guide/embedding/embedding/
However, I would not expect a DRM stream to be played offline. DRM playback requires a network request to check your key.

Elias Kozah

User  
0 rated :

Hello, Thanks for the answer. What I mean is getting the links of videos and download them in order to play them offline. Is that achievable?

For example the video in this link:
http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8

Can I find a code in swift to download the entire video on an iOS device and play it while offline?

Best Regards!

Daniel Berger

JW Player Support Agent  
0 rated :

Downloading content and storing it locally is technically achievable but it is outside the scope of our SDK. Our SDK was designed to retrieve content from a hosting server.

This question has received the maximum number of answers.