Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stream videos from amazon to iOS devices

I store my videos in Amazon S3 bucket and stream them to my website using Cloudfront. Everything works fine but now I also have an iPad app for my website and I want to stream the same videos to my iPad app.

The only documentation I could found is:

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/LiveStreamingAdobeFMS4.5.html

It's great explanation how to do live streams on different devices. I also know that CloudFront uses FMS 3.5 and I've set up CloudFormation Stack for FMS 4.5 but I don't know how to connect it to my bucket, create secured urls and stream videos to iOS devices.

Please help and provide me with any documentation that explains how to stream VOD from amazon to iOS devices with secured urls.

like image 271
Michael Samteladze Avatar asked Jan 16 '13 11:01

Michael Samteladze


People also ask

How do I cast from Amazon to my iPhone?

Make sure both your TV and your phone are connected to the same Wi-Fi network. To cast from your iOS device, go to Settings > Prime Video and toggle the “Local Network” ON. Tap on the “Cast” icon. You'll find the button on the bottom-right corner on your mobile device.

Can I play Amazon Prime video from my phone to AirPlay?

You can either download and watch it using the Amazon Prime app, AirPlay it to your Apple TV from the Amazon Prime app on your iPhone or iPad, or AirPlay it from the browser on your Mac.

How do I watch Amazon Prime videos on my iPhone?

How do I use the mobile app? After you download the app, log in with your Amazon Prime or Prime Video account to watch. Browse available content and tap a title to watch it. On iOS and Android devices, you can also download a title by tapping the download icon from the video detail page.

Why can't I cast Amazon Prime?

Please ensure that your Chromecast device is up to date. Also ensure that your Prime Video app and iOS or Android device are also up to date. If you're running an Android device, ensure that Google Play Services are also up to date. The Prime Video app on Fire Tablet can't connect to a Chromecast.


1 Answers

That's really 3 questions:

  1. How do I connect CloudFormation to S3? Create a cloud template that specifies your S3 bucket. Like this:

    { "Resources" : { "HelloBucket" : { "Type" : "AWS::S3::Bucket" } } }

  2. How do I create secure CloudFormation links? Use the CloudFormation IAM integration.

  3. How do I stream video on iOS?

You need to use the AVFoundation classes.

NSURL *url = [NSURL URLWithString:@"<#Live stream URL#>"];
// You may find a test stream at http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 

self.playerItem = [AVPlayerItem playerItemWithURL:url];
[playerItem addObserver:self forKeyPath:@"status" options:0 context:&ItemStatusContext];
self.player = [AVPlayer playerWithPlayerItem:playerItem];

You might need an Apple developer login to follow the link.

like image 67
nont Avatar answered Sep 29 '22 12:09

nont