Coder Social home page Coder Social logo

Comments (6)

avayvod avatar avayvod commented on June 12, 2024

Hm, I don't propose clearing the set though - it might also break sites when they try to cancelWatchAvailability with the callback ids they saved and it suddenly throws an exception.

@beaufortfrancois FYI

from remote-playback.

mfoltzgoogle avatar mfoltzgoogle commented on June 12, 2024

So "stopping" is more like "pausing" is what you are saying. Presumably there would also be steps to "resume?"

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

So, I think two cases - one when the page adds disableRemotePlayback attribute to a media element. The page then can expect the callbacks not being fired and the availability be ignored. One may argue that the callbacks could be set by a media player library and the attribute set by the hosting page, but the attribute mutation can be observed via MutationObserver and so on. I don't think the spec needs to change for this case.

Now the second case brought up in the PR #83 is when the user disables availability monitoring or even remote playback, for example, using the web browser settings. This is an external event to the page so I think the user agent needs to behave in a non breaking way, consistently with the API. Which means not clearing the callbacks and report availability as false. "Resume" in this context happens when the user changes the setting back. In this case, the existing callbacks should get called with availability true as if nothing happened. Otherwise, user would have to refresh the page after changing the settings.

I don't think such user agent specific, page agnostic behavior needs to be in the spec in anything more than a note.

from remote-playback.

mfoltzgoogle avatar mfoltzgoogle commented on June 12, 2024

Fair enough. User agent level controls generally aren't described with specific algorithms in specs as far as I've seen.

So the conclusions you propose are that

  1. "disabling remote playback" via user agent controls is not related to the disableRemotePlayback attribute or its implementation.

  2. A note should be added suggesting user agents manage callbacks as you suggest when the user disables or enables monitoring and remote playback via user agent controls.

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

Yes. That's a good summary!

from remote-playback.

mfoltzgoogle avatar mfoltzgoogle commented on June 12, 2024

Closing as I believe this is addressed by the PR.

from remote-playback.

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.