Giter Club home page Giter Club logo

Comments (5)

PenguinSoupX avatar PenguinSoupX commented on June 19, 2024 1

Awesome, this works
Thank you so much.

from globalspeed.

PenguinSoupX avatar PenguinSoupX commented on June 19, 2024 1

Just wanted to give a heads up for anyone running into this issue in the future, the script works but seems to have problem running along with Plasma Integration by KDE addon in Firefox on Linux.
So, when using the addon to unmute videos, it turns out the "enhanced media controls" option in preferences in the Plasma Integration messes with the script.
Just turn that off and it should work perfectly.
2024-01-03_10-15

from globalspeed.

polywock avatar polywock commented on June 19, 2024

This javascript should work for most websites. You can add a URL rule that loads it on relevant sites. Let me know if there's any problems setting it up.

  1. Open options page and go down to URL Rules section.
  2. Create a URL rule.
  3. Enable 'ILO' so the script doesn't load twice.
  4. Click -- 0 -- to change the URL conditions.
  5. Add the websites you want the script to load on.
  6. Change the URL Rule's mode from 'speed' to 'javascript. Click edit, and paste in the javascript I provided below.
window.addEventListener('volumechange', e => {
    e.target.muted = false 
    e.defaultMuted = false 
}, true)

setTimeout(() => {
    document.querySelectorAll('video').forEach(v => {
       v.muted = false
       v.defaultMuted = false 
    })
}, 1000)

from globalspeed.

PenguinSoupX avatar PenguinSoupX commented on June 19, 2024

Thank you for reaching out this quickly but sadly this doesn't work.
This is a clip of the issue, which was made after adding the URL rule.
https://streamable.com/kmarv0

from globalspeed.

polywock avatar polywock commented on June 19, 2024

Maybe this.

window.addEventListener('playing', e => {
    e.target.muted = false 
    e.defaultMuted = false 
}, true)

setTimeout(() => {
    document.querySelectorAll('video').forEach(v => {
       v.muted = false
       v.defaultMuted = false 
    })
}, 1000)

from globalspeed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.