WebAPI/PresentationAPI

From MozillaWiki
< WebAPI
Revision as of 03:43, 28 March 2016 by Schien (talk | contribs) (update references for spec, protocol, and use cases)
Jump to navigation Jump to search

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

Presentation

  • WebIDL
  • defaultRequest is not supported yet.

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 device
    • can only launch packaged apps with "presentation" permission declared
  • session reconnect is not supported yet. bug 1197690 (NEW)

PresentationReceiver

PresentationConnection

PresentationAvailability

Architecture

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

Architecture overview of Presentation API

WebIDL Implementation

  • Provide the WebAPI interface

Core Service

  • Maintain the session state and app-to-app transportation channel
  • Handle the session setup procedure
  • Live in chrome process

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 Chromecast/DIAL app to increase device compatibility
  • Support different URL scheme, e.g. data, file
  • Support session resume for improving cross device task continuity (Bug 1197690 (NEW))
  • Support multiple session (n:1) to support wider user scenario, e.g. multi-player game. (Bug 1195605 (NEW))