This was possible before WebExtension. Unfortunately, it is not possible now. And your suggestion is a security nightmare as it could download malicious code that masked as video automatically.
My current setup is Video DownloadHelper + JDownloader 2. I have VDH set to copy the direct URL of the video only. And JD2 will detect the video url via clipboard monitoring and will prompt to download the video.
I believe it is still possible to do it in PaleMoon and WaterFox (fork of Firefox). They still uses XUL which it was before Mozilla decide to move to WebExtension. However a warning, they are not current with securities updates as Firefox are. I believe they are few version behind.