YouTube Event Broadcast Status of testing does not allow new stream binding - youtube-api

So when you test streaming to an event (via the RTMP endpoint) you switch the events lifeCycleStatus to testing. When I stop streaming to the RTMP endpoint the lifeCycleStatus still remains testing.
Essentially I need the event to go from this testing state to one where I can create and bind a new live stream to the event.
An attempt to transition the broadcast status of the event to Live is met with the error that the stream status is currently inactive which makes sense.
Is it possible to transition an event in the testing state to one where I can bind a new stream to it?

So I managed to solve this issue. Just to let you know there is no way to move a LiveBroadcast from the lifeCycleStatus from TESTING to anything other than LIVE or COMPLETED.
You can however rebind a new LiveStream to a LiveBroadcast in the state of TESTING. The broadcast will have a new boundStream and the lifeCycleStatus will be CREATED 👍

Related

how to find whether a user is publisher or subscriber in opentok?

I am working on an iOS application (Swift) in which I have used tokbox SDK for adding video chat into iOS app and now I want to add mute/unmute and video on/off buttons to video chat.
In my ios application, I want to add single mute/unmute and video on/off buttons common for both publisher and subscriber at the bottom of the screen.
Assume there are 2 people who joined the call, when publisher clicks on mute button only publisher audio should be muted and like wise for subscriber.
How to find whether a user is publisher or subscriber so that I can mute their individual audio?
Can anyone guide me?
If I am understanding correctly you want to be able to mute in a two-person 1 to 1 call?
To mute a person in a call you need to stop publishing audio to the session. This means that anyone subscribed to this publisher will not get the audio. It also works the same way for video.
So as long as you are toggling audio/video for the publisher it will work fine. In a 1 to 1 call like this, both users/devices are publishing and subscribing at the same time.
Device A is publishing audio/video to a session, and subscribing to audio/video from the session (in this case from Device B).
Device B is publishing audio/video to a session, and subscribing to audio/video from the session (in this case from Device A).
More info is available here: https://tokbox.com/developer/guides/audio-video/ios-swift/

Track is null on RemoteTrackPublication

I have setup an event handler for the trackPublished event so that I can update the video element with the remote users video stream when its published after the local user is already connected.
participant.on('trackPublished', publication => {
trackSubscribed(remoteMediaDiv, publication.track);
});
The issue is the track is always null. Its also not subscribed, I think that might be related but don't have a great grasp of the publish/subscribe states.
The local user loads the remote streams with the trackSubscribed without any issue when the remote user connects to the room before the local user.
Any ideas?

Wowza Live streaming issues

I have to add live video streaming in one of my app; I am using Wowza Streaming Cloud for the same. I am using REST Api to make it as my requirement.
The flow I had used is:
Create a stream
Start stream
Check status unless it is "started"
if the status is started, I start broadcasting video.
It goes well sometimes, but sometimes when I try to broadcast even after starting the stream, it says:
Status is idle, An error occurred when trying to connect to host: (code = 15)
Also I see a green screen on player side, and the video on player side is not continuous, it keeps on fluttering.
For Player I used the code provided in sample app.
For Broadcasting I had used GoCoder SDK wherein I set all of the properties like host address, port, app name, stream name, etc.
Do I have to set bitrate or anything?
Where am I wrong?
That error occurs when the entrypoint itself is open for more than 20 minutes without a connection. Once you get an IP returned from the API for the stream, you can connect to it right away. The errors you're getting are showing idle due to lack of connection and it sounds like the timing between starting the event, checking the event, and then finally connecting are hitting this restriction.

WebRTC iOS Audio Chat

I am creating a voice only (no video) chat application. I have created my own node.js/socket.io based server for signaling.
For WebRTC, I am using the following pod: https://cocoapods.org/pods/WebRTC
I have been successful in creating peer connection, adding local stream, setting local/remote sdp, and send/receive ice candidates. The "didAddStream" delegate method is also called successfully having audio tracks but I am stuck here. I don't know what should I do with the audio track. What should be the next step? How would I send/receive audio on both sides?
Also, if I integrate CallKit, what changes do I need to make.
I got stuck on this one too. You have to retain the RTCMediaStream object in order for the audio to play. You don't need to do anything with the RTCAudioTrack, it will play automatically. I simply assign it to property so it can get retained. See my example here: https://github.com/redfearnk/WebRTCVideoChat/blob/master/WebRTCVideoChat/WebRTCClient.swift#L143

Youtube Live Broadcast Status

I am going to embed a Youtube live event on my site. I want to be able to output the Broadcast Status. So if the event is on hold, I want to display "On Hold", if it's live, I want to display "Live", if it's over, I want to display "Event is Over", etc.
Is this possible?
This is possible with the liveBroadcasts/list endpoint.
part -> id, status
id -> The Video ID if your Live Broadcast object
HTTP GET: GET https://www.googleapis.com/youtube/v3/liveBroadcasts?part=id%2Cstatus&id={video_id}&key={YOUR_API_KEY}
The status dictionary returned might look something like this:
"status": {
"lifeCycleStatus": "complete",
"privacyStatus": "unlisted",
"recordingStatus": "recorded"
}
The value for the lifeCycleStatus is what you're looking for. This can be one of several values:
abandoned – This broadcast was never started.
complete – The broadcast is finished.
created – The broadcast has incomplete settings, so it is not ready to transition to a live or testing status, but it has been created and is otherwise valid.
live – The broadcast is active.
liveStarting – The broadcast is in the process of transitioning to live status.
ready – The broadcast settings are complete and the broadcast can transition to a live or testing status.
reclaimed – This broadcast has been reclaimed.
revoked – This broadcast was removed by an admin action.
testStarting – The broadcast is in the process of transitioning to testing status.
testing – The broadcast is only visible to the partner.
It is possible but you need to map the status depending upon the data is coming thorough your stream or not. It will all depends on how you are tracking the YouTube traffic on your webpage.

Resources