Skip to content
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

Even if you destroy mpegtsPlayer, Detached HTMLVideoElement will still remain in the browser. #181

Open
omega0928 opened this issue Apr 3, 2024 · 0 comments

Comments

@omega0928
Copy link

I'm working on a React project to create a dashboard that switches between two screens once every 5 seconds. One screen is comprised of two mpegtsPlayer (mpegtsPlayer1, mpegtsPlayer2) to show two difference video sources and the other screen is comprised of other vector graphics (no mgpegtsPlayer).

I have configured so that when the switch occurs, the two players get destroyed and created again once the screen is switched back - to reduce network usage. (see below for destroying the object)
스크린샷 2024-04-03 오전 10 29 11

When doing so, I find that number of ‘Detached HTMLVideoElement’ AND ‘MediaSource’ doubles every time the screen is switched. Please see the below.

(2 Detached HTMLVideoElement and MediaSource when first rendered)
image
(4 Detached HTMLVideoElements and MediaSource when rendered the second time)
image
(6 Detached HTMLVideoElement and MediaSource when rendered for the third time)
image

This results in performance slow down as you can see that Nodes and Listeners increase in steps.
image

Can you help me in this regard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant