Giter Site home page Giter Site logo

jdiggidy / amazon-ivs-broadcast-for-ios-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/amazon-ivs-broadcast-for-ios-demo

0.0 0.0 0.0 888 KB

This repository contains a broadcasting application for iOS. The app is built on Amazon IVS and uses the Amazon IVS Broadcast SDK to stream video from an iOS device to an Amazon IVS channel.

License: MIT No Attribution

Swift 99.81% Ruby 0.19%

amazon-ivs-broadcast-for-ios-demo's Introduction

Amazon IVS Broadcast for iOS Demo

This repository contains a demo app, which shows how to use the Amazon IVS Broadcast SDK to create a mobile streaming app on iOS using SwiftUI.

An iPhone with the demo application running on the screen.

Setup

  1. Clone the repository to your local machine.
  2. Install the SDK dependency using CocoaPods. This can be done by running the following commands from the repository folder:
    • bundle install
    • bundle exec pod install
    • For more information about these commands, see Bundler and CocoaPods.
  3. Open Broadcasting.xcworkspace.
  4. Since the simulator doesn't support the use of cameras or ReplayKit, there are a couple changes you need to make before building and running the app on a physical device.
    1. Have an active Apple Developer account in order to build to physical devices.
    2. Modify the Bundle Identifier for both Broadcasting and ReplayKitBroadcaster targets.
    3. Choose a Team for both targets.
    4. Create a new App Group ID based on your new Bundle Identifier for both targets, and include the targets in only that App Group.
    5. Modify appGroupName (can be found in Helpers/Constants.swift) to use your newly created App Group ID.
  5. (Optional)* Refer to the Streaming to Amazon IVS section of this readme to set up the app for streaming.
  6. You can now build and run the projects on a device.

*You can run and build this app without an Amazon IVS Channel, but you will need an Amazon IVS Channel in order to start broadcasting.

Streaming to Amazon IVS

Prerequisites

IMPORTANT NOTE: Using your own stream will create and consume AWS resources, which will cost money.

  1. Create and set up an Amazon IVS channel. A guide is available here: Getting started with Amazon IVS.

Referencing your stream in the app

  1. Open the Amazon IVS Console and navigate to the channel you would like to use.
  2. Open Helpers/Constants.swift and find lines 16 - 18.
  3. Copy the Ingest Server for the channel and paste it into the ingestServer field on line 16 between the quotes. The resulting line should look like the following: static let ingestServer = "rtmps://<ingest_server_url>:443/app/"
  4. Copy the Stream Key for the channel and paste it into the streamKey field on line 17 between the quotes.
  5. Copy the Playback URL for the channel and paste it into the playbackUrl field on line 18 between the quotes.
  6. Save and run the application.

You can also change the values for any of these fields in the app settings once you have launched the app on a physical iPhone.

Known Issues

  • This app has only been tested on devices running iOS 14 or later. While this app may work on devices running older versions of iOS, it has not been tested on them.

More Documentation

License

This project is licensed under the MIT-0 License. See the LICENSE file.

amazon-ivs-broadcast-for-ios-demo's People

Contributors

uldiszz avatar slee-aws avatar amazon-auto avatar mboulin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.