mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
Add mediasource event handler attributes
See https://github.com/w3c/media-source/issues/66
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user