com.google.api.services.youtube.model.IngestionInfo

Here are the examples of the java api class com.google.api.services.youtube.model.IngestionInfo taken from open source projects.

1. YouTubeApi#getIngestionAddress()

Project: yt-watchme
Source File: YouTubeApi.java
View license
public static String getIngestionAddress(YouTube youtube, String streamId) throws IOException {
    YouTube.LiveStreams.List liveStreamRequest = youtube.liveStreams().list("cdn");
    liveStreamRequest.setId(streamId);
    LiveStreamListResponse returnedStream = liveStreamRequest.execute();
    List<LiveStream> streamList = returnedStream.getItems();
    if (streamList.isEmpty()) {
        return "";
    }
    IngestionInfo ingestionInfo = streamList.get(0).getCdn().getIngestionInfo();
    return ingestionInfo.getIngestionAddress() + "/" + ingestionInfo.getStreamName();
}