

JSON is a common, language-independent data format that provides a simple text representation of arbitrary data structures. In the list of APIs, make sure the status is ON for the YouTube Data API v3 and, if you are a YouTube Content Partner, the YouTube Content ID API.įamiliarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. Go to the API Console and select the project that you just registered.Register your application with Google so that it can submit API requests.Īfter registering your application, select the YouTube Data API as one of the services that your application uses: You need a Google Account to access the Google API Console, request an API key, and register your application. Simplify transitions between broadcast states ( testing, live, etc.) and enable users to insert cuepoints. Your application could enable users to predefine broadcast settings and then select the settings to apply to a particular broadcast.Įnable broadcasters to define information about a broadcast and its video (using the YouTube Data API) at the same time. Schedule broadcasts and define broadcast settings. The list below suggests several ways to use the API in your application: cuepoints A cuepoint represents an ad break that can be inserted into a live broadcast. Each broadcast is associated with one video stream. streams A stream identifies the audio-video content that is being communicated to YouTube. Broadcasts can also be recorded and saved as YouTube videos so that users can watch them after they happen. Core concepts broadcasts A broadcast represents an event that can be watched on YouTube as it happens. It also provides an overview of the different functions that the API supports. It explains basic concepts of YouTube and of the API itself. This document is intended for developers who want to write applications to facilitate live broadcasting on YouTube. However, all of the resources that make up the Live Streaming API are used only to create and manage live events. The Data API enables YouTube users to manage their YouTube accounts, while the YouTube Content ID API enables interactions with YouTube's rights management system. The Live Streaming API is actually comprised of components of the YouTube Data API and the YouTube Content ID API. Using the API, you can schedule events (broadcasts) and associate them with video streams, which represent the actual broadcast content. const modalStyles = Įach of these will accept a function like the one we have created above.The YouTube Live Streaming API lets you create, update, and manage live events on YouTube.


The documentation gives some decent default styles, so I'll add these to the top of the project. Without a library like this, I'd have to build a lot of functionality myself (keyboard events, accessibility, clicking outside of the modal). I tend to enjoy projects that are named well and this is another one of those.įor some it may seem a bit overkill to use a library for modals, but I'm a fan. Exploring the creation and passing of refs, the use of _document.js in NextJS to use external scripts and dealing with some of the idiosyncrasies that make themselves known as you work through a project like this.īefore I dove in, I decided to have a look for a React library that might handle all of this for me. I've done this kind of conversion before. The slight issue I had was that it is written in a vanilla JavaScript paradigm whereas I was working in React. I could see there were various event listeners and data properties available to explore. The documentation for the YouTube Player API is very clear. Up to this point, we were embedding the YouTube player and not interacting with the API. Last week, we got this request from the product manager: Hey,Ĭan we trigger a pop-up to ask the patient if they completed the exercise? This should trigger when the video ends or is paused at more than about 95%. The exercises are hosted on YouTube and shared in a NextJS application. There are a number of strands to the application, but one is sharing exercises with patients and tracking their success. One of our clients is a group of doctors exploring ways to help support older patients with post-operative care. As a digital prototyping agency, my company works with clients to help them quickly test the core of their ideas with their clients and investors.
