[Help] Embed Youtube Video buffering

I’m trying to make a resource in order to play Youtube vids.
Everything seems to be OK, my vid is loaded and start playing when I invoke the debug command.

But most of the time (if not anytime), it ends by infinite buffering, and quite never goes to it’s ends. Vid is 1m52 long. And my internet is OK (no buffering at all on my everyday browser)

My resource is only a .lua (to manually start the vid) and a .html (which contains JS inline) file.

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

client_script 'intro.lua'

ui_page 'index.html'
files {
	'index.html',
}
<iframe id="ytvideo"
        src="https://www.youtube.com/embed/<mykeyhere>?enablejsapi=1;modestbranding=1;autohide=1;showinfo=0;controls=0"
        width="100%" height="100%"
        frameborder="0"
></iframe>

How can I prevent this infinite buffering thing ?

Some help about it
https://www.w3schools.com/html/html_youtube.asp

This maybe can help you to:


In anytime you watch the video without buffering?

On my firefox uptodate, no buffering at all (I got fiber 300/100 at home)
On FiveM CEF, almost every time, it buffers, quite always after 5-10 sec ‘only’.

I tried to modify my resource html (js), modifying the youtube iframe arguments to be the same as the resource you linked, but same shit :confused: