| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 // WARNING: |
| 6 // This file contains documentation that is merged into the real source. |
| 7 // Do not make code changes here. |
| 8 |
| 9 /// @domName HTMLMediaElement |
| 10 interface MediaElement extends Element { |
| 11 |
| 12 /** |
| 13 * @domName EventTarget.addEventListener, EventTarget.removeEventListener, Eve
ntTarget.dispatchEvent |
| 14 */ |
| 15 MediaElementEvents get on(); |
| 16 |
| 17 static final int EOS_DECODE_ERR = 2; |
| 18 |
| 19 static final int EOS_NETWORK_ERR = 1; |
| 20 |
| 21 static final int EOS_NO_ERROR = 0; |
| 22 |
| 23 static final int HAVE_CURRENT_DATA = 2; |
| 24 |
| 25 static final int HAVE_ENOUGH_DATA = 4; |
| 26 |
| 27 static final int HAVE_FUTURE_DATA = 3; |
| 28 |
| 29 static final int HAVE_METADATA = 1; |
| 30 |
| 31 static final int HAVE_NOTHING = 0; |
| 32 |
| 33 static final int NETWORK_EMPTY = 0; |
| 34 |
| 35 static final int NETWORK_IDLE = 1; |
| 36 |
| 37 static final int NETWORK_LOADING = 2; |
| 38 |
| 39 static final int NETWORK_NO_SOURCE = 3; |
| 40 |
| 41 static final int SOURCE_CLOSED = 0; |
| 42 |
| 43 static final int SOURCE_ENDED = 2; |
| 44 |
| 45 static final int SOURCE_OPEN = 1; |
| 46 |
| 47 /** @domName HTMLMediaElement.autoplay */ |
| 48 bool autoplay; |
| 49 |
| 50 /** @domName HTMLMediaElement.buffered */ |
| 51 final TimeRanges buffered; |
| 52 |
| 53 /** @domName HTMLMediaElement.controller */ |
| 54 MediaController controller; |
| 55 |
| 56 /** @domName HTMLMediaElement.controls */ |
| 57 bool controls; |
| 58 |
| 59 /** @domName HTMLMediaElement.currentSrc */ |
| 60 final String currentSrc; |
| 61 |
| 62 /** @domName HTMLMediaElement.currentTime */ |
| 63 num currentTime; |
| 64 |
| 65 /** @domName HTMLMediaElement.defaultMuted */ |
| 66 bool defaultMuted; |
| 67 |
| 68 /** @domName HTMLMediaElement.defaultPlaybackRate */ |
| 69 num defaultPlaybackRate; |
| 70 |
| 71 /** @domName HTMLMediaElement.duration */ |
| 72 final num duration; |
| 73 |
| 74 /** @domName HTMLMediaElement.ended */ |
| 75 final bool ended; |
| 76 |
| 77 /** @domName HTMLMediaElement.error */ |
| 78 final MediaError error; |
| 79 |
| 80 /** @domName HTMLMediaElement.initialTime */ |
| 81 final num initialTime; |
| 82 |
| 83 /** @domName HTMLMediaElement.loop */ |
| 84 bool loop; |
| 85 |
| 86 /** @domName HTMLMediaElement.mediaGroup */ |
| 87 String mediaGroup; |
| 88 |
| 89 /** @domName HTMLMediaElement.muted */ |
| 90 bool muted; |
| 91 |
| 92 /** @domName HTMLMediaElement.networkState */ |
| 93 final int networkState; |
| 94 |
| 95 /** @domName HTMLMediaElement.paused */ |
| 96 final bool paused; |
| 97 |
| 98 /** @domName HTMLMediaElement.playbackRate */ |
| 99 num playbackRate; |
| 100 |
| 101 /** @domName HTMLMediaElement.played */ |
| 102 final TimeRanges played; |
| 103 |
| 104 /** @domName HTMLMediaElement.preload */ |
| 105 String preload; |
| 106 |
| 107 /** @domName HTMLMediaElement.readyState */ |
| 108 final int readyState; |
| 109 |
| 110 /** @domName HTMLMediaElement.seekable */ |
| 111 final TimeRanges seekable; |
| 112 |
| 113 /** @domName HTMLMediaElement.seeking */ |
| 114 final bool seeking; |
| 115 |
| 116 /** @domName HTMLMediaElement.src */ |
| 117 String src; |
| 118 |
| 119 /** @domName HTMLMediaElement.startTime */ |
| 120 final num startTime; |
| 121 |
| 122 /** @domName HTMLMediaElement.textTracks */ |
| 123 final TextTrackList textTracks; |
| 124 |
| 125 /** @domName HTMLMediaElement.volume */ |
| 126 num volume; |
| 127 |
| 128 /** @domName HTMLMediaElement.webkitAudioDecodedByteCount */ |
| 129 final int webkitAudioDecodedByteCount; |
| 130 |
| 131 /** @domName HTMLMediaElement.webkitClosedCaptionsVisible */ |
| 132 bool webkitClosedCaptionsVisible; |
| 133 |
| 134 /** @domName HTMLMediaElement.webkitHasClosedCaptions */ |
| 135 final bool webkitHasClosedCaptions; |
| 136 |
| 137 /** @domName HTMLMediaElement.webkitMediaSourceURL */ |
| 138 final String webkitMediaSourceURL; |
| 139 |
| 140 /** @domName HTMLMediaElement.webkitPreservesPitch */ |
| 141 bool webkitPreservesPitch; |
| 142 |
| 143 /** @domName HTMLMediaElement.webkitSourceState */ |
| 144 final int webkitSourceState; |
| 145 |
| 146 /** @domName HTMLMediaElement.webkitVideoDecodedByteCount */ |
| 147 final int webkitVideoDecodedByteCount; |
| 148 |
| 149 /** @domName HTMLMediaElement.addTextTrack */ |
| 150 TextTrack addTextTrack(String kind, [String label, String language]); |
| 151 |
| 152 /** @domName HTMLMediaElement.canPlayType */ |
| 153 String canPlayType(String type, String keySystem); |
| 154 |
| 155 /** @domName HTMLMediaElement.load */ |
| 156 void load(); |
| 157 |
| 158 /** @domName HTMLMediaElement.pause */ |
| 159 void pause(); |
| 160 |
| 161 /** @domName HTMLMediaElement.play */ |
| 162 void play(); |
| 163 |
| 164 /** @domName HTMLMediaElement.webkitAddKey */ |
| 165 void webkitAddKey(String keySystem, Uint8Array key, [Uint8Array initData, Stri
ng sessionId]); |
| 166 |
| 167 /** @domName HTMLMediaElement.webkitCancelKeyRequest */ |
| 168 void webkitCancelKeyRequest(String keySystem, String sessionId); |
| 169 |
| 170 /** @domName HTMLMediaElement.webkitGenerateKeyRequest */ |
| 171 void webkitGenerateKeyRequest(String keySystem, [Uint8Array initData]); |
| 172 |
| 173 /** @domName HTMLMediaElement.webkitSourceAbort */ |
| 174 void webkitSourceAbort(String id); |
| 175 |
| 176 /** @domName HTMLMediaElement.webkitSourceAddId */ |
| 177 void webkitSourceAddId(String id, String type); |
| 178 |
| 179 /** @domName HTMLMediaElement.webkitSourceAppend */ |
| 180 void webkitSourceAppend(String id, Uint8Array data); |
| 181 |
| 182 /** @domName HTMLMediaElement.webkitSourceBuffered */ |
| 183 TimeRanges webkitSourceBuffered(String id); |
| 184 |
| 185 /** @domName HTMLMediaElement.webkitSourceEndOfStream */ |
| 186 void webkitSourceEndOfStream(int status); |
| 187 |
| 188 /** @domName HTMLMediaElement.webkitSourceRemoveId */ |
| 189 void webkitSourceRemoveId(String id); |
| 190 } |
| 191 |
| 192 interface MediaElementEvents extends ElementEvents { |
| 193 |
| 194 EventListenerList get keyAdded(); |
| 195 |
| 196 EventListenerList get keyError(); |
| 197 |
| 198 EventListenerList get keyMessage(); |
| 199 |
| 200 EventListenerList get needKey(); |
| 201 |
| 202 EventListenerList get sourceClose(); |
| 203 |
| 204 EventListenerList get sourceEnded(); |
| 205 |
| 206 EventListenerList get sourceOpen(); |
| 207 } |
| OLD | NEW |