It is related to the video players. I use TencentPlayer Lite to my use in my project.
So I customize that player by making it a component so I can add it to another component.
The TencentPlayer Lite needs to run the import script or use ES Module but I don't how to use it so I decided to use the Script in Nextjs to import it.
The Script is already optimized so it will not load again on the same page with the same src , it will load when the script scr change.
As of Next.js, this kind of problem occurs in development mode because of hot-module-replacement. But in production, it will only load once; therefore, don't worry about it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.