Hi there, I responded to another thread regarding this topic but it’s quite old so I thought a new one might be in order.
Essentially I’m wondering what are the best options for publishing a pre-recorded video to a session. So if I have a URL for example, https://example.com/myvid.mp4, what is the best way to display that video in a synchronized manner to all my session subscribers?
Option 1:
The older thread suggested using OpenVidu’s signal() method to essentially just play the downloaded video at the correct time. Essentially, the “admin” signals the pre-recorded video to start, all subscribers receive that signal, and the video starts playing at the same time for everyone. This method works great and the quality is fantastic obviously as it bypasses the OpenVidu server almost entirely but the major drawback as far as I can see is that you can’t take advantage of OpenVidu’s recording module.
Or you could, but the session recording would be missing the segment with the pre-recorded video. Any solutions to this particular problem would be amazing.
Option 2:
Another option I recently spent a lot of hours on was trying to use HTMLMediaElement.captureStream() to get the video and audio tracks from a video element (with the src set to my video URL) and then passing those tracks to my publisher.
Unfortunately, it seems like captureStream() is still a very buggy API on both Chrome and Firefox. I could get the video to appear for subscribers (although Chrome has some issues that require workarounds) but it seems like audio just doesn’t work for some reason (even though it was working on previous versions of both Chrome and Firefox apparently).
Option 3:
Another option I saw was doing a screen share (using mediaDevices.getDisplayMedia() which offers audio sharing capabilities depending on the browser/operating system) and then playing the video in the tab/window that is shared. However in my tests of this, the video/audio quality was pretty poor.
Option 4:
In the previous thread, I also the suggestion of using the KurentoPlayer API directly somehow to do this but I’m not even sure where to begin with that to be honest. Any suggestions on this would also be appreciated.
Thanks!