Giter Club home page Giter Club logo

Comments (11)

mounirlamouri avatar mounirlamouri commented on July 19, 2024

Because it's not mentioned above, I believe that document.autoplaPolicy should look like this:

partial interface Document {
  readonly attribute Promise<AutoplayPolicy> autoplayPolicy;
};

from autoplay.

jernoble avatar jernoble commented on July 19, 2024

Is there any precedent for a readonly attribute Promise? It seems really weird to have a resolved Promise for a value that can change over time.

from autoplay.

mounirlamouri avatar mounirlamouri commented on July 19, 2024

from autoplay.

cpearce avatar cpearce commented on July 19, 2024

Is there any precedent for a readonly attribute Promise? It seems really weird to have a resolved Promise for a value that can change over time.

Will spin this off into issue 6.

from autoplay.

tadas-subonis avatar tadas-subonis commented on July 19, 2024

Can this have also an explicit permission request like notifications?

    if (Notification.permission === "granted") {
      console.log("We have notification permission");
      return;
    }
    Notification.requestPermission();

At the moment, the way autoplay blocking is implemented is breaking VoIP applications that are waiting for somebody to call and only then ring the sounds (w/o user interaction).

from autoplay.

mounirlamouri avatar mounirlamouri commented on July 19, 2024

from autoplay.

tadas-subonis avatar tadas-subonis commented on July 19, 2024

What I meant is that it doesn't have to be accessible ONLY through permissions.

At the moment, there are multiple mechanisms that disable the behaviour: https://sites.google.com/a/chromium.org/dev/audio-video/autoplay

Adding additional exception, when "audioapi" permission is granted would work perfectly. This way chat/voip developers will be able to request relevant permissions upon the start of the application, and it won't change the flow for the others.

from autoplay.

cpearce avatar cpearce commented on July 19, 2024

I think the WebRTC use case is separate and distinct from the annoying cases that browsers are mostly trying to block, and is probably only blocked because it passes through the same top level API surface; HTMLMediaElement.play().

Firefox allows sites which have been granted persistent camera and microphone permissions to autoplay, in order to permit cases like you're describing. Our opinion was that since the browser explicitly prompts the user for permission for the site to access the camera/microphone before a WebRTC stream plays, the user has clearly signaled intent to allow media on that site. Maybe you should file bugs with the other browsers asking them to implement the same exception?

from autoplay.

mounirlamouri avatar mounirlamouri commented on July 19, 2024

Chrome and Safari both allow autoplay while a page is using getUserMedia. It seemed a bit better than only relying on the permission.

from autoplay.

a2sheppy avatar a2sheppy commented on July 19, 2024

Would appreciate a heads-up when a specification is available for this, as this falls into my bailiwick docs-wise.

from autoplay.

alastor0325 avatar alastor0325 commented on July 19, 2024

Close this issue because this is just for some old discussion, and we already started editing a specification for Autoplay Detection API.

from autoplay.

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.