Search code examples
javascriptqtyoutube-apiyoutube-javascript-apiyoutube-livestreaming-api

YouTube Live Streaming in Javascript


I have some questions regarding the YouTube Live Streaming API:

  • Is there any support or code samples for javascript?

  • Is it possible to embed the live streaming functionality into Qt applications by using the Qt-WebKit and javascript code, e.g. create broadcasts, bind to streams etc. via HTTP requests?


Solution

  • Creating a Live Event and Live broadcast is language-independent, just use YouTube's Live Streaming HTTP API. Read through the Core Concepts and Life of a Broadcast guides.

    Your flow might look something like this:

    1. Authenticate the user.
    2. Set up and schedule your Live Broadcast object.
    3. Start your video encoder and create a Live Stream Object.
    4. Bind your Live Stream to your Live Broadcast.
    5. Test to verify your video is going through.
    6. Set your Live Broadcast to Live.
    7. At the conclusion of your event, set your Live Broadcast to Ended.

    Note that setting up your encoder is on you. Asking "How do I create an RTMP video encoder in JavaScript" (or qt) is too broad of a question for Stack Overflow.