-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an API to know if createEncoded{Audio,Video}Streams was called #13
Comments
I kind of think that throwing an exception is a fine way of querying the interface.... I don't quite get the use case for querying whether or not cretaeEncoded*Streams has been called when you don't intend to call it at once. |
On complex codebases (we ran into this on Jitsi Meet) there many placess where that might need to be called. Keeping track of it is not very simple on such large codebases, hence our desire for an API which would allow us to remove the "workaround". |
Complex codebases are complex. Phrasing the question differently ... are there places where you need to query this property where you do not want to initialize at once? And why not? |
No, I don't think we have that use-case as of yet. We want to check and enable it if it's not already enabled. I guess it boils down to a "look before you leap" vs "ask for forgiveness than permisssion" approach to the API. |
if this had been python, the clear advice would be to try & ask forgiveness; in C++ it's the other way around. In Javascript, I feel like it's 2/3 try & ask, and 1/3 look-before-leap, so I'm unsure. |
Since the updated API doesn't have createEncodedStreams() any more, I'm closing this issue. |
Hey there!
While integraating this on Jitsi Meet we ran into the case of calling
createEncodedVideoStreams
more than once by mistake. This currently throws an exception, which is nice, but there is no way to know in advance if we already created the encoded audio / video stream.We solved it by using a custom hidden (with a Symbol) attritute on the sender / receiver, but it would be nice to be able to have an "official" API for this.
The text was updated successfully, but these errors were encountered: