You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running a single page app on Electron using AngularJS, recently I find there are some memory issues on my app, here's what I did and see:
Rendering a player in one view and play a video via rtsp stream
Go to another view and do something
Back to the first view, play another video
In this time the progressbar is jumping between the old video's time and the new one's. one thing to mention is that I was doing clearPlaylist before when leaving my page.
Then I digged into wcjs-player's index.js, and find that you wrote some code to clear related stuffs when page is reload, unfortunately that event is not triggered in single page app, so I added a testing function in wjs's prototype, which is a logic duplicate of the function called before page unload:
It saved my day, could we add a function call rather than a listener in wcjs-player to support single page app?
The text was updated successfully, but these errors were encountered:
what i don't like about this is that a true .destroy() function should also remove the entirety of the HTML code from the page too, not just unload the node modules and stop the player
@jaruba I got you. But I did use .clearPlaylist(), who called .stop() inside when leaving my view, but it doesn't help. I know the naming may not be appropriate, but what I want is to do the same thing when leaving my view like what you do in your listener who linsten to window's beforeunload event.
I'm running a single page app on Electron using AngularJS, recently I find there are some memory issues on my app, here's what I did and see:
Rendering a player in one view and play a video via rtsp stream
Go to another view and do something
Back to the first view, play another video
In this time the progressbar is jumping between the old video's time and the new one's. one thing to mention is that I was doing
clearPlaylist
before when leaving my page.Then I digged into wcjs-player's index.js, and find that you wrote some code to clear related stuffs when page is reload, unfortunately that event is not triggered in single page app, so I added a testing function in wjs's prototype, which is a logic duplicate of the function called before page unload:
It saved my day, could we add a function call rather than a listener in wcjs-player to support single page app?
The text was updated successfully, but these errors were encountered: