gitagogaming / Youtube-TouchPortal-Plugin

Control your YouTube Live Stream with TouchPortal!
6 stars 0 forks source link

Start AD Break (Partners) #1

Open gitagogaming opened 1 year ago

gitagogaming commented 1 year ago

https://developers.google.com/youtube/v3/live/docs/liveCuepoints/

This is not currently integrated and may be in the future after we get some user requests.

gitagogaming commented 1 year ago

I've tried to integrate this for quite some time today and was unsuccessful

Details and Examples for future: https://stackoverflow.com/questions/63279888/insert-livecuepoints-in-live-broadcast-getting-error-403-forbidden https://stackoverflow.com/questions/19398303/youtube-data-api-returns-accessnotconfigured-when-inserting-livecuepoints May need to access a special Content ID API that is unavailable to 'everyone' https://developers.google.com/youtube/partner


Example Curl command

This may work, but I am clueless to Curl commands and how to get it rollin.

curlUrl="https://www.googleapis.com/youtube/partner/v1/liveCuepoints?part=id,status&broadcastType=persistent&mine=true&access_token=$accessToken"
curlData=""
curlData+="{"
curlData+="\"broadcastId\": \"$broadcastId\","
curlData+="\"settings\": "
curlData+="{"
curlData+="\"cueType\": \"ad\""
curlData+="\"walltime\": \"$cuePointWallTime\""
curlData+="}"
curlData+="}"

# Do not log strings which contain credentials or access tokens, even in debug mode.
# LogMessage "dbg" "curlUrl: $curlUrl"
# LogMessage "dbg" "curlData: $curlData"

# Perform the API call to add the cuePoint.
# cuePointInsertionOutput=$( curl -s -m 20 -X POST -H "Content-Type: application/json" -d "$curlData" $curlUrl )
#cuePointInsertionOutput=$( curl -s -m 20 -H "Content-Type: application/json" -d "$curlData" $curlUrl )

print(curlData)