PHP (Laravel) Package for Google / YouTube API of Video Live Streaming with Google Auth

Add Service provider to config/app.php provider's array:

Execute the following command to get the configurations:

# Replace the identifier with a unqiue identifier for account or channel

* for live streaming using encoder of your choice.

* Store this information & will be required to supply to youtube

* The broadcast function returns array of details from YouTube.

// Optional and should not be more than 500 characters

* The server_url & server_key gets updated in the process. (save the updated server_key and server_url).

* The updateBroadcast response give details of the youtube_event_id,server_url and server_key.

* Deleting the event requires authentication token for the channel in which the event is created and the youtube_event_id

$ ytEventObj

new

YoutubeLiveEventService

/**

* $broadcastStatus - ["testing", "live"]

* Starting the event takes place in 3 steps

* 1. Start sending the stream to the server_url via server_key recieved as a response in creating the event via the encoder of your choice.

* 2. Once stream sending has started, stream test should be done by passing $broadcastStatus="testing" & it will return response for stream status.

* 3. If transitioEvent() returns successfull for testing broadcast status, then start live streaming your video by passing $broadcastStatus="live"

* & in response it will return us the stream status.

*/

$ streamStatus

$ ytEventObj

transitionEvent

$ authToken

$ youtube_event_id