我们已成功将视频流式传输到YouTube . 但是,我们不知道如何通过API为360视频创建直播:
我的猜测是,我们错过了一些关于如何告诉YouTube需要在360视频播放器中播放视频流的文档 . 我们使用此代码段生成liveStreams资源:
NSDictionary *stream = @{@"snippet": @{@"title": broadcast.title ? broadcast.title : @"mimoLive Livestream"},
@"cdn": @{@"resolution": resolution,
@"frameRate": framerate,
@"ingestionType": @"rtmp"}};
我们需要在这里添加(未)记录的密钥吗?
参考YouTube API:https://developers.google.com/youtube/v3/live/docs/liveStreams
(顺便说一句:Facebook最近为他们的API添加了选项is_spherical以使其工作)
1 回答
创建新广播对象时,需要将 contentDetails.Projection 字段设置为 360 . 默认设置为 rectangular . 这记录在https://developers.google.com/youtube/v3/live/docs/liveBroadcasts下