OLD | NEW |
(Empty) | |
| 1 |
| 2 class _MediaStreamImpl extends _DOMTypeBase implements MediaStream { |
| 3 _MediaStreamImpl._wrap(ptr) : super._wrap(ptr); |
| 4 |
| 5 MediaStreamTrackList get audioTracks() => _wrap(_ptr.audioTracks); |
| 6 |
| 7 String get label() => _wrap(_ptr.label); |
| 8 |
| 9 EventListener get onended() => _wrap(_ptr.onended); |
| 10 |
| 11 void set onended(EventListener value) { _ptr.onended = _unwrap(value); } |
| 12 |
| 13 int get readyState() => _wrap(_ptr.readyState); |
| 14 |
| 15 MediaStreamTrackList get videoTracks() => _wrap(_ptr.videoTracks); |
| 16 |
| 17 void addEventListener(String type, EventListener listener, [bool useCapture =
null]) { |
| 18 if (useCapture === null) { |
| 19 _ptr.addEventListener(_unwrap(type), _unwrap(listener)); |
| 20 return; |
| 21 } else { |
| 22 _ptr.addEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapture
)); |
| 23 return; |
| 24 } |
| 25 } |
| 26 |
| 27 bool dispatchEvent(Event event) { |
| 28 return _wrap(_ptr.dispatchEvent(_unwrap(event))); |
| 29 } |
| 30 |
| 31 void removeEventListener(String type, EventListener listener, [bool useCapture
= null]) { |
| 32 if (useCapture === null) { |
| 33 _ptr.removeEventListener(_unwrap(type), _unwrap(listener)); |
| 34 return; |
| 35 } else { |
| 36 _ptr.removeEventListener(_unwrap(type), _unwrap(listener), _unwrap(useCapt
ure)); |
| 37 return; |
| 38 } |
| 39 } |
| 40 } |
OLD | NEW |