Add mediasource event handler attributes

See https://github.com/w3c/media-source/issues/66
This commit is contained in:
trav90
2017-06-19 03:11:16 -05:00
committed by Roy Tam
parent 0f8fd25be4
commit 7f119769e2
7 changed files with 36 additions and 0 deletions
+10
View File
@@ -2332,3 +2332,13 @@ GK_ATOM(onboundary, "onboundary")
#endif
GK_ATOM(vr_state, "vr-state")
// 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")
+5
View File
@@ -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
+7
View File
@@ -180,6 +180,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
+4
View File
@@ -36,6 +36,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
+3
View File
@@ -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]
+5
View File
@@ -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]
+2
View File
@@ -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);
};