Closed Bug 1030674 Opened 10 years ago Closed 6 years ago

[Stingray] TV Web API for Recording

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: airpingu, Unassigned)

References

Details

(Whiteboard: [ft:conndevices])

User Story

Recording is an important feature in terms of a TV product. The user is able to use the TV remote controller or the smart phone to record channels/programs. We collected the user cases from our main partner as below:

  1. One Touch Recording

    a. The user can press the "Record" to start recording
    b. The user can press the "Stop" to stop recording.
    c. If the user doesn't stop recording, record for 3 hours by default.

  2. Manual Timer Recording

    a. The user can specify a start time, an end time and a channel to record.
    b. Multiple programs will be recorded across the specified duration.
    c. If the end time is not specified, record for 3 hours by default.

  3. Event Recording (Accurate Recording)

    a. The user can select a target program (i.e. event) to record.
    b. If the target program is changed by the TV broadcaster, it won't record.
    c. If the duration of the target program is extended by the TV broadcaster, the recording duration will be extended as well.

  4. Simultaneous Recording

    a. The user can record two programs by two tuners at the same time.
    b. The user can record one program and watch another program by two tuners at the same time.

  5. Reminder

    a. A reminder can be popped up 15 mins earlier before starting to record.

  6. Channel Recording

    a. Record a channel persistently so that the user can watch it anytime.
    b. Only a number of channels (e.g., 6) can be recorded due to the HD space.

  7. Free-Word Recording

    a. The user can search the programs by a keyword and record all of them.
    b. Only 64 programs at maximum can be recorded by default.
    c. If two programs are overlapped, the one with earlier start time has the higher priority.

  8. Rewind Live TV

    a. When the user press the "Pause", start recording in the background.
    b. The user can rewind to the start point to watch the recorded program.
    c. When the user stops watching the recorded program, no recorded file will be kept.

  9. Multiple-App Overlapped Recording

    a. Multiple apps (including 3rd-party apps) can record at the same time.
    b. The platform can coordinate the overlapped recordings.
      No description provided.
Mozilla suggested the Web developers can use Alarm API [1] + MediaRecorder API [2] to meet their requirements. That is, use Alarm API to achieve the time-base scheduling and use MediaRecorder API to record the MediaStream returned by the TV Manager API (bug 998872). However, this approach faces the following difficulties:

  1. Multiple-App Overlapped Recording - Suppose different apps want to manage the recordings on the same MediaStream, they will make interferences to each other because they're not aware of the recoding state of each other.

  2. Following #1, each app has to be in charge of writing the recorded blobs onto the disk and managing the recording list of their own. In this case, the recorded results cannot be accessed and shared among the apps, which makes the duplicated copies on the HD.

  3. Our partner has already had a complicated and profound module to centrally handle/synchronize all the recoding behaviours on the platform side. They expect what the app side only needs to do is to provide the scheduling parameters, including the start/end time and the target channel/program. The platform will internally coordinate the recording requests from multiple apps.

In summary, our partner hopes Mozilla can provide an OIPF-like Web API for apps to schedule the recordings, which is more implementable for the vendor and easier to use for the Web developers.

The current OIPF Recording APIs is defined as below (section 7.10):

  - ScheduledRecording record( Programme programme )
  - ScheduledRecording recordAt( Integer startTime, Integer duration, Integer repeatDays, String channelID )
  - ScheduledRecordingCollection getScheduledRecordings()
  - void remove( ScheduledRecording recording )

Actually, this is similar to our Alarm API but for the TV recording purpose.

[1] https://developer.mozilla.org/en-US/docs/Web/API/Alarm_API
[2] https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder_API
User Story: (updated)
Whiteboard: [FT:Stream3] → [ft:conndevices]
Blocks: TV_FxOS2.5
No longer blocks: TV_FxOS2.5
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.