OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2010, 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 const unsigned short NETWORK_EMPTY = 0; | 38 const unsigned short NETWORK_EMPTY = 0; |
39 const unsigned short NETWORK_IDLE = 1; | 39 const unsigned short NETWORK_IDLE = 1; |
40 const unsigned short NETWORK_LOADING = 2; | 40 const unsigned short NETWORK_LOADING = 2; |
41 const unsigned short NETWORK_NO_SOURCE = 3; | 41 const unsigned short NETWORK_NO_SOURCE = 3; |
42 readonly attribute unsigned short networkState; | 42 readonly attribute unsigned short networkState; |
43 attribute DOMString preload; | 43 attribute DOMString preload; |
44 | 44 |
45 readonly attribute TimeRanges buffered; | 45 readonly attribute TimeRanges buffered; |
46 void load(); | 46 void load(); |
47 DOMString canPlayType([Default=Undefined] optional DOMString type, [Default=
Undefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMStri
ng keySystem); | 47 DOMString canPlayType([Default=Undefined] optional DOMString type, [Default=Unde
fined, TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString k
eySystem); |
48 | 48 |
49 // ready state | 49 // ready state |
50 const unsigned short HAVE_NOTHING = 0; | 50 const unsigned short HAVE_NOTHING = 0; |
51 const unsigned short HAVE_METADATA = 1; | 51 const unsigned short HAVE_METADATA = 1; |
52 const unsigned short HAVE_CURRENT_DATA = 2; | 52 const unsigned short HAVE_CURRENT_DATA = 2; |
53 const unsigned short HAVE_FUTURE_DATA = 3; | 53 const unsigned short HAVE_FUTURE_DATA = 3; |
54 const unsigned short HAVE_ENOUGH_DATA = 4; | 54 const unsigned short HAVE_ENOUGH_DATA = 4; |
55 readonly attribute unsigned short readyState; | 55 readonly attribute unsigned short readyState; |
56 readonly attribute boolean seeking; | 56 readonly attribute boolean seeking; |
57 | 57 |
58 // playback state | 58 // playback state |
59 [SetterRaisesException] attribute double currentTime; | 59 [SetterRaisesException] attribute double currentTime; |
60 readonly attribute double initialTime; | 60 readonly attribute double initialTime; |
61 readonly attribute double startTime; | 61 readonly attribute double startTime; |
62 readonly attribute double duration; | 62 readonly attribute double duration; |
63 readonly attribute boolean paused; | 63 readonly attribute boolean paused; |
64 attribute double defaultPlaybackRate; | 64 attribute double defaultPlaybackRate; |
65 attribute double playbackRate; | 65 attribute double playbackRate; |
66 readonly attribute TimeRanges played; | 66 readonly attribute TimeRanges played; |
67 readonly attribute TimeRanges seekable; | 67 readonly attribute TimeRanges seekable; |
68 readonly attribute boolean ended; | 68 readonly attribute boolean ended; |
69 [Reflect] attribute boolean autoplay; | 69 [Reflect] attribute boolean autoplay; |
70 [Reflect] attribute boolean loop; | 70 [Reflect] attribute boolean loop; |
71 void play(); | 71 void play(); |
72 void pause(); | 72 void pause(); |
73 | 73 |
| 74 // media controller |
| 75 [Reflect, TreatNullAs=NullString] attribute DOMString mediaGroup; |
| 76 [CustomSetter] attribute MediaController controller; |
| 77 |
74 // controls | 78 // controls |
75 attribute boolean controls; | 79 attribute boolean controls; |
76 [SetterRaisesException] attribute double volume; | 80 [SetterRaisesException] attribute double volume; |
77 attribute boolean muted; | 81 attribute boolean muted; |
78 [Reflect=muted] attribute boolean defaultMuted; | 82 [Reflect=muted] attribute boolean defaultMuted; |
79 | 83 |
| 84 // tracks |
| 85 [EnabledAtRuntime=VideoTrack] readonly attribute TextTrackList textTracks; |
| 86 [EnabledAtRuntime=VideoTrack, RaisesException] TextTrack addTextTrack(DOMString
kind, optional DOMString label, optional DOMString language); |
| 87 |
80 // WebKit extensions | 88 // WebKit extensions |
81 readonly attribute boolean webkitHasClosedCaptions; | |
82 attribute boolean webkitClosedCaptionsVisible; | |
83 | 89 |
84 // The number of bytes consumed by the media decoder. | 90 // The number of bytes consumed by the media decoder. |
85 readonly attribute unsigned long webkitAudioDecodedByteCount; | 91 readonly attribute unsigned long webkitAudioDecodedByteCount; |
86 readonly attribute unsigned long webkitVideoDecodedByteCount; | 92 readonly attribute unsigned long webkitVideoDecodedByteCount; |
87 | 93 |
88 // FIXME: add DeprecateAs=PrefixedMediaGenerateKeyRequest when MediaKeys is read
y. | 94 // FIXME: add DeprecateAs=PrefixedMediaGenerateKeyRequest when MediaKeys is read
y. |
89 [EnabledAtRuntime=PrefixedEncryptedMedia, RaisesException] void webkitGenerateKe
yRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySyst
em, optional Uint8Array initData); | 95 [EnabledAtRuntime=PrefixedEncryptedMedia, RaisesException] void webkitGenerateKe
yRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySyst
em, optional Uint8Array initData); |
90 [EnabledAtRuntime=PrefixedEncryptedMedia, RaisesException] void webkitAddKey([Tr
eatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Arr
ay key, optional Uint8Array initData, [Default=NullString] optional DOMString se
ssionId); | 96 [EnabledAtRuntime=PrefixedEncryptedMedia, RaisesException] void webkitAddKey([Tr
eatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Arr
ay key, optional Uint8Array initData, [Default=NullString] optional DOMString se
ssionId); |
91 [EnabledAtRuntime=PrefixedEncryptedMedia, RaisesException] void webkitCancelKeyR
equest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem
, [Default=NullString] optional DOMString sessionId); | 97 [EnabledAtRuntime=PrefixedEncryptedMedia, RaisesException] void webkitCancelKeyR
equest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem
, [Default=NullString] optional DOMString sessionId); |
92 | 98 |
93 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyadde
d; | 99 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyadde
d; |
94 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyerro
r; | 100 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyerro
r; |
95 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeymess
age; | 101 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeymess
age; |
96 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitneedkey
; | 102 [EnabledAtRuntime=PrefixedEncryptedMedia] attribute EventHandler onwebkitneedkey
; |
97 | 103 |
98 [EnabledAtRuntime=EncryptedMedia, Conditional=ENCRYPTED_MEDIA_V2] attribute Medi
aKeys mediaKeys; | 104 [EnabledAtRuntime=EncryptedMedia, Conditional=ENCRYPTED_MEDIA_V2] attribute Medi
aKeys mediaKeys; |
99 | |
100 [EnabledAtRuntime=VideoTrack, RaisesException] TextTrack addTextTrack(DOMString
kind, optional DOMString label, optional DOMString language); | |
101 [EnabledAtRuntime=VideoTrack] readonly attribute TextTrackList textTracks; | |
102 | |
103 [Reflect, TreatNullAs=NullString, TreatNullAs=NullString] attribute DOMString me
diaGroup; | |
104 [CustomSetter] attribute MediaController controller; | |
105 }; | 105 }; |
OLD | NEW |