w3c / tvcontrol-api

TV Control API specification - https://w3c.github.io/tvcontrol-api/
10 stars 11 forks source link

Channel scanning #7

Open tidoust opened 7 years ago

tidoust commented 7 years ago

I see that our Wiki page lists a number of requirements related to scanning channels: https://www.w3.org/wiki/TV_Control/Use_Cases#Basic_radio_usage

I'm trying to understand when scanning channels is needed, how it affects the availability of the underlying TVSource, and why it needs to be exposed to Web apps. Some questions I have:

  1. Am I right to assume that the tuner cannot be used during scanning? The spec says "due to some constraints of tuner modules, scanning and streaming are not encouraged to run at the same time".
  2. When is scanning needed?
  3. How often does scanning need to be performed? Once every few years for fixed TV sets? Once every 20mn for mobile radios?
  4. How long does it take to scan channels on average? A few seconds? A few minutes?
  5. Is scanning channels a power-intensive operation that should best be avoided on mobile devices when not needed?
  6. How can a Web app determine when channels need to be scanned again? In particular, wouldn't the user agent be in a better position to know when it should launch a new scan?
JPEvain commented 7 years ago

Re-scanning happens very regularly in some environments and certainly more often than every few years for TV-sets or ste-top-boxes.

JPEvain commented 7 years ago

I am interpreting this differently after looking at other parts of the specification.

I interpreted scanning as the usual setup functionality in TV sets. As I mention, certain platforms more or less frequently reorganise their channels (adding/reomving channels). This tuning/scanning process might actually be useful to facilitate the getsources/getchannel process for each tuner.

Or is the TVmanager permanently getting the tuners/sources/channels on the fly?

stevem-tw commented 7 years ago

I think we do have to take into account that scanning means different things in different circumstances.

For non-mobile devices, channel scanning is something that typically happens once when the device is initially set up, and then happens very infrequently after that - usually only when the network operator changes the channel lineup. For mobile devices, this happens more frequently but I'm not sure how frequently.

In my mind, I see the channel scanning operation as something that is initiated by the end user or automatically by the platform, rather than by a web app. The result of a channel scanning operation is that:

  1. The list of available channels may change
  2. The attributes of an individual channel (related to tuning information) may change

A web app may care about (1) but I'm not sure that will really care about (2). The only case where that would make a difference to the app is when the tuning parameters change for a channel that is currently being presented, and I would expect the device to automatically handle that situation. In that case, it may be enough for the TVManager or TVSource to dispatch an event indicating that a channel list has been updated and for all other aspects of the scanning functionality to be handled by the user agent.

davisrc commented 7 years ago

Keep in mind that "scanning" may mean something totally different in the Radio world. Usually is an action that the user performs on the radio and gives a sample of each station (for about 5 secs) until the user decides to stop on the channel. (just mentioning in case there is confusion down the line with an actual RADIO SCAN function.

The scan function that you guys are speaking of would be the only way for a radio tuner to discover HD channels that are available in the area. Of course in the scenario when we are talking about automobiles the scanning periodic interval may need to increase based on the vehicle moving in an out of range of different stations. I would agree that a web app would probably care more about (1).

stevem-tw commented 7 years ago

Hi David,

I agree that we have a problem of different functionality with the same name, and we shouldn't forget the first use case that you describe.

My question would be, is that a use case that can be implemented in JS with the APIs we're currently discussing? If we have a way of directly specifying a set of tuning parameters, is that enough to build the necessary functionality in the web app, or should we be looking at an API to do that? if we need an API, we will have to be careful what we call it.

Steve.