从直播中删除绑定

时间:2019-10-10 19:41:49

标签: youtube-livestreaming-api

如何从直播中删除流的绑定? 我找不到删除python广播绑定的代码。 https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/bind

之后,我要将同一广播与另一个流绑定在一起

这是将流正常绑定到广播的代码:

def bind_broadcast(youtube, broadcast_id, stream_id):
  bind_broadcast_response = youtube.liveBroadcasts().bind(
    part="id,contentDetails",
    id=broadcast_id,
    streamId=stream_id
  ).execute()

  print "Broadcast '%s' was bound to stream '%s'." % (
    bind_broadcast_response["id"],
    bind_broadcast_response["contentDetails"]["boundStreamId"])

1 个答案:

答案 0 :(得分:0)

bind函数的YouTube Live Streaming API V3文档中,您找到:

streamId参数指定绑定到广播的视频流的唯一ID。如果省略此参数,则API会删除广播和视频流之间的所有现有绑定。

请参阅:https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/bind