'YouTube' and other streaming sites are popular to express ones opinion about something or state ones story. One can be anywhere to tell a story even while traveling . All one needs is a phone and the app to create a stream in YouTube. While publishing the content it is very important that only the publisher is authenticated to publish the content and not anyone else. Hence, Descope client authentication is used to check and broadcast the content.

'Broadcast YouTube' is an iOS app. Once the app is opened there are three buttons - Authenticate, Start Broadcast , and Stop Broadcast. To start streaming, the user needs to first press the authenticate button. The swift app uses Descope client authentication to check using the email provided to authenticate. Once authenticated the user has to press the start broadcast and the app takes the required camera permissions to record and stream in YouTube. There is a 'send message' text field that sends ones message to all. The 'Stop Broadcast' button is used to stop streaming and logout the publisher.

'Broadcast YouTube' is built using Swift UIKit as the front end. The app uses Amazon's AWS Lambda as the server to generate user sessions and tokens to start streaming. The server uses Vonage video API's opentok app key and secret to generate publisher session and token for the publisher to publish and broadcast in YouTube. The app uses 'express.js' to use HTTP framework for building RESTful web services in Node.js to retrieve the sessions and token information and to broadcast .

Challenges

  1. One of the main challenge was to figure out which server application to send and receive the created sessions and tokens for the publisher to connect and to broadcast.
  2. Lambda being a server-less application from Amazon AWS , its a go to but in order to use the HTTP frame work and export the resulting sessions and tokens in json format, a HTTP framework is needed to send and get the contents. Claudia created the bridge for HTTP
  3. The credits to Opentok were done. Hence could not fine tune and test extensively.
  4. The token creation with expiration time and the best format of YouTube to stream.

Accomplishments

  1. To create session and tokens efficiently using Http request to broadcast.
  2. Broadcast and stream in Youtube.
  3. Effectively use AWS Lambda in Node.js to broadcast streams
  4. A scalable solution.
  5. Simple and easy to use.
  6. Descope for Client Authentication

Learning

  1. Learned about various roles in creating a token and its distinction from a session
  2. How to broadcast streams and publish chat
  3. Connect to a session and disconnect
  4. Descope Client side

What's next for Broadcast Youtube

  1. To archive the completed sessions into Amazon S3
  2. To fine tune and have better video codecs and big screen broadcast in the YouTube stream
  3. To include other streaming platforms like Facebook ..
Share this project:

Updates