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"
}
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").
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?
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...
The YouTube Live Streaming API lets you create, update, and manage live events on YouTube. Using the API, you can schedule events (broadcasts) and associate them with video streams, which represent the actual broadcast content.
The live broadcast is already in the requested status or processing to the requested status. The request is not authorized to transition the live broadcast. The user that authorized the request is unable to stream live video on YouTube at this time.
Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. For example, when you transition a broadcast's status to testing, YouTube starts to transmit video to that broadcast's monitor stream.
To go live there are several steps: 1) authenticate the user 2) create a broadcast 3) create a stream 4) bind the stream to the broadcast 5) send your video to a server which encodes the video and sends it to youtube 6) transition the broadcast status to live.
So a bit unclear rule is:
COMPLETE
,
otherwise recreate broadcast
... so ensure that your broadcast lifecycle status is ready
active
testing
(yes, you have to do it instead of moving to live
)lifeCycleStatus
to become testing
live
lifeCycleStatus
to become live
You cannot skip testing
and cannot transition from complete
to testing
or ready
.
You can leave 4-7 steps if: the broadcast's monitor stream was disabled by setting the contentDetails.monitorStream.enableMonitorStream property to false when creating or updating that broadcast.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With