WebAPI/PresentationAPI: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Basic Functionalities: update for latest progress)
(→‎Advanced Functionalities: update for latest progress)
 
Line 97: Line 97:


=== Advanced Functionalities ===
=== Advanced Functionalities ===
* Enable 1-UA mode for Chromecast/DIAL app to increase device compatibility
* Enable 1-UA mode for DIAL app to increase device compatibility
** Chromecast integration ([https://bugzilla.mozilla.org/show_bug.cgi?id=1252788 Bug 1252788 (NEW)])
* Support different URL scheme, e.g. data, file
* Support different URL scheme, e.g. data, file
* Support session resume for improving cross device task continuity ([https://bugzilla.mozilla.org/show_bug.cgi?id=1197690 Bug 1197690 (NEW)])
* Support multiple session (n:1) to support wider user scenario, e.g. multi-player game. ([https://bugzilla.mozilla.org/show_bug.cgi?id=1195605 Bug 1195605 (NEW)])
* Support multiple session (n:1) to support wider user scenario, e.g. multi-player game. ([https://bugzilla.mozilla.org/show_bug.cgi?id=1195605 Bug 1195605 (NEW)])

Latest revision as of 07:01, 12 October 2016

Introduction

Presentation API enables web content to access external presentation-type displays and use them for presenting web content. With this API, web page can initiate and control an presentation request.

For retrieving available devices information, please refer to Presentation Device Info API.

Specification

Use case

See Use Cases and Requirements

Interface

  • For 1-UA user agent, three preferences "dom.presentation.enabled", "dom.presentation.controller.enabled", and "dom.presentation.receiver.enabled" need to be set to true.
  • For 2-UAs controlling user agent, two preferences "dom.presentation.enabled" and "dom.presentation.controller.enabled" need to be set to true.
  • For 2-UAs receiving user agent, two preferences "dom.presentation.enabled" and "dom.presentation.receiver.enabled" need to be set to true.

Presentation

  • WebIDL
  • No UI support for defaultRequest.

PresentationRequest

  • WebIDL
  • support URL with http:// protocol scheme to open web page in private browsing mode
  • support URL with app:// protocol scheme to launch an packaged app installed on target B2G device
  • only available in controlling browsing context

PresentationReceiver

PresentationConnection

PresentationConnectionList

  • WebIDL
  • only available in receiving browsing context

PresentationAvailability

  • WebIDL
  • only available in controlling browsing context

Architecture

Here is the high-level architecture overview of Presentation API.

Architecture overview of Presentation API

WebIDL Implementation

Core Service

  • Maintain the session state and app-to-app transportation channel
  • Handle the session setup / reconnect / terminate procedure
  • Live in chrome process
    • except for DataChannelTransportBuilder and DataChannelTransport
  • Detail at WebAPI/PresentationAPI:CoreService

Device Manager

  • Load registered device provider at start-up automatically
  • Provide device list and firing availability event
  • Live in chrome process

Device Provider

  • Implement device discovery mechanism
  • Handle control channel setup procedure
  • Live in chrome process

Browser/System UI Glue

  • Handle device selection and application launch
  • Live in chrome process

Development Plan

Basic Functionalities

Advanced Functionalities

  • Enable 1-UA mode for DIAL app to increase device compatibility
  • Support different URL scheme, e.g. data, file
  • Support multiple session (n:1) to support wider user scenario, e.g. multi-player game. (Bug 1195605 (NEW))