Hi all,
I’m asking this in off topic - because I don’t believe it’s directly related to Media Soup (though… it could easily be related to my implementation/usage). I think it’s more to do with what I’m trying to do within a React app with media tracks. I’m looking for anyone who’s potentially experienced similar behavior (and what might resolve it).
I’m setting up multiple consumers and streaming data within a react app. So the browser ends up with multiple media streams displaying at a single time. I’ve got a “main” element - which is centered and I essentially toggle those streams in to the “main” element (the user selects which stream they want to be large and centered). This works, but I’m finding that after toggling, the video element is blank until I do some interaction, as if playback isn’t starting within that main element - So I just get a blank space until I either do something with the dom or tab to another window and back.
I thought that this must have been an auto-play policy within the browser - but having muted attributes on the elements doesn’t seem to help.
I then thought it might have needed some pause/resume actions - so I ensured that consumers were created as paused and then resumed after created (this idea was taken from the docs which indicate that it’s best practice to create consumers in paused state).
Next thing I thought was that maybe that toggling the video between elements in the app may need new keyframes as if it were starting playback as a new stream. I tried more pausing/resuming experiments and keyframe requesting - which did not seem to help.
then I got to where I am at now… wondering if just the act of dynamically moving tracks around between elements is just nasty…
would love to know if other people have any thoughts.
thanks!