Update stream's typeOfVideo property on 'streamPropertyChanged' events

Hi there, right now we use replaceTrack across our application in order to change the video source (I.E. camera to screen share, back to camera, etc…).

It would be really, really useful to have the typeOfVideo property updated when ‘streamPropertyChanged’ events are fired.

Are there any plans to add this in the future? (Or perhaps is there a convenient way of doing this already?)

Hi,

Unfortunately method Publisher#replaceTrack does not necessarily mean the typeOfVideo property has changed, so openvidu-browser cannot just assume that.
If you need to notify the rest of the session participants about any kind of change, you can just send a custom signal: Send text messages - OpenVidu Docs

Thanks for your response @pabloFuente.

I understand that the typeOfVideo property won’t change in all cases (I.E., you replace a webcam video track with another webcam video track, the typeOfVideo property is the same value in a case like this).

But I don’t understand why not fire a streamPropertyChanged event when the typeOfVideo property changes?

Because typeOfVideo property does not change automatically. Stream properties only change upon calls to the API. And as we have already established, there is no method that we can assume that will change that property.

OK understood. Thanks @pabloFuente