# Dynamically add video/audio tracks

**URL:** <https://openvidu.discourse.group/t/dynamically-add-video-audio-tracks/2795>\
**Category:** How to implement?\
**Tags:** v2\
**Created:** [March 8, 2021, 6:17pm UTC](https://openvidu.discourse.group/t/dynamically-add-video-audio-tracks/2795 "2021-03-08T18:17:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xkarydis](https://avatars.discourse-cdn.com/v4/letter/x/a8b319/32.png) [@xkarydis](https://openvidu.discourse.group/u/xkarydis)\
**Post date:** [March 8, 2021, 6:17pm UTC](https://openvidu.discourse.group/t/dynamically-add-video-audio-tracks/2795/1 "2021-03-08T18:17:58Z")

</div>

Hello. I am using the OpenVidu service for a video call in our company Android application.

There are some functionalities that I would like to add to the call and I want some advice from you about those.

1. I want to dynamically toggle the video or audio tracks from the call. Which means that

- for the Audio, when i mute the microphone of the device i want also to remove the track from the connection and when i press it again i want to add it.
- for the Video, same as above, when i close the camera i want to remove the videoTrack from the call and when i press again to add it back again.

All these without ending the call. What is the proper way of doing this?

1. I want to set, at the beginning of the call, the FPS and the resolution (width, height) of the video that i send to the participants. I do this in two places

- In the PublishVideo function publishVideoParams[“videoDimensions”] = “{“width”:” + videoHeader.width + “, “height”:” + videoHeader.height + “}”
- In the LocalParticipant VideoCapturer videoCapturer.startCapture(videoHeader.width, videoHeader.height, videoHeader.fps)

However, i can clearly see that the video that i send not corresponding to the changes i make. Is there something that I miss?

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [March 8, 2021, 9:54pm UTC](https://openvidu.discourse.group/t/dynamically-add-video-audio-tracks/2795/2 "2021-03-08T21:54:54Z")

</div>

@CSantosM do you have any hint on how to change publisher resolution in the Android demo application?

Best regards

---

<div class="post-metadata">

**Author:** ![xkarydis](https://avatars.discourse-cdn.com/v4/letter/x/a8b319/32.png) [@xkarydis](https://openvidu.discourse.group/u/xkarydis)\
**Post date:** [April 2, 2021, 1:14pm UTC](https://openvidu.discourse.group/t/dynamically-add-video-audio-tracks/2795/3 "2021-04-02T13:14:00Z")

</div>

I got an email from the technical support team that specified that the current version does not support publisherVideoResolution change on demand. I am still searching for a solution!

---

<div class="post-metadata">

**Author:** ![micael.gallego](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/micael.gallego/32/2_2.png) [@micael.gallego](https://openvidu.discourse.group/u/micael.gallego)\
**Post date:** [April 2, 2021, 5:07pm UTC](https://openvidu.discourse.group/t/dynamically-add-video-audio-tracks/2795/4 "2021-04-02T17:07:16Z")

</div>

Adding and removing tracks dynamically is not possible in OpenVidu.

We are working on it, but we don’t know when it will be available.

---

<div class="post-metadata">

**Author:** ![xkarydis](https://avatars.discourse-cdn.com/v4/letter/x/a8b319/32.png) [@xkarydis](https://openvidu.discourse.group/u/xkarydis)\
**Post date:** [April 28, 2021, 10:29am UTC](https://openvidu.discourse.group/t/dynamically-add-video-audio-tracks/2795/5 "2021-04-28T10:29:23Z")

</div>

I guess there is a way to do that through the onStreamPropertyChanged callback with videoActive/audioActive set to true or false respectively
