Coder Social home page Coder Social logo

Comments (7)

mounirlamouri avatar mounirlamouri commented on June 12, 2024

CC @avayvod

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

Do you have an example when it would matter? CC @mfoltzgoogle

We encourage the websites to stop monitoring availability once in connected state (to save battery and so on), so updating availability callbacks at the time of disconnect shouldn't be important. Once the element disconnects, our example will start watching availability again and that would result in a callback anyway.

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

CC @jernoble

from remote-playback.

mounirlamouri avatar mounirlamouri commented on June 12, 2024

The fact that we encourage websites to stop observing while connected doesn't mean that they will do it and they should be able to observe the change if they want to.

To be clear, I don't think it's a serious issue but it would be good if there was language because this a scenario that will definitely happen:

  • user is connected to wifi and has a remote playback session
  • wifi drops
  • disconnected event is fired and availability callback is called

In my opinion, we should update availability first then fire the event so that when the device is disconnected, the website doesn't try to reconnect because it thinks some device is available.

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

This could be an implementation specific detail though as the discovery mechanism could fire availability update to the user agent after the connection mechanism decides the device is lost. Meaning we might not be able to implement this.

from remote-playback.

avayvod avatar avayvod commented on June 12, 2024

I agree with the order you propose though.

from remote-playback.

mounirlamouri avatar mounirlamouri commented on June 12, 2024

I would suggest to mention this in the specification at least. It is possible that the order can't be followed because some devices will not fire the event in a way that will allow such implementation but the rule can always be a SHOULD and note that it could not be followed if there are underlying platform limitations.

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.