Parent Directory | Revision Log
Revision 1.1 - (view) (download)
1 : | thiswind | 1.1 | //**************************************************************************** |
2 : | //Copyright (C) 2004-2005 Macromedia, Inc. All Rights Reserved. | ||
3 : | //The following is Sample Code and is subject to all restrictions on | ||
4 : | //such code as contained in the End User License Agreement accompanying | ||
5 : | //this product. | ||
6 : | //**************************************************************************** | ||
7 : | |||
8 : | import mx.video.*; | ||
9 : | |||
10 : | /** | ||
11 : | * <p>Creates <code>NetConnection</code> for <code>VideoPlayer</code>, a | ||
12 : | * helper class for that user facing class.</p> | ||
13 : | */ | ||
14 : | |||
15 : | interface mx.video.INCManager { | ||
16 : | |||
17 : | /** | ||
18 : | * Called by <code>VideoPlayer</code> to ask for connection to | ||
19 : | * URL. Once connection is either successful or failed, call | ||
20 : | * <code>VideoPlayer.ncConnected()</code>. If connection failed, | ||
21 : | * set <code>nc = null</code> before calling. | ||
22 : | * | ||
23 : | * @return true if connection made synchronously, false attempt | ||
24 : | * made asynchronously so caller should expect a "connected" | ||
25 : | * event coming. | ||
26 : | * @see #getNetConnection() | ||
27 : | * @see #reconnect() | ||
28 : | * @see VideoPlayer#ncConnected() | ||
29 : | */ | ||
30 : | public function connectToURL(url:String):Boolean; | ||
31 : | |||
32 : | /** | ||
33 : | * <p>Called by <code>VideoPlayer</code> if connection | ||
34 : | * successfully made but stream not found. If multiple alternate | ||
35 : | * interpretations of the rtmp URL are possible, it should retry | ||
36 : | * to connect to the server with a different URL and hand back a | ||
37 : | * different stream name.</p> | ||
38 : | * | ||
39 : | * <p>This can be necessary in cases where the URL is something | ||
40 : | * like rtmp://servername/path1/path2/path3. The user could be | ||
41 : | * passing in an application name and an instance name, so the | ||
42 : | * NetConnection should be opened with | ||
43 : | * rtmp://servername/path1/path2, or they might want to use the | ||
44 : | * default instance so the stream should be opened with | ||
45 : | * path2/path3. In general this is possible whenever there are | ||
46 : | * more than two parts to the path, but not possible if there are | ||
47 : | * only two (there should never only be one).</p> | ||
48 : | * | ||
49 : | * @return true if will attempt to make another connection, | ||
50 : | * false if already made attempt or no additional attempts | ||
51 : | * are merited. | ||
52 : | * @see #connectToURL() | ||
53 : | * @see VideoPlayer#rtmpOnStatus() | ||
54 : | */ | ||
55 : | public function connectAgain():Boolean; | ||
56 : | |||
57 : | /** | ||
58 : | * Called by <code>VideoPlayer</code> to ask for reconnection | ||
59 : | * after connection is lost. Once connection is either successful | ||
60 : | * or failed, call <code>VideoPlayer.ncReconnected()</code>. If | ||
61 : | * connection failed, set <code>nc = null</code> before calling. | ||
62 : | * | ||
63 : | * @see #getNetConnection() | ||
64 : | * @see #connect() | ||
65 : | * @see VideoPlayer#idleTimeout | ||
66 : | * @see VideoPlayer#ncReonnected() | ||
67 : | */ | ||
68 : | public function reconnect():Void; | ||
69 : | |||
70 : | /** | ||
71 : | * Called by any helper object doing a task for the | ||
72 : | * <code>INCManager</code> to signal it has completed | ||
73 : | * and whether it was successful. <code>NCManager</code> | ||
74 : | * uses this with <code>SMILManager</code>. | ||
75 : | */ | ||
76 : | public function helperDone(helper:Object, success:Boolean); | ||
77 : | |||
78 : | /** | ||
79 : | * Close the NetConnection | ||
80 : | */ | ||
81 : | public function close():Void; | ||
82 : | |||
83 : | /** | ||
84 : | * Get the <code>VideoPlayer</code> object which owns this object. | ||
85 : | */ | ||
86 : | public function getVideoPlayer():VideoPlayer; | ||
87 : | |||
88 : | /** | ||
89 : | * Set the <code>VideoPlayer</code> object which owns this object. | ||
90 : | */ | ||
91 : | public function setVideoPlayer(v:VideoPlayer):Void; | ||
92 : | |||
93 : | /** | ||
94 : | * Get the timeout after which we give up on connection in | ||
95 : | * milliseconds. | ||
96 : | */ | ||
97 : | public function getTimeout():Number; | ||
98 : | |||
99 : | /** | ||
100 : | * Set the timeout after which we give up on connection in | ||
101 : | * milliseconds. | ||
102 : | */ | ||
103 : | public function setTimeout(t:Number):Void; | ||
104 : | |||
105 : | /** | ||
106 : | * Get <code>NetConnection</code>. | ||
107 : | */ | ||
108 : | public function getNetConnection():NetConnection; | ||
109 : | |||
110 : | /** | ||
111 : | * Get the bandwidth to be used to switch between multiple | ||
112 : | * streams. Numerical value in bits per second. | ||
113 : | */ | ||
114 : | public function getBitrate():Number; | ||
115 : | |||
116 : | /** | ||
117 : | * Set the bandwidth to be used to switch between multiple | ||
118 : | * streams. Numerical value in bits per second. | ||
119 : | */ | ||
120 : | public function setBitrate(b:Number):Void; | ||
121 : | |||
122 : | /** | ||
123 : | * Get stream name to be passed into | ||
124 : | * <code>NetStream.play</code> | ||
125 : | */ | ||
126 : | public function getStreamName():String; | ||
127 : | |||
128 : | /** | ||
129 : | * Whether URL is for rtmp streaming from Flash Communication | ||
130 : | * Server or progressive download. | ||
131 : | * | ||
132 : | * @returns true if stream is rtmp streaming from FCS, false if | ||
133 : | * progressive download of http, local or other file | ||
134 : | */ | ||
135 : | public function isRTMP():Boolean; | ||
136 : | |||
137 : | /** | ||
138 : | * Get length of stream. After | ||
139 : | * <code>VideoPlayer.ncConnected()</code> is called, if this is | ||
140 : | * undefined, null or less than 0, that indicates to the | ||
141 : | * VideoPlayer that we have determined no stream length | ||
142 : | * information. Any stream length information that is returned | ||
143 : | * will be assumed to trump any other, including that set via the | ||
144 : | * <code>totalTime</code> parameter of the | ||
145 : | * <code>VideoPlayer.play()</code> or | ||
146 : | * <code>VideoPlayer.load()</code> method or from FLV metadata. | ||
147 : | * | ||
148 : | * VideoPlayer#ncConnected() | ||
149 : | * VideoPlayer#play() | ||
150 : | * VideoPlayer#load() | ||
151 : | */ | ||
152 : | public function getStreamLength():Number; | ||
153 : | |||
154 : | /** | ||
155 : | * Get width of stream. After | ||
156 : | * <code>VideoPlayer.ncConnected()</code> is called, if this is | ||
157 : | * undefined, null or less than 0, that indicates to the | ||
158 : | * VideoPlayer that we have determined no stream width | ||
159 : | * information. If the VideoPlayer has autoSize or | ||
160 : | * maintainAspectRatio set to true, then this value will be used | ||
161 : | * and the resizing will happen instantly, rather than waiting. | ||
162 : | * | ||
163 : | * VideoPlayer#ncConnected() | ||
164 : | * VideoPlayer#autoSize | ||
165 : | * VideoPlayer#maintainAspectRatio | ||
166 : | */ | ||
167 : | public function getStreamWidth():Number; | ||
168 : | |||
169 : | /** | ||
170 : | * Get height of stream. After | ||
171 : | * <code>VideoPlayer.ncConnected()</code> is called, if this is | ||
172 : | * undefined, null or less than 0, that indicates to the | ||
173 : | * VideoPlayer that we have determined no stream height | ||
174 : | * information. If the VideoPlayer has autoSize or | ||
175 : | * maintainAspectRatio set to true, then this value will be used | ||
176 : | * and the resizing will happen instantly, rather than waiting. | ||
177 : | * | ||
178 : | * VideoPlayer#ncConnected() | ||
179 : | * VideoPlayer#autoSize | ||
180 : | * VideoPlayer#maintainAspectRatio | ||
181 : | */ | ||
182 : | public function getStreamHeight():Number; | ||
183 : | |||
184 : | } // Interface INCManager |
cvs-admin | ViewVC Help |
Powered by ViewVC 1.0.0 |