[remote-playback] Do we need remote.getAvailability()?

mfoltzgoogle has just created a new issue for 
https://github.com/w3c/remote-playback:

== Do we need remote.getAvailability()? ==
I think the use of a separate Availability object for remote playback 
device for this use case causes some problems for the spec.

- What does it mean to call getAvailability() multiple times on the 
same MediaElement?  Is the same object returned or different object?
- If the source list changes, will the developer need to discard the 
old object and get a new one?
- What if the media element is detached from the document: will the 
availability object keep it alive?  What would its behavior be in this
 case?

One alternative would be to have an enum + event to track availability
 changes on the remote object itself, which would seem to address the 
issues above.  Availability would be kept in sync with both device 
availability and the media source list.

```
partial interface RemotePlayback : EventTarget {

    readonly attribute RemotePlaybackAvailability availability;

    attribute EventHandler onavailabilitychange;

    enum RemotePlaybackAvailability {
            "available",
            "unavailable",
            "unknown"   // Background monitoring not supported.
    };
};
```




Please view or discuss this issue at 
https://github.com/w3c/remote-playback/issues/39 using your GitHub 
account

Received on Friday, 20 May 2016 18:53:24 UTC