The fetch method to download file is not working for Firefox (cors problem most of the time).
A better way is to use the tampermonkey downloader. Simply add @grant GM_download to script headers then change the function downloadResource by GM_download(url,filename+".mp4")
GM_download is done with webext. So no cross-origin problem.
I have to fix the script at every update 😅