| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2010, 2011 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 28 matching lines...) Expand all Loading... |
| 39 const unsigned short NETWORK_EMPTY = 0; | 39 const unsigned short NETWORK_EMPTY = 0; |
| 40 const unsigned short NETWORK_IDLE = 1; | 40 const unsigned short NETWORK_IDLE = 1; |
| 41 const unsigned short NETWORK_LOADING = 2; | 41 const unsigned short NETWORK_LOADING = 2; |
| 42 const unsigned short NETWORK_NO_SOURCE = 3; | 42 const unsigned short NETWORK_NO_SOURCE = 3; |
| 43 readonly attribute unsigned short networkState; | 43 readonly attribute unsigned short networkState; |
| 44 attribute DOMString preload; | 44 attribute DOMString preload; |
| 45 | 45 |
| 46 readonly attribute TimeRanges buffered; | 46 readonly attribute TimeRanges buffered; |
| 47 void load() | 47 void load() |
| 48 raises (DOMException); | 48 raises (DOMException); |
| 49 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA |
| 50 DOMString canPlayType(in [Optional=DefaultIsUndefined] DOMString type, in [O
ptional=DefaultIsNullString, TreatNullAs=NullString, TreatUndefinedAs=NullString
] DOMString keySystem); |
| 51 #else |
| 49 DOMString canPlayType(in [Optional=DefaultIsUndefined] DOMString type); | 52 DOMString canPlayType(in [Optional=DefaultIsUndefined] DOMString type); |
| 53 #endif |
| 50 | 54 |
| 51 // ready state | 55 // ready state |
| 52 const unsigned short HAVE_NOTHING = 0; | 56 const unsigned short HAVE_NOTHING = 0; |
| 53 const unsigned short HAVE_METADATA = 1; | 57 const unsigned short HAVE_METADATA = 1; |
| 54 const unsigned short HAVE_CURRENT_DATA = 2; | 58 const unsigned short HAVE_CURRENT_DATA = 2; |
| 55 const unsigned short HAVE_FUTURE_DATA = 3; | 59 const unsigned short HAVE_FUTURE_DATA = 3; |
| 56 const unsigned short HAVE_ENOUGH_DATA = 4; | 60 const unsigned short HAVE_ENOUGH_DATA = 4; |
| 57 readonly attribute unsigned short readyState; | 61 readonly attribute unsigned short readyState; |
| 58 readonly attribute boolean seeking; | 62 readonly attribute boolean seeking; |
| 59 | 63 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 86 | 90 |
| 87 readonly attribute boolean webkitHasClosedCaptions; | 91 readonly attribute boolean webkitHasClosedCaptions; |
| 88 attribute boolean webkitClosedCaptionsVisible; | 92 attribute boolean webkitClosedCaptionsVisible; |
| 89 | 93 |
| 90 // The number of bytes consumed by the media decoder. | 94 // The number of bytes consumed by the media decoder. |
| 91 readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitAudioD
ecodedByteCount; | 95 readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitAudioD
ecodedByteCount; |
| 92 readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitVideoD
ecodedByteCount; | 96 readonly attribute [Conditional=MEDIA_STATISTICS] unsigned long webkitVideoD
ecodedByteCount; |
| 93 | 97 |
| 94 #if defined(ENABLE_MEDIA_SOURCE) && ENABLE_MEDIA_SOURCE | 98 #if defined(ENABLE_MEDIA_SOURCE) && ENABLE_MEDIA_SOURCE |
| 95 // URL passed to src attribute to enable the media source logic. | 99 // URL passed to src attribute to enable the media source logic. |
| 96 readonly attribute [V8EnabledAtRuntime=webkitMediaSource, URL] DOMString web
kitMediaSourceURL; | 100 readonly attribute [V8EnabledAtRuntime=mediaSource, URL] DOMString webkitMed
iaSourceURL; |
| 101 |
| 102 // Manages IDs for appending media to the source. |
| 103 [V8EnabledAtRuntime=mediaSource] void webkitSourceAddId(in DOMString id, in
DOMString type) raises (DOMException); |
| 104 [V8EnabledAtRuntime=mediaSource] void webkitSourceRemoveId(in DOMString id)
raises (DOMException); |
| 97 | 105 |
| 98 // Appends media to to the source. | 106 // Appends media to to the source. |
| 99 [V8EnabledAtRuntime=webkitMediaSource] void webkitSourceAppend(in Uint8Array
data) raises (DOMException); | 107 [V8EnabledAtRuntime=mediaSource] void webkitSourceAppend(in Uint8Array data)
raises (DOMException); |
| 100 | 108 |
| 101 // Signals the end of stream. | 109 // Signals the end of stream. |
| 102 [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_NO_ERROR = 0
; // End of stream reached w/o error. | 110 [V8EnabledAtRuntime=mediaSource] const unsigned short EOS_NO_ERROR = 0; // E
nd of stream reached w/o error. |
| 103 [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_NETWORK_ERR
= 1; // A network error triggered end of stream. | 111 [V8EnabledAtRuntime=mediaSource] const unsigned short EOS_NETWORK_ERR = 1; /
/ A network error triggered end of stream. |
| 104 [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_DECODE_ERR =
2; // A decode error triggered end of stream. | 112 [V8EnabledAtRuntime=mediaSource] const unsigned short EOS_DECODE_ERR = 2; //
A decode error triggered end of stream. |
| 105 [V8EnabledAtRuntime=webkitMediaSource] void webkitSourceEndOfStream(in unsig
ned short status) raises (DOMException); | 113 [V8EnabledAtRuntime=mediaSource] void webkitSourceEndOfStream(in unsigned sh
ort status) raises (DOMException); |
| 106 | 114 |
| 107 // Indicates the current state of the media source. | 115 // Indicates the current state of the media source. |
| 108 [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_CLOSED =
0; | 116 [V8EnabledAtRuntime=mediaSource] const unsigned short SOURCE_CLOSED = 0; |
| 109 [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_OPEN = 1; | 117 [V8EnabledAtRuntime=mediaSource] const unsigned short SOURCE_OPEN = 1; |
| 110 [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_ENDED = 2
; | 118 [V8EnabledAtRuntime=mediaSource] const unsigned short SOURCE_ENDED = 2; |
| 111 readonly attribute [V8EnabledAtRuntime=webkitMediaSource] unsigned short web
kitSourceState; | 119 readonly attribute [V8EnabledAtRuntime=mediaSource] unsigned short webkitSou
rceState; |
| 120 #endif |
| 121 |
| 122 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA |
| 123 [V8EnabledAtRuntime=encryptedMedia] void webkitGenerateKeyRequest(in [TreatN
ullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, in [Optional
] Uint8Array initData) |
| 124 raises (DOMException); |
| 125 [V8EnabledAtRuntime=encryptedMedia] void webkitAddKey(in [TreatNullAs=NullSt
ring, TreatUndefinedAs=NullString] DOMString keySystem, in Uint8Array key, in [O
ptional] Uint8Array initData, in [Optional=DefaultIsNullString] DOMString sessio
nId) |
| 126 raises (DOMException); |
| 127 [V8EnabledAtRuntime=encryptedMedia] void webkitCancelKeyRequest(in [TreatNul
lAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, in [Optional=D
efaultIsNullString] DOMString sessionId) |
| 128 raises (DOMException); |
| 129 |
| 130 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeyadded
; |
| 131 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeyerror
; |
| 132 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeymessa
ge; |
| 133 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitneedkey; |
| 112 #endif | 134 #endif |
| 113 | 135 |
| 114 #if defined(ENABLE_VIDEO_TRACK) && ENABLE_VIDEO_TRACK | 136 #if defined(ENABLE_VIDEO_TRACK) && ENABLE_VIDEO_TRACK |
| 115 [V8EnabledAtRuntime=webkitVideoTrack] TextTrack addTextTrack(in DOMString ki
nd, in [Optional] DOMString label, in [Optional] DOMString language) | 137 [V8EnabledAtRuntime=webkitVideoTrack] TextTrack addTextTrack(in DOMString ki
nd, in [Optional] DOMString label, in [Optional] DOMString language) |
| 116 raises (DOMException); | 138 raises (DOMException); |
| 117 readonly attribute [V8EnabledAtRuntime=webkitVideoTrack] TextTrackList textT
racks; | 139 readonly attribute [V8EnabledAtRuntime=webkitVideoTrack] TextTrackList textT
racks; |
| 118 #endif | 140 #endif |
| 119 | 141 |
| 120 attribute [Reflect, TreatNullAs=NullString] DOMString mediaGroup; | 142 attribute [Reflect, TreatNullAs=NullString] DOMString mediaGroup; |
| 121 attribute [CustomSetter] MediaController controller; | 143 attribute [CustomSetter] MediaController controller; |
| 122 }; | 144 }; |
| 123 } | 145 } |
| OLD | NEW |