无法使用Youtube API将我的Youtube广播转换为直播 [英] Cannot make transition of my Youtube broadcast to live using Youtube API
问题描述
现在,我正在尝试弄清将YT广播转为直播时我在做错什么.
Right now I'm trying to figure out what i'm doing wrong when making transition of my YT broadcast to live.
因此,我发出了请求并得到以下响应:
So I make the request and get the following response:
{
"code" : 403,
"errors" : [ {
"domain" : "youtube.liveBroadcast",
"message" : "Invalid transition",
"reason" : "invalidTransition",
"extendedHelp" : "https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/transition#params"
} ],
"message" : "Invalid transition"
}
当然,我已经阅读了很多文档,所以我监视了LiveStream,并在等待其活动"状态(并且我的Broadcast具有lifeCycleStatus ="ready").
Of course i've read docs many times so I've monitored the LiveStream and was waiting for its "active" state (and my Broadcast has lifeCycleStatus="ready").
错误消息并不能解释为什么我不能进行过渡的真正原因.
而且...当然,我无权访问Youtube服务器的日志:)
Error message doesn't explain real reason why cannot I do the transition.
And... of course I do not have access to logs of Youtube servers :)
您有什么建议?
如何找出我在哪里错了?
What can you suggest?
How to find out where am I wrong?
因此,即使我错过了某些内容,文档和错误消息也无法帮助我理解任何内容.因此无论如何,这都是YT LiveStreaming API的错误" ...
So even if i've missed something, docs and error message do not help me to understand anything. So anyway it is kind of a "bug" for YT LiveStreaming API...
推荐答案
所以规则有点不清楚:
- 确保已创建并准备好广播和直播.
,并确保广播生命周期状态不是COMPLETE
, 否则,重新创建广播 ...因此,请确保您的广播生命周期状态为ready
- 将广播绑定到直播
- 开始将视频发布到直播
- 等待直播状态
active
- 过渡到
testing
(是的,您必须这样做而不是转移到live
) - 等待广播
lifeCycleStatus
成为testing
- 过渡到
live
- 等待广播
lifeCycleStatus
成为live
- ensure you have broadcast and livestream created and ready.
and ensure that broadcast lifecycle status is notCOMPLETE
, otherwise recreate broadcast ... so ensure that your broadcast lifecycle status isready
- bind broadcast to livestream
- start publishing video to livestream
- wait for livestream status
active
- transition to
testing
(yes, you have to do it instead of moving tolive
) - wait for broadcast
lifeCycleStatus
to becometesting
- transition to
live
- wait for broadcast
lifeCycleStatus
to becomelive
您不能跳过testing
,也不能从complete
过渡到testing
或ready
.
You cannot skip testing
and cannot transition from complete
to testing
or ready
.
这篇关于无法使用Youtube API将我的Youtube广播转换为直播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!