Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
Is your feature request related to a problem? Please describe.
There is no event/callback for when localStream has been set/changed. We need this to be able to render the video element.
Initializing webRTCAdaptor with localVideoId is not an option since we are using React, and need to render video elements according to what streams (local/remote) are available, i.e. we can't have a video-placeholder that webRTCAdaptor modifies..
Describe the solution you'd like
A callback like localStreamAvailable (or similar) that triggers when the localStream is updated. It should probably also include the stream in question. (can also ofc be fetched from webRTCAdaptor.mediaManager.localStream)
Probably triggering the callback at the end of mediaManager.gotStream() would be sufficient? :thinking:
Describe alternatives you've considered
Now, if we want to keep track of the local stream, we would have to have an interval or something running to check its state...
Alternatively we could listen to newTrackAvailable, but that one @mustafaboleken said is probably a bug that it triggers for localStream (So I'm guessing it will be fixed...), and that callback arrives way too late...
Is your feature request related to a problem? Please describe.
There is no event/callback for when
localStream
has been set/changed. We need this to be able to render thevideo
element.Initializing
webRTCAdaptor
withlocalVideoId
is not an option since we are using React, and need to render video elements according to what streams (local/remote) are available, i.e. we can't have avideo
-placeholder thatwebRTCAdaptor
modifies..Describe the solution you'd like
A callback like
localStreamAvailable
(or similar) that triggers when the localStream is updated. It should probably also include thestream
in question. (can also ofc be fetched fromwebRTCAdaptor.mediaManager.localStream
)Probably triggering the callback at the end of
mediaManager.gotStream()
would be sufficient? :thinking:Describe alternatives you've considered Now, if we want to keep track of the local stream, we would have to have an interval or something running to check its state...
Alternatively we could listen to
newTrackAvailable
, but that one @mustafaboleken said is probably a bug that it triggers for localStream (So I'm guessing it will be fixed...), and that callback arrives way too late...