# Update stream's typeOfVideo property on 'streamPropertyChanged' events

**URL:** <https://openvidu.discourse.group/t/update-streams-typeofvideo-property-on-streampropertychanged-events/3918>\
**Category:** Request for enhancement\
**Created:** [April 23, 2022, 5:04am UTC](https://openvidu.discourse.group/t/update-streams-typeofvideo-property-on-streampropertychanged-events/3918 "2022-04-23T05:04:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phil917](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/phil917/32/58_2.png) [@phil917](https://openvidu.discourse.group/u/phil917)\
**Post date:** [April 23, 2022, 5:04am UTC](https://openvidu.discourse.group/t/update-streams-typeofvideo-property-on-streampropertychanged-events/3918/1 "2022-04-23T05:04:50Z")

</div>

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?)

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [April 25, 2022, 9:53am UTC](https://openvidu.discourse.group/t/update-streams-typeofvideo-property-on-streampropertychanged-events/3918/2 "2022-04-25T09:53:41Z")

</div>

Hi,

Unfortunately method [Publisher#replaceTrack](https://docs.openvidu.io/en/2.21.0/api/openvidu-browser/classes/Publisher.html#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](https://docs.openvidu.io/en/2.21.0/cheatsheet/send-messages/)

---

<div class="post-metadata">

**Author:** ![phil917](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/phil917/32/58_2.png) [@phil917](https://openvidu.discourse.group/u/phil917)\
**Post date:** [April 25, 2022, 7:40pm UTC](https://openvidu.discourse.group/t/update-streams-typeofvideo-property-on-streampropertychanged-events/3918/3 "2022-04-25T19:40:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pabloFuente](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/pablofuente/32/2536_2.png) [@pabloFuente](https://openvidu.discourse.group/u/pabloFuente)\
**Post date:** [April 26, 2022, 8:47am UTC](https://openvidu.discourse.group/t/update-streams-typeofvideo-property-on-streampropertychanged-events/3918/4 "2022-04-26T08:47:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![phil917](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/phil917/32/58_2.png) [@phil917](https://openvidu.discourse.group/u/phil917)\
**Post date:** [April 26, 2022, 6:42pm UTC](https://openvidu.discourse.group/t/update-streams-typeofvideo-property-on-streampropertychanged-events/3918/5 "2022-04-26T18:42:42Z")

</div>

OK understood. Thanks @pabloFuente
