Code Monkey home page Code Monkey logo

Comments (4)

MrOtherGuy avatar MrOtherGuy commented on May 27, 2024

What exactly do you see? I don't think I understand the situation you are facing. When I try the style, it will show a "play" icon in the tab if Firefox blocked automatic playback in that (background) tab.

  1. Go to youtube.com
  2. Hold Ctrl and click some video
  3. The video opens in a background tab

Results a "play" icon is shown and clicking it will start playback and the icon changes to "mute" icon.

I would imagine that if you have some extension blocking playback then this might not work because chances are that the extensions will stop the playback only after it has started - like in a first frame or something. I doubt there's anything you can do about that since technically the playback was stopped, not blocked.

from firefox-csshacks.

casualbugs avatar casualbugs commented on May 27, 2024

Yes you are right. I am trying to replicate the behaviour of chrome

Scenario 1: Open new youtube link in a seprate tab
Current Behaviour: Shows play icon
Desired Beaviou: No play icon

Scenario 2: Video playing in a background tab
Current and Desired behaviour: Show speaker icon

I am trying to remove the play icon completely when firefox blocks automatic playback. For me the speaker icon is useful in tracking down which tab is playing audio.

Hope this clarifies and thanks for the help!

from firefox-csshacks.

MrOtherGuy avatar MrOtherGuy commented on May 27, 2024

Alright, I see. In this case you can just add this to the style:

.tab-icon-overlay[activemedia-blocked]{ display: none }

from firefox-csshacks.

casualbugs avatar casualbugs commented on May 27, 2024

Thanks that worked!

from firefox-csshacks.

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.