com.google.api.services.youtube.YouTube.LiveBroadcasts.Transition

Here are the examples of the java api class com.google.api.services.youtube.YouTube.LiveBroadcasts.Transition taken from open source projects.

1. YouTubeApi#startEvent()

Project: yt-watchme
File: YouTubeApi.java
public static void startEvent(YouTube youtube, String broadcastId) throws IOException {
    try {
        Thread.sleep(10000);
    } catch (InterruptedException e) {
        Log.e(MainActivity.APP_NAME, "", e);
    }
    Transition transitionRequest = youtube.liveBroadcasts().transition("live", broadcastId, "status");
    transitionRequest.execute();
}

2. YouTubeApi#endEvent()

Project: yt-watchme
File: YouTubeApi.java
public static void endEvent(YouTube youtube, String broadcastId) throws IOException {
    Transition transitionRequest = youtube.liveBroadcasts().transition("completed", broadcastId, "status");
    transitionRequest.execute();
}