无法使用 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 并等待其活动"状态(并且我的广播具有 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...
推荐答案
所以有点不清楚的规则是:
So a bit unclear rule is:
- 确保您已创建并准备好广播和直播.
并确保广播生命周期状态不是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屋!