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.


That's really 3 questions:

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

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

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

  • 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.


    After getting online with amazon web services support, I was guided to finish my task following way.

  • Launch EC2 instance, from one of this AMI's
  • Connect my S3 to EC2 and configure Adobe FMS 4.5 to pull content from S3. (How To)
  • Use the EC2 instance as a source for a CloudFront download distribution.
  • 链接地址: http://www.djcxy.com/p/11742.html

    上一篇: 日期时间日历:在单个输入字段中选择日期范围

    下一篇: 将视频从亚马逊流式传输到iOS设备