Table of Contents

Class Presentation

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll
NOTE
Experimental
The Presentation can be defined as two possible user agents in the context: Controlling user agent and Receiving user agent.
[Value("Presentation")]
public class Presentation
Inheritance
Presentation
Inherited Members

Remarks

In controlling browsing context, the Presentation interface provides a mechanism to override the browser default behavior of launching presentation to external screen. In receiving browsing context, Presentation interface provides the access to the available presentation connections.

See also on MDN

Constructors

Presentation()

public Presentation()

Properties

DefaultRequest

NOTE
Experimental
In a controlling user agent, the defaultRequest attribute MUST return the default presentation request if any, otherwise null. In a receiving browsing context, it MUST return null.
[Value("defaultRequest")]
public PresentationRequest? DefaultRequest { get; set; }

Property Value

PresentationRequest

Remarks

If set by the controller, the value of the defaultRequest attribute SHOULD be used by the controlling user agent as the default presentation request for that controlling browsing context. If the document object's active sandboxing flag set has the sandboxed presentation browsing context flag set, the controlling user agent SHOULD act as if the default request is not set for that browsing context. When the controlling user agent wishes to initiate a PresentationConnection on the behalf of that browsing context, it MUST start a presentation using the default presentation request for the controller (as if the controller had called Start()).

The controlling user agent SHOULD initiate presentation using the default presentation request, only when the user has expressed an intention to do so via a user gesture. For example, by clicking a button in the browser.

NOTE

Some controlling user agents may allow the user to initiate a default presentation connection and select a presentation display with the same user gesture. For example, the browser chrome could allow the user to pick a display from a menu, or allow the user to tap on an Near Field Communications (NFC) enabled display. In this case, when the controlling user agent asks for permission while starting a presentation, the browser could offer that display as the default choice, or consider the gesture as granting permission for the display and bypass display selection entirely.

NOTE

If a controlling user agent does not support initiation of a presentation connection from the browser chrome, setting defaultRequest will have no effect.

See also on MDN

Receiver

NOTE
Experimental
The read-only Presentation attribute
receiver, which is only available in browser contexts which are
receiving a presentation, returns the
PresentationReceiver object which can be used to access and communicate
with the browser context which controls the presentation. This property is always
null when accessed from outside a browser context which is receiving a
presentation.
[Value("receiver")]
public PresentationReceiver? Receiver { get; }

Property Value

PresentationReceiver

If the code is running in a context which is receiving a presentation, the returned
value is a PresentationReceiver which can then be used to communicate
with the context which is the source of the presentation.If the current context is not receiving a presentation, receiver is
null.

Remarks