bartbutenaers / node-red-dashboard-2-ui-video

A Node-RED node for playing video in dashboard D2
Apache License 2.0
1 stars 0 forks source link

Check browser refresh #12

Open bartbutenaers opened 2 weeks ago

bartbutenaers commented 2 weeks ago

All the dynamic properties (overridden via input messages) are being stored in the state store on the server side. Which means that after refreshing the browser screen, everything should still work fine.

Needs to be tested

bartbutenaers commented 1 week ago

Not sure yet if it is related to this issue, but got this test feedback from Kevin:

if I disable the video node and deploy, the re-enable and deploy, that it remembers the previous data sent to it. That is probably how you designed it(so that it remembers old state), but I was expecting to have a clean node deployed. I found myself deleting the old video node and creating a new one to clear the remembered state. In my browser debug console, I have checked Disable cache. If I refresh the browser after generating the video and poster, then it all seems to load ok. With a brief view of the poster, followed by the video loading. Not sure what you think it's reasonable, but can I send an empty string to remove old values sent to the front end, or maybe it has to be undefined, not sure. In my old video player, I would send the payload as empty string "" to indicate that the video source is no longer available. With yours, I am setting msg.ui_update.url and msg.ui_update.readyPoster to "" to try to have the same effect.

bartbutenaers commented 3 days ago

Seems the dynamic properties are being refreshed correctly, thanks to the state store. However a playing video will not play anymore after the refresh. The messages (inclusive their payload) are being stored and loaded correctly, but it should be taken into account in the video load code snippet.