Cannot get MediaStream from Electron app to browser via Openvidu media server

Hi all,
I’m currently having an issue with openvidu-browser-2.17.0.js
I’m trying to transfer a camera stream from RTSP to an Openvidu media server deployed on cloud and get the stream back on the browser.

The RTSP stream was converted into an HLS stream using FFmpeg and played using hls.js. It was captured in an video tag in HTML and I used the HTMLMediaElement.captureStream().getVideoTrack() to generate MediaStreamTrack and passed it into the videoSource property in initPublisher. This publisher part was wrapped in electron. Then, the stream was connected to our cloud Openvidu server deployed on-premises exactly like in the Docs (OpenVidu Docs). The subscriber part is a simple HTML page displayed on the browser to get the stream from the cloud server. The subscriber is responsible for creating session and generating stream from the media server when streamCreated event occurs.

The whole workflow worked nicely when we tested it with our webcam, however, when we use MediaStreamTrack of our stream video instead of webcam, the subscriber part only showed the blank video.

Does anyone know what the issue is? Thanks!

Describe the bug
Cannot get MediaStream from Electron app to browser via Openvidu media server.

Expected behavior
Receive the stream from the Electron app to browser via Openvidu media server.

Wrong current behavior
Only get blank video

Client device info (if applicable)

  • Chrome Version 91.0.4472.77 (Official Build) (64-bit) on Windows 10 Version 10.0.19042 Build 19042

Screenshots

  • The blank video in the subscriber:
    image

  • The webcam test worked fine:
    image

Additional context