In the end, the answer was not to attach the video stream to HTML, but to upload it to a Flash Player file. We have completed the introduction of JWPlayer in the application and its playback of the video stream from the media server. However, something similar can be done to have a kind of video chat application. You can create a SWF file that implements the ExternalInterface class in ActionScript so that you can expose the necessary functions for JavaScript.
source share