зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1286722: [MSE] P1. Add mediasource event handler attributes. r=bz
See https://github.com/w3c/media-source/issues/66 MozReview-Commit-ID: 9fANabkz5ud --HG-- extra : rebase_source : 37ef4885191942c56cc2ff0e198c5cbc7cab0c4a
This commit is contained in:
Родитель
d6c9036cce
Коммит
01308240dd
|
@ -2454,3 +2454,13 @@ GK_ATOM(nsuri_mathml, "http://www.w3.org/1998/Math/MathML")
|
|||
GK_ATOM(nsuri_rdf, "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
|
||||
GK_ATOM(nsuri_xul, "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul")
|
||||
GK_ATOM(nsuri_svg, "http://www.w3.org/2000/svg")
|
||||
|
||||
// MSE
|
||||
GK_ATOM(onsourceopen, "onsourceopen")
|
||||
GK_ATOM(onsourceended, "onsourceended")
|
||||
GK_ATOM(onsourceclosed, "onsourceclosed")
|
||||
GK_ATOM(onupdatestart, "onupdatestart")
|
||||
GK_ATOM(onupdate, "onupdate")
|
||||
GK_ATOM(onupdateend, "onupdateend")
|
||||
GK_ATOM(onaddsourcebuffer, "onaddsourcebuffer")
|
||||
GK_ATOM(onremovesourcebuffer, "onremovesourcebuffer")
|
||||
|
|
|
@ -72,6 +72,11 @@ public:
|
|||
static bool IsTypeSupported(const GlobalObject&, const nsAString& aType);
|
||||
|
||||
static bool Enabled(JSContext* cx, JSObject* aGlobal);
|
||||
|
||||
IMPL_EVENT_HANDLER(sourceopen);
|
||||
IMPL_EVENT_HANDLER(sourceended);
|
||||
IMPL_EVENT_HANDLER(sourceclosed);
|
||||
|
||||
/** End WebIDL Methods. */
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -87,6 +87,13 @@ public:
|
|||
void AbortBufferAppend();
|
||||
|
||||
void Remove(double aStart, double aEnd, ErrorResult& aRv);
|
||||
|
||||
IMPL_EVENT_HANDLER(updatestart);
|
||||
IMPL_EVENT_HANDLER(update);
|
||||
IMPL_EVENT_HANDLER(updateend);
|
||||
IMPL_EVENT_HANDLER(error);
|
||||
IMPL_EVENT_HANDLER(abort);
|
||||
|
||||
/** End WebIDL Methods. */
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -35,6 +35,10 @@ public:
|
|||
SourceBuffer* IndexedGetter(uint32_t aIndex, bool& aFound);
|
||||
|
||||
uint32_t Length();
|
||||
|
||||
IMPL_EVENT_HANDLER(addsourcebuffer);
|
||||
IMPL_EVENT_HANDLER(removesourcebuffer);
|
||||
|
||||
/** End WebIDL methods. */
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -28,6 +28,9 @@ interface MediaSource : EventTarget {
|
|||
readonly attribute MediaSourceReadyState readyState;
|
||||
[SetterThrows]
|
||||
attribute unrestricted double duration;
|
||||
attribute EventHandler onsourceopen;
|
||||
attribute EventHandler onsourceended;
|
||||
attribute EventHandler onsourceclosed;
|
||||
[NewObject, Throws]
|
||||
SourceBuffer addSourceBuffer(DOMString type);
|
||||
[Throws]
|
||||
|
|
|
@ -31,6 +31,11 @@ interface SourceBuffer : EventTarget {
|
|||
attribute double appendWindowStart;
|
||||
[SetterThrows]
|
||||
attribute unrestricted double appendWindowEnd;
|
||||
attribute EventHandler onupdatestart;
|
||||
attribute EventHandler onupdate;
|
||||
attribute EventHandler onupdateend;
|
||||
attribute EventHandler onerror;
|
||||
attribute EventHandler onabort;
|
||||
[Throws]
|
||||
void appendBuffer(ArrayBuffer data);
|
||||
[Throws]
|
||||
|
|
|
@ -13,5 +13,7 @@
|
|||
[Func="mozilla::dom::MediaSource::Enabled"]
|
||||
interface SourceBufferList : EventTarget {
|
||||
readonly attribute unsigned long length;
|
||||
attribute EventHandler onaddsourcebuffer;
|
||||
attribute EventHandler onremovesourcebuffer;
|
||||
getter SourceBuffer (unsigned long index);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче