W3C home > Mailing lists > Public > public-secondscreen@w3.org > May 2016

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

From: Anton Vayvod via GitHub <sysbot+gh@w3.org>
Date: Tue, 24 May 2016 11:05:04 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-221236623-1464087903-sysbot+gh@w3.org>
I think the main problem with the property + event handler is the same
 as it was with the Presentation API - either the UA doesn't know when
 to monitor availability and has to do it all the time for every live 
(and visible) media element just to keep `availability` up-to-date or 
it has to add weird side effects of adding an event listener (if the 
availability is known to the user agent at the time, fire an event 
immediately). Perhaps `unknown` state could be used to mitigate that:

partial interface RemotePlayback : EventTarget {

    // both attributes are defined if and only if the user agent 
supports background monitoring
    readonly attribute RemotePlaybackAvailability availability;
    attribute EventHandler onavailabilitychange;

    enum RemotePlaybackAvailability {
            "unknown"   // the availability is unknown - monitoring 
algorithm is still running or hasn't run yet

I also think that having a `RemotePlaybackAvailability` object without
 the media element is odd, the availability object may cache the last 
known media source to track availability for but there's no way to 
initiate remote playback with the media element gone so monitoring 
availability is kind of pointless.

GitHub Notification of comment by avayvod
Please view or discuss this issue at 
 using your GitHub account
Received on Tuesday, 24 May 2016 11:05:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 24 May 2016 11:05:06 UTC