mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1112761
part 1. Replace Pref="media.mediasource.enabled" annotations in IDL with calls to a function which will end up doing something a bit more interesting. r=kinetik
This commit is contained in:
parent
ae8c53e49b
commit
a4c77d8da7
@ -306,6 +306,12 @@ MediaSource::IsTypeSupported(const GlobalObject&, const nsAString& aType)
|
||||
return NS_SUCCEEDED(rv);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
MediaSource::Enabled(JSContext* cx, JSObject* aGlobal)
|
||||
{
|
||||
return Preferences::GetBool("media.mediasource.enabled");
|
||||
}
|
||||
|
||||
bool
|
||||
MediaSource::Attach(MediaSourceDecoder* aDecoder)
|
||||
{
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
|
||||
void EndOfStream(const Optional<MediaSourceEndOfStreamError>& aError, ErrorResult& aRv);
|
||||
static bool IsTypeSupported(const GlobalObject&, const nsAString& aType);
|
||||
|
||||
static bool Enabled(JSContext* cx, JSObject* aGlobal);
|
||||
/** End WebIDL Methods. */
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -48,6 +48,6 @@ partial interface HTMLVideoElement {
|
||||
|
||||
// https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
|
||||
partial interface HTMLVideoElement {
|
||||
[Pref="media.mediasource.enabled", NewObject]
|
||||
[Func="mozilla::dom::MediaSource::Enabled", NewObject]
|
||||
VideoPlaybackQuality getVideoPlaybackQuality();
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ enum MediaSourceEndOfStreamError {
|
||||
"decode"
|
||||
};
|
||||
|
||||
[Constructor, Pref="media.mediasource.enabled"]
|
||||
[Constructor, Func="mozilla::dom::MediaSource::Enabled"]
|
||||
interface MediaSource : EventTarget {
|
||||
readonly attribute SourceBufferList sourceBuffers;
|
||||
readonly attribute SourceBufferList activeSourceBuffers;
|
||||
|
@ -15,7 +15,7 @@ enum SourceBufferAppendMode {
|
||||
"sequence"
|
||||
};
|
||||
|
||||
[Pref="media.mediasource.enabled"]
|
||||
[Func="mozilla::dom::MediaSource::Enabled"]
|
||||
interface SourceBuffer : EventTarget {
|
||||
[SetterThrows]
|
||||
attribute SourceBufferAppendMode mode;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Pref="media.mediasource.enabled"]
|
||||
[Func="mozilla::dom::MediaSource::Enabled"]
|
||||
interface SourceBufferList : EventTarget {
|
||||
readonly attribute unsigned long length;
|
||||
getter SourceBuffer (unsigned long index);
|
||||
|
@ -10,7 +10,7 @@
|
||||
* liability, trademark and document use rules apply.
|
||||
*/
|
||||
|
||||
[Pref="media.mediasource.enabled"]
|
||||
[Func="mozilla::dom::MediaSource::Enabled"]
|
||||
interface VideoPlaybackQuality {
|
||||
readonly attribute DOMHighResTimeStamp creationTime;
|
||||
readonly attribute unsigned long totalVideoFrames;
|
||||
|
Loading…
Reference in New Issue
Block a user