OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // The <code>chrome.webrtc.castSendTransport</code> API takes a track as | 5 // The <code>chrome.webrtc.castSendTransport</code> API takes a track as |
6 // a source of media, and sends that media on the inner transport according to | 6 // a source of media, and sends that media on the inner transport according to |
7 // the given RtpParams. | 7 // the given RtpParams. |
8 namespace webrtc.castSendTransport { | 8 namespace webrtc.castSendTransport { |
9 // Params for audio and video codec. | 9 // Params for audio and video codec. |
10 dictionary CodecSpecificParams { | 10 dictionary CodecSpecificParams { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 | 55 |
56 DOMString[] rtcpFeatures; | 56 DOMString[] rtcpFeatures; |
57 }; | 57 }; |
58 | 58 |
59 // Callback from the <code>create</code> method. | 59 // Callback from the <code>create</code> method. |
60 // |id| : The transport id. | 60 // |id| : The transport id. |
61 callback CreateCallback = void (long transportId); | 61 callback CreateCallback = void (long transportId); |
62 | 62 |
63 interface Functions { | 63 interface Functions { |
64 // Creates a cast send transport. | 64 // Creates a cast send transport. |
65 // |innerTransportId| : the ID of the inner transport. The transport to be | |
66 // created will send data on the inner transport. | |
67 // |track| : the media track encoded by this transport. | 65 // |track| : the media track encoded by this transport. |
68 // |callback| : Called when the transport has been created. | 66 // |callback| : Called when the transport has been created. |
69 [nocompile] static void create( | 67 [nocompile] static void create( |
haibinlu
2013/11/23 02:10:00
remove this create method too?
| |
70 long innerTransportId, | |
71 [instanceOf=MediaStreamTrack] object track, | 68 [instanceOf=MediaStreamTrack] object track, |
72 CreateCallback callback); | 69 CreateCallback callback); |
73 | 70 |
74 // Destroys a cast send transport. | 71 // Destroys a cast send transport. |
75 // |transportId| : The transport ID. | 72 // |transportId| : The transport ID. |
76 [nocompile] static void destroy(long transportId); | 73 [nocompile] static void destroy(long transportId); |
77 | 74 |
78 // Returns capabilities of the transport. | 75 // Returns capabilities of the transport. |
79 // |transportId| : The transport ID. | 76 // |transportId| : The transport ID. |
80 [nocompile] static RtpCaps getCaps(long transportId); | 77 [nocompile] static RtpCaps getCaps(long transportId); |
(...skipping 27 matching lines...) Expand all Loading... | |
108 // left. | 105 // left. |
109 // |transportId| : The ID of the transport. | 106 // |transportId| : The ID of the transport. |
110 static void onTimeout(long transportId); | 107 static void onTimeout(long transportId); |
111 | 108 |
112 // Event fired when a cast send transport has error. | 109 // Event fired when a cast send transport has error. |
113 // |transportId| : The ID of the transport. | 110 // |transportId| : The ID of the transport. |
114 // |errorString| : The error info. | 111 // |errorString| : The error info. |
115 static void onError(long transportId, DOMString errorString); | 112 static void onError(long transportId, DOMString errorString); |
116 }; | 113 }; |
117 }; | 114 }; |
OLD | NEW |