2 producers and 1 consumer

Consumer connected to 1st producer, I would like to switch transparently/immediately (without visible video glich) to 2nd producer.
the steps of switching them:
destroy original consumer, and create new consumer with 2nd producer.
and create client consumer with media stream(with new transport id).

the switch work ok, but visible glich when switch happening.
How to make switch from 1st producer to 2nd producer without visible glich?

Thanks in advance.

You can have two video elements and use the readyState to switch visibility. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState

@aetheon Thank you for tip.
In this case - i need to use 2 times bandwidth.
The original code was uses kurento - there nothing to do just switch inside pipeline, very fast source changing. and no glich.

There any way to implement switching without video glich, and 2 times bandwidth?

Just do that when switching. ReplaceTrack might be another way of doing it not sure if you can interfere with an existing consumer.
I’m sure you could proxy that but have no idea what’s involved sorry.

No idea why you are creating a new transport for receiving the second consumer, it does not make any sense. Fix that and you won’t have any glitch if you wait for proper video readyState when creating the second consumer.

@ibc, thank you for advice,
We will try.