-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with Loading Multiple Live Streaming Videos Using offline jsmpeg.min.js File #271
Comments
What do you mean the "local jsmpeg.min.js file"? This library does not bundle JSMpeg, we always load it from the CDN.
We already do this, when you call Line 53 in e1b91b5
We also have end-to-end tests which run in GitHub Actions and confirm that multiple live streams on the same page are already supported. This is the frontend code for that test case: Lines 77 to 89 in e1b91b5
If this is not working for you, perhaps you could share more information about the browser/platform that your using? |
I have an Electron program that needs to run in an environment where CDN access is not possible. I can confirm that when window.JSMpeg exists, the JSMpeg object reuse occurs. Here are the tests I just conducted. An Electron program that includes the following configurations
index.vue
When using the offline jsmpeg.min.js fileindex.html
test in electron devtools
When not loading jsmpeg.min.js in index.html (Using CDN)
Use the 'rtsp-relay/browser' that I have modified
|
Hi, first of all, thank you for your module, which has saved me a lot of time.
I noticed that the rtsp-relay repository behaves differently when using the jsmpeg.min.js file from a CDN compared to using it locally. While using the CDN version, it can successfully play multiple live streaming videos (in my case, it's 3 videos),I suspect that each video is using a different JSMpeg object at this time. However, when using the local jsmpeg.min.js file, no video can be loaded. After investigation, I found that this is due to the issue of JSMpeg object reuse when using offline files.
Steps to Reproduce
Use the local jsmpeg.min.js version.
Attempt to load multiple live streaming videos.
All videos will not play properly, and there will be no error reminders on the console.
Expected Behavior
Expect that when using the local jsmpeg.min.js version, it should be able to successfully load multiple live streaming videos, similar to when using the CDN version.
Actual Behavior
None video is successfully loaded, and all fail to play.
Proposed Solution
I have identified the issue and proposed a solution: this is caused by the reuse of the JSMpeg object. In the proposed solution:
Create a new JSMpeg object when loading each video instead of reusing the existing one.
Ensure that each video has its own independent playback instance to avoid issues caused by object reuse.
Additional Information
Version Used: 1.9.0
I will provide my solution in case someone encounters the same problem and doesn't need to waste 6 hours like me
create file
src\assets\rtsp-relay-browser.js
copy fromnode_modules\rtsp-relay\browser\index.js
Make the following modifications
The text was updated successfully, but these errors were encountered: