Two video are added to conference room

When trying to add screen share and camera continuously. Facing two video tracks added error. Is there any way to wait for the old track to remove and add track and add new track.
Can you please help me