Google_LiveBroadcastsServiceResource

The "liveBroadcasts" collection of methods.

Defined (1)

The class is defined in the following location(s).

/src/contrib/Google_YouTubeService.php  
  1. class Google_LiveBroadcastsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a 
  5. * stream. A broadcast can only be bound to one video stream. (liveBroadcasts.bind) 
  6. * @param string $id The id parameter specifies the unique ID of the broadcast that is being bound to a video stream. 
  7. * @param string $part The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string onBehalfOfContentOwner USE_DESCRIPTION --- channels:list:onBehalfOfContentOwner 
  10. * @opt_param string streamId The streamId parameter specifies the unique ID of the video stream that is being bound to a broadcast. If this parameter is omitted, the API will remove any existing binding between the broadcast and a video stream. 
  11. * @return Google_LiveBroadcast 
  12. */ 
  13. public function bind($id, $part, $optParams = array()) { 
  14. $params = array('id' => $id, 'part' => $part); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('bind', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_LiveBroadcast($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * Control the slate of the broadacast. (liveBroadcasts.control) 
  23. * @param string $id The id parameter specifies the YouTube live broadcast ID for the resource that is being deleted. 
  24. * @param string $part The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. 
  25. * @param array $optParams Optional parameters. 
  26. * @opt_param bool displaySlate The displaySlate parameter specifies whether to enable or disable the slate. 
  27. * @opt_param string offsetTimeMs The offsetTimeMs parameter specifies a point in time in the video when the specified action (e.g. display a slate) is executed. The property value identifies a positive time offset, in milliseconds, from the beginning of the monitor stream. Though measured in milliseconds, the value is actually an approximation, and YouTube will act as closely as possible to that time. If not specified, it indicates that the action should be performed as soon as possible. If your broadcast stream is not delayed, then it should not be specified. However, if your broadcast stream is delayed, then the parameter can specify the time when the operation should be executed. See the Getting started guide for more details. Note: The offset is measured from the time that the testing phase began. 
  28. * @opt_param string onBehalfOfContentOwner USE_DESCRIPTION --- channels:list:onBehalfOfContentOwner 
  29. * @return Google_LiveBroadcast 
  30. */ 
  31. public function control($id, $part, $optParams = array()) { 
  32. $params = array('id' => $id, 'part' => $part); 
  33. $params = array_merge($params, $optParams); 
  34. $data = $this->__call('control', array($params)); 
  35. if ($this->useObjects()) { 
  36. return new Google_LiveBroadcast($data); 
  37. } else { 
  38. return $data; 
  39. /** 
  40. * Deletes a broadcast. (liveBroadcasts.delete) 
  41. * @param string $id The id parameter specifies the YouTube live broadcast ID for the resource that is being deleted. 
  42. * @param array $optParams Optional parameters. 
  43. * @opt_param string onBehalfOfContentOwner USE_DESCRIPTION --- channels:list:onBehalfOfContentOwner 
  44. */ 
  45. public function delete($id, $optParams = array()) { 
  46. $params = array('id' => $id); 
  47. $params = array_merge($params, $optParams); 
  48. $data = $this->__call('delete', array($params)); 
  49. return $data; 
  50. /** 
  51. * Creates a broadcast. (liveBroadcasts.insert) 
  52. * @param string $part The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. 
  53. The part properties that you can include in the parameter value are id, snippet, contentDetails, and status. 
  54. * @param Google_LiveBroadcast $postBody 
  55. * @param array $optParams Optional parameters. 
  56. * @opt_param string onBehalfOfContentOwner USE_DESCRIPTION --- channels:list:onBehalfOfContentOwner 
  57. * @return Google_LiveBroadcast 
  58. */ 
  59. public function insert($part, Google_LiveBroadcast $postBody, $optParams = array()) { 
  60. $params = array('part' => $part, 'postBody' => $postBody); 
  61. $params = array_merge($params, $optParams); 
  62. $data = $this->__call('insert', array($params)); 
  63. if ($this->useObjects()) { 
  64. return new Google_LiveBroadcast($data); 
  65. } else { 
  66. return $data; 
  67. /** 
  68. * Returns a list of YouTube broadcasts that match the API request parameters. (liveBroadcasts.list) 
  69. * @param string $part The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. 
  70. * @param array $optParams Optional parameters. 
  71. * @opt_param string broadcastStatus The broadcastStatus parameter filters the API response to only include broadcasts with the specified status. 
  72. * @opt_param string id The id parameter specifies a comma-separated list of YouTube broadcast IDs that identify the broadcasts being retrieved. In a liveBroadcast resource, the id property specifies the broadcast's ID. 
  73. * @opt_param string maxResults The maxResults parameter specifies the maximum number of items that should be returned in the result set. Acceptable values are 0 to 50, inclusive. The default value is 5. 
  74. * @opt_param bool mine The mine parameter can be used to instruct the API to only return broadcasts owned by the authenticated user. Set the parameter value to true to only retrieve your own broadcasts. 
  75. * @opt_param string pageToken The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. 
  76. * @return Google_LiveBroadcastList 
  77. */ 
  78. public function listLiveBroadcasts($part, $optParams = array()) { 
  79. $params = array('part' => $part); 
  80. $params = array_merge($params, $optParams); 
  81. $data = $this->__call('list', array($params)); 
  82. if ($this->useObjects()) { 
  83. return new Google_LiveBroadcastList($data); 
  84. } else { 
  85. return $data; 
  86. /** 
  87. * Changes the status of a YouTube live broadcast and initiates any processes associated with the 
  88. * new status. For example, when you transition a broadcast's status to testing, YouTube starts to 
  89. * transmit video to that broadcast's monitor stream. (liveBroadcasts.transition) 
  90. * @param string $broadcastStatus The broadcastStatus parameter identifies the state to which the broadcast is changing. 
  91. * @param string $id The id parameter specifies the unique ID of the broadcast that is transitioning to another status. 
  92. * @param string $part The part parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status. 
  93. * @param array $optParams Optional parameters. 
  94. * @opt_param string onBehalfOfContentOwner USE_DESCRIPTION --- channels:list:onBehalfOfContentOwner 
  95. * @return Google_LiveBroadcast 
  96. */ 
  97. public function transition($broadcastStatus, $id, $part, $optParams = array()) { 
  98. $params = array('broadcastStatus' => $broadcastStatus, 'id' => $id, 'part' => $part); 
  99. $params = array_merge($params, $optParams); 
  100. $data = $this->__call('transition', array($params)); 
  101. if ($this->useObjects()) { 
  102. return new Google_LiveBroadcast($data); 
  103. } else { 
  104. return $data; 
  105. /** 
  106. * Updates a broadcast. For example, you could modify the broadcast settings defined in the 
  107. * liveBroadcast resource's contentDetails object. (liveBroadcasts.update) 
  108. * @param string $part The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. 
  109. The part properties that you can include in the parameter value are id, snippet, contentDetails, and status. 
  110. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a broadcast's privacy status is defined in the status part. As such, if your request is updating a private or unlisted broadcast, and the request's part parameter value includes the status part, the broadcast's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the broadcast will revert to the default privacy setting. 
  111. * @param Google_LiveBroadcast $postBody 
  112. * @param array $optParams Optional parameters. 
  113. * @opt_param string onBehalfOfContentOwner USE_DESCRIPTION --- channels:list:onBehalfOfContentOwner 
  114. * @return Google_LiveBroadcast 
  115. */ 
  116. public function update($part, Google_LiveBroadcast $postBody, $optParams = array()) { 
  117. $params = array('part' => $part, 'postBody' => $postBody); 
  118. $params = array_merge($params, $optParams); 
  119. $data = $this->__call('update', array($params)); 
  120. if ($this->useObjects()) { 
  121. return new Google_LiveBroadcast($data); 
  122. } else { 
  123. return $data;