1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // The <code>chrome.cast.streaming.receiverSession</code> API creates a Cast
6 // receiver session and adds the resulting audio and video tracks to a
8 namespace cast.streaming.receiverSession
{
9 // The UDP socket address and port.
10 dictionary IPEndPoint
{
15 // RTP receiver parameters.
16 dictionary RtpReceiverParams
{
17 // Maximum latency in milliseconds. This parameter controls the logic
18 // of flow control. Implementation can adjust latency adaptively and
19 // tries to keep it under this threshold. A larger value allows smoother
20 // playback at the cost of higher latency.
25 // Synchronization source identifier for incoming data.
28 // The SSRC used to send RTCP reports back to the sender.
31 // RTP time units per second, defaults to 48000 for audio
32 // and 90000 for video.
35 // 32 bytes hex-encoded AES key.
38 // 32 bytes hex-encoded AES IV (Initialization vector) mask.
42 callback ErrorCallback
= void (DOMString error
);
45 // Creates a Cast receiver session which receives data from a UDP
46 // socket. The receiver will decode the incoming data into an audio
47 // and a video track which will be added to the provided media stream.
48 // The |audioParams| and |videoParams| are generally provided by the
49 // sender through some other messaging channel.
51 // |audioParams| : Audio stream parameters.
52 // |videoParams| : Video stream parameters.
53 // |localEndpoint| : Local IP and port to bind to.
54 // |height| : Video height.
55 // |width| : Video width.
56 // |maxFrameRate| : Max video frame rate.
57 // |mediaStreamURL| : URL of MediaStream to add the audio and video to.
58 // |transport_options| : Optional transport settings.
59 [nocompile
] static
void createAndBind
(
60 RtpReceiverParams audioParams
,
61 RtpReceiverParams videoParams
,
62 IPEndPoint localEndpoint
,
66 DOMString mediaStreamURL
,
67 ErrorCallback error_callback
,
68 optional object transport_options
);