Facebook Auto Unmute

Automatically unmutes all Facebook videos and reels when they start playing

// ==UserScript==
// @name         Facebook Auto Unmute
// @namespace    CustomScripts
// @description  Automatically unmutes all Facebook videos and reels when they start playing
// @author       areen-c
// @match        https://www.facebook.com/*
// @version      1.0
// @license      MIT
// @icon         https://www.google.com/s2/favicons?sz=64&domain=facebook.com
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    document.addEventListener('play', function(event) {
        const videoElement = event.target;

        if (videoElement instanceof HTMLVideoElement && videoElement.muted) {
            videoElement.muted = false;
            videoElement.volume = 1.0;
        }
    }, true);
})();