Re: [remote-playback] Define the UA behavior when the disableRemotePlayback attribute is added during the remote playback

I'm not sure, why `play()` should look at the attribute at all, it 
should be agnostic from the _Remote Playback API_ I think. If the 
element is in `connected` state, play is forwarded to the remote 
playback device, period.

How about the following (allowfullscreen-ish behavior):

* once the attribute is present:
- any call to `getAvailability()` rejects with an error
- any call to `connect()` rejects with an error
- user agent must not start remote playback as a result of any other 
event outside of the page control (default controls, external UI, 
system wide setting, etc)

* when the attribute is added or removed, nothing changes w/r/t 
pending promises or existing availability objects or the current state
 of the element

Basically the page can keep observing availability and if the device 
selection or start remote playback algorithm has started, it can 
proceed.

If we want more like src-ish behavior, it could look like this (more 
complex so I prefer the former):

1. Once the attribute is present:

a) any call to `getAvailability()` rejects with an error
b) any call to `connect()` rejects with an error

2. When the attribute is added:

a) in any state, all pending promises to `connect()` or 
`getAvailability()` get rejected with an error
b) any existing availability objects returned by `getAvailability()` 
change their value to false
c) if the state is `connecting` or `connected`, the user agent queues 
a task to stop remote playback if it hasn't already

3. When the attribute is removed:

a) if there's any availability objects alive and the state is 
"disconnected", start background monitoring of available remote 
playback devices
b) if the state is not "disconnected", perform step 3a) when the state
 has changed to "disconnected" (see note below)

Note: when the stop remote playback algorithm is running, the user 
agent must reject all new returned promises from `connect()` or 
`getAvailability()`. So if the page starts remote playback, then adds 
and removes the attribute, it won't be able to start new remote 
playback or get availability until the current remote playback has 
finished. Maybe this restriction is too much though.

-- 
GitHub Notification of comment by avayvod
Please view or discuss this issue at 
https://github.com/w3c/remote-playback/issues/6#issuecomment-218838955
 using your GitHub account

Received on Thursday, 12 May 2016 18:08:14 UTC