I just spent 7 days and nights re-writing youtube code, just due to these autoplay issues. Google staunchly ignores all changes to Chrome:
https://developer.chrome.com/blog/autoplay/
and Chrome based browsers (personally using Edge 115) don't implement autoplay restriction properly. First, let's try something simple:
<video controls = "" class="video-stream html5-main-video" style="width: 480px; height: 640px" src="file:///c:/copy/1.mp4"></video>
Play:
Document.prototype.getElementsByTagName.call(document, "video")[0].play()
If "AutoplayAllowed" is set to 0 in the policies, video does NOT play. After much ado I managed to scribble this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"AutoplayAllowed"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\AutoplayAllowlist]
"1"="file:///*"
"2"="https://www.youtube.com"
Now local videos play, but making an autoplay exception for youtube, I don't feel good about that. Also, out of purely academic interest, let's try youtube with autoplay disabled. This is what happens (keep in mind that google promised with huge pomposity to protect chrome users from annoyances like autoplay):
if you open a youtube video by opening an url thru the address bar, videos do NOT play
if you have a youtube page already open and click on a video /shorts video on the page, newly opened video DOES play
if you add a youtube bookmark pointing to a page containing a video to Chrome and open it:
if you are currently on a youtube page when using the bookmark, video plays
if you are NOT on an youtube page when using the bookmark, video does NOT play on page being opened
if you open a video on youtube and the video's paused (due to chrome autoplay restrictions or because you messed with their code, because otherwise it WILL autoplay) and you enter video fullscreen mode for the first time, video suddenly starts playing, really annoying. I found the code that does it (inside desktop_polymer_enable_wil_icons.js), here's google logic for you, they think if a user fullscreens a video, he also intends to play it right away.
If you open a youtube shorts page and the first shorts video doesn't play due to chrome restrictions, if you then scroll down the page without first playing the very first video manually, all further shorts videos will be broken (event listeners missing, the play button on the shorts video works, but clicking on shorts video background does nothing). Obviously, Google's left youtube-developers hand doesn't know what their right chrome-developers hand is doing.
Bottom line: you want to prevent autoplay, you have to re-write the code yourself, injecting it on the fly into the page or redirecting to your own scripts by means of a browser proxy