Re: [tvcontrol-api] Why retrieve a list of tuners instead of just one tuner?

Thanks Steve. I'll try to summarise the API. Feel free to edit this 
post if it's not right.

```
partial interface Navigator {
  // These methods may require the UA to request user permission
  Promise<TVManager> getTVManager();
  Promise<TVManager> getRadioManager();     
};
```

Alternatively, if the recommended way to extend Navigator is to add an
 interface (for now I've called it `TVControl`):

```
partial interface Navigator {
  TVControl tv;
}

interface TVControl {
  Promise<TVManager> getTVManager();
  Promise<TVManager> getRadioManager();     
}

interface TVManager {
  TVSourceCapabilities getCapabilities();
  Promise<TVSource> getSource(TVSourceConstraints constraints);
  isSourceAvailable(TVSourceConstraints constraints);

  // A single channel list is managed by the UA.
  Promise<sequence<TVChannel>> getChannelList();

  // The scanning API is TBD (see issue #7):
  Promise<void> startScanning(optional TVStartScanningOptions 
options);
  Promise<void> stopScanning();

  readonly attribute boolean isScanning;
           attribute EventHandler onscanningstatechanged;

  // I've left out the recording, parental control, and CI card APIs
  // for brevity.
};

interface TVSource {
  TVSourceConstraints getConstraints();
  Promise<void> tuneToChannel(TVChannel channel);
  Promise<void> tuneTo(TVTuningParameters parameters);

  // See issue #29 -- alternatively: getDataComponents();
  Promise<TVApplication> getApplications();

  readonly attribute TVMediaStream? stream;

           attribute EventHandler oncurrentchannelchanged;
           attribute EventHandler oneitbroadcasted;
           attribute EventHandler onemergencyalerted;
};
```

The `TVChannel` and `TVProgram` interfaces remain largely as before.

-- 
GitHub Notification of comment by chrisn
Please view or discuss this issue at 
https://github.com/w3c/tvcontrol-api/issues/4#issuecomment-274442423 
using your GitHub account

Received on Monday, 23 January 2017 09:49:11 UTC