I am currently working on developing a layout system for creating both text and video content. Currently, I do not encounter any issues when saving the data using stage.toJSON() to the database. However, I am facing a problem with loading it on another page.
The text displays without any issues, but I'm encountering difficulties with displaying the video content. Although no errors are appearing in the console, the video is not being shown consistently. Occasionally, after 20-30 refreshes, it will appear once.
Could anyone assist me in identifying the problem in my code?
Hello. I see that after loading a JSON you are adding NEW Konva.Image into the canvas with video source.
I think it is better to reuse existing instance.
I am currently working on developing a layout system for creating both text and video content. Currently, I do not encounter any issues when saving the data using stage.toJSON() to the database. However, I am facing a problem with loading it on another page.
The text displays without any issues, but I'm encountering difficulties with displaying the video content. Although no errors are appearing in the console, the video is not being shown consistently. Occasionally, after 20-30 refreshes, it will appear once.
Could anyone assist me in identifying the problem in my code?
load data on another page :
konva.js :
Result :