Граф коммитов

195 Коммитов

Автор SHA1 Сообщение Дата
Alastor Wu 1c128b5ce5 Bug 1317167 - only need to do the untrust JS checking in play(). r=jwwang
The first checking condition in the IsAllowedPlay() is used to prevent the play() operation
is called by untrusted JS when media.autoplay.enabled=false. Therefore, we don't need to check
that in CanActivateAutoplay().

MozReview-Commit-ID: 6yqoG8ISyra

--HG--
extra : rebase_source : a3e52a1a5591691f503d7d4ca78dda63c05aef27
2016-11-17 15:09:59 +08:00
Alastor Wu a97a900bc3 Bug 1315551 - part2 : check we have initialized agent when we want to call the agent's function. r=jwwang
Because the agent's initialization might fail if we don't get the valid inner window, we need to
check whether the agent exists before calling the agent's method.

MozReview-Commit-ID: IUuvyGh7CMd

--HG--
extra : rebase_source : 54d0811aad736abdbac5ae7c3cd8cfebed88923a
2016-11-08 11:08:02 +08:00
Alastor Wu 9e8e7969e0 Bug 1302350 - part6 : ensure loading process doens't be interrupted even media element can't be played. r=jwwang
We don't want to stop the loading process even we canceled the play operation.

MozReview-Commit-ID: FyPqBlDKYo0

--HG--
extra : rebase_source : fdbc4390a7763bdbe26e8b809d977234bb5360ea
2016-11-02 14:22:35 +08:00
Alastor Wu a7414dc3e6 Bug 1302350 - part4 : refactor the media-blocking mechanism. r=jwwang
The old way is to start playing first, and then block the media element. This
way is too complicated because it involves lots of interal state and isn't intuitive.

The new way is to ignore the play if the media element should be blocked. It's
easy to know and we doesn't need to keep any internal states because we don't play
the media element.

MozReview-Commit-ID: B20e0pvXES4

--HG--
extra : rebase_source : 6bff5447783c2997050e5c69884afe2c85ddf382
2016-11-02 14:22:24 +08:00
Alastor Wu 8dda44f0e7 Bug 1302350 - part1 : create audio channel agent in the beginning. r=baku
We create audio channel agent in the beginning in oreder to use some agent's methods.
But the agent is still started after media element starting playing.

MozReview-Commit-ID: KPGb7snB2t7

--HG--
extra : rebase_source : dba4b687f572d520481721f48a0b4e9796f73e1f
2016-11-01 17:46:07 +08:00
Andreas Pehrson 220b0176e0 Bug 1301675 - Implement StreamCaptureTrackSource::Stop. r=jib
MozReview-Commit-ID: 2qwNba6bA80

--HG--
extra : rebase_source : 703bf47ec1c838a4c0cb9bb7d4d21dbfb361927a
2016-09-23 16:53:10 +02:00
Alastor Wu 10ed91bc28 Bug 1302453 - part1 : send new gecko event when media is resumed. r=baku
We uses "media-playback" event to notify fennec media control about media start
and end. However, if we resume media which was paused by media control, it won't
send any notification to JAVA side so that the MediaControlService can't change
the correct playing icon.

Therefore, we create new event to inform this situation.

MozReview-Commit-ID: zScaHxvHXM

--HG--
extra : rebase_source : e1434840de36d8621a58fc7406b0f42673a2f3db
2016-10-27 09:59:55 +08:00
Chris Pearce 0833297e6b Bug 1310548 - Delay firing of 'waitingforkey' until all decoded data has been rendered. r=jya
This means 'waitingforkey' will be fired at a predictable time.

MozReview-Commit-ID: HMt1RbgrbuR

--HG--
extra : rebase_source : cb8c36eacd3e78ae5105cd30da7a51d8241dbd5b
2016-10-17 14:16:54 +13:00
Alastor Wu 10174cc9eb Bug 1308119 - replace nsIAudioChannelAgent with AudioChannelAgent. r=baku
Since I want to use more agent's functions in MediaElement and I don't think these functions need to be exposed on IDL level. (for other languages binding)

Therefore, I want to use AudioChannelAgent directly in MediaElement.

MozReview-Commit-ID: 43FvDeLpZPt

--HG--
extra : rebase_source : 78741d791eb66cfb6223866ce823f217e3438fdb
2016-10-07 10:35:01 +08:00
JW Wang 0a2c5a3d36 Bug 1239899. Part 1 - Remove ElementInTreeState for ELEMENT_NOT_INTREE and ELEMENT_INTREE are not used at all. We can use a bool flag to do the job. r=cpearce
MozReview-Commit-ID: 4htNy1dZODF

--HG--
extra : rebase_source : 32776b1201d156f6ed5b60e8b2609ba3abd586af
extra : source : 34900c8548e5527129b0af9cb4b25faa9127f305
2016-09-23 14:51:52 +08:00
James Cheng 48efb9caad Bug 1300654 Part1-Remove MOZ_EME from code base. r=cpearce,smaug
MozReview-Commit-ID: JboGO0w4tcE

--HG--
extra : rebase_source : abfe53f30081f74fc39c900cab48d08c7574bfec
2016-09-08 18:06:20 +08:00
Chris Pearce 7a191ffc4f Bug 1304604 - Use EventTarget to simplyfy HTMLMediaElement.onencrypted implementation. r=smaug
MozReview-Commit-ID: EUpZX4ODgNj

--HG--
extra : rebase_source : dae4ac3da64b61bf282455f2b6e054e13e4cadc1
2016-09-22 16:25:38 +12:00
Chris Pearce d42821ee80 Bug 1304247 - Implement HTMLMediaElement.onwaitingforkeys. r=smaug
MozReview-Commit-ID: DhNV30BfksS

--HG--
extra : rebase_source : 5fab8f1b3333ff8607c0325907fbe7214234c001
2016-09-21 14:10:26 +12:00
Jean-Yves Avenard 895efe36db Bug 1302632: P3. Provide failures details to error attribute. r=jwwang
MozReview-Commit-ID: 3eIXOF96UR4

--HG--
extra : rebase_source : eeeb298d46bd8c6957560e475b7b1c4728a392dc
2016-09-15 16:17:10 +10:00
Phil Ringnalda cd6041148f Backed out 5 changesets (bug 1302632) for forthcoming failures
Backed out changeset f2ced742d6aa (bug 1302632)
Backed out changeset 55e7962d4fc0 (bug 1302632)
Backed out changeset b20f7c887e6c (bug 1302632)
Backed out changeset 22772e4a9c72 (bug 1302632)
Backed out changeset 7d7558864a66 (bug 1302632)
2016-09-15 21:39:00 -07:00
Jean-Yves Avenard f359140d9d Bug 1302632: P1. Set proper error code when readyState is HAVE_NOTHING. r=jwwang
MozReview-Commit-ID: CMQkW5pPDF2

--HG--
extra : rebase_source : 2bd7828104b8f3ac5bb1d8bdc3f84b652300cabe
2016-09-14 16:45:52 +10:00
Carsten "Tomcat" Book 9a2448ee1c Merge mozilla-central to mozilla-inbound 2016-09-14 12:11:09 +02:00
Jean-Yves Avenard 6a25692b20 Bug 1299072: P10. Pass decoding error details to media element's error attribute. r=jwwang
MozReview-Commit-ID: 49DurV9WI5S

--HG--
extra : rebase_source : 469e6ed4e222fb6d6ac34843c3c3346a044c6023
2016-09-11 00:56:09 +10:00
kaku@mozilla.com 09ae2d424f Bug 1299718 part 2 - implement the MarkAsContentSource() API; r=gerald,kamidphish
MozReview-Commit-ID: 1eAdcMAmXSB
2016-09-14 15:50:29 +10:00
Andreas Pehrson c166a2bf07 Bug 1300529 - Remove default arguments from HTMLMediaElement::CaptureStreamInternal. r=padenot
MozReview-Commit-ID: IL7odCBP74

--HG--
extra : rebase_source : 3202348010f7c22a218fd37ad745ae7332fb007c
2016-09-07 15:14:15 +02:00
Jeremy Chen e42a48e81d Bug 1297306 - part5:create enum constructors for EnumTable. r=baku
Enable nsAttrValue::EnumTable to be initialized with enum. So, we could get rid
of the castings in EnumTable. Fix EnumTable initialization comment.

For those untyped enumerations, declare them with uint8_t, as to other typed
enumerations with type size larger than int16_t, force casting to int16_t.

Use {nullptr,0} instead of {0} to represent the last entry.

MozReview-Commit-ID: 7Dma3Apkmxj

--HG--
extra : rebase_source : b2289866c4c33d80c8e170727bf109d018d92f67
2016-09-07 10:20:17 +08:00
Gerald Squelart 693932c5aa Bug 1300459 - Pass MediaInfo by const-ref to SetMediaInfo - r=jya
MozReview-Commit-ID: 5KvCBHmI1JC

--HG--
extra : rebase_source : aece207d36682e1a6cc4125ef660e2eb8f41d92c
2016-09-05 14:23:23 +10:00
Alastor Wu 56e48dbbf5 Bug 1262053 - part8 : remove function NotifyOwnerDocumentActivityChangedInternal. r=cpearce
MozReview-Commit-ID: DnWgQHGJLU5

--HG--
extra : rebase_source : a6c4ab94fad22b2bef1bdde07bc17246943128f7
2016-08-29 18:56:38 +08:00
Alastor Wu 97b81589f8 Bug 1262053 - part6 : don't need to capture media element without audio. r=baku,cpearce
MozReview-Commit-ID: GO6nXbzYwIy

--HG--
extra : rebase_source : 03aba373fde9133bf373292b2cdded5f04f22781
2016-08-29 18:56:32 +08:00
Alastor Wu c060486878 Bug 1262053 - part3 : modify media element for blocking autoplay media. r=cpearce
MozReview-Commit-ID: 8e13lkYTN46

--HG--
extra : rebase_source : 134d698c6136b8dcf0ef67c6b40df787c42cb886
2016-08-29 16:34:26 +08:00
Chris Pearce 1231058432 Bug 1262053 - part2 : remove old media.block-play-until-visible behaviour. r=cpearce
MozReview-Commit-ID: GujLSVfu2rp

--HG--
extra : rebase_source : 6d229b3817736039e46713c9e029dec8fd8d5913
2016-08-29 10:42:10 +08:00
Jean-Yves Avenard 816b36a832 Bug 1298594: P2. Fire waiting event when readyState move back to HAVE_CURRENT_DATA. r=jwwang
MozReview-Commit-ID: BpwYY6njXGC

--HG--
extra : rebase_source : 6dfe1998341ccf9fea69d8974f08aaa54385628d
2016-08-27 22:23:52 +10:00
Andreas Pehrson d7f4cea968 Bug 1259788 - Ensure ready state is updated when first track added after NotifyTracksAvailable(). r=jesup
MozReview-Commit-ID: 1FwPfety82M

--HG--
extra : rebase_source : a241d20acddff8bac40ba9c1bc1c8318ead25fae
2016-08-19 13:41:48 +02:00
Andreas Pehrson 091e8c0b00 Bug 1259788 - Support MediaStream sources for HTMLMediaElement.mozCaptureStream(). r=jesup
This adds support for HTMLMediaElement.mozCaptureStream() and
mozCaptureStreamUntilEnded() for a HTMLMediaElement playing a MediaStream.

This is up to spec, while capturing a HTMLMediaElement playing a file is not.
This incompatibility means we cannot mix sources for the returned MediaStream.

As such, a MediaStream returned while the HTMLMediaElement was playing a file
will only have content while the element is playing files. If the src changes
to a MediaStream, the stream will be empty.

It works the same way if a MediaStream was captured while the HTMLMediaElement
was playing another MediaStream.

This is due to TrackID management - MediaDecoder doesn't care, and creates new
tracks when you seek, so users are unable to keep track, while for MediaStream
we control everything from main thread and keep track of the TrackIDs used
previously.

This also adds a separate path from MediaElementAudioSourceNode so that we don't
forward video tracks when the returned MediaStream is only used internally for
WebAudio. We should in that case not require a DOMMediaStream but just forwarding
tracks to a TrackUnionStream should be enough, and will save us some cpu cycles.
This is however fine for now as it's simpler.

MozReview-Commit-ID: Bg8hESDISDU

--HG--
extra : rebase_source : 83885a73ec8cfc5fbe3c30a9330a52cd6b6dff12
extra : source : f1aec79078869c0a6435a1c06957c649d7a40dd9
2016-08-23 17:51:50 +02:00
Andreas Pehrson e9d5ff0db1 Bug 1259788 - Rename CaptureStreamTrackSource to DecoderCaptureTrackSource. r=jesup
This prepares HTMLMediaElement for having a separate MediaStreamTrackSource for
MediaStreams, StreamCaptureTrackSource.

MozReview-Commit-ID: FVrYxFgvXgA

--HG--
extra : rebase_source : 5c162a0e861fa693fea0ba6b94b8e45446c0c13c
extra : source : a9151ac77a81573b8dbd9fee9c8aa09ba8dc7812
2016-07-06 12:15:27 +02:00
Andreas Pehrson 702bbad147 Bug 1259788 - Multi-track support for MediaTrackList. r=jesup
MozReview-Commit-ID: 1av5uvyCMYv

--HG--
extra : rebase_source : d60ecefbe55bf3d77521aaf3aced427e0012411a
extra : source : e108109d193b5f18e358fcb226d7700c5103d9cc
2016-08-24 10:58:04 +02:00
Bryce Van Dyk bf4a449efb Bug 1145011 - Implement waitingforkey event. r=jya
Bubble information from SamplesWaitingForKey to an HTMLMediaElement so that we
can emit a waitingForKey event. If we are unable to decode more samples due to
needing a key the event will be signalled. See
http://w3c.github.io/encrypted-media/#dom-evt-waitingforkey for more information
on this event.

The code in place before this patch handles updating readyState when we are
waiting for a key, this patch adds the event which should be emitted in such a
case. The spec defines certain preconditions should be the case before running
the algo to emit this event. For example, the element should potentially be
playing, and it should have at least HAVE_FUTURE_DATA ready state. This is not
strictly true for when the new code is run, due how existing code handles ready
state. We are honoring the spirit of the spec, though the letter of the spec is
lightly gone against in the handling of the preconditions.

MozReview-Commit-ID: LKlDd4wkRSE

--HG--
extra : rebase_source : 2c61fc41636e430afa23240ad5d26c886124d87f
2016-08-22 08:51:01 +12:00
bechen 931402dd2f Bug 1291629 - Remove RTSP code. r=jwwang
MozReview-Commit-ID: AxaLwO4rTuY

--HG--
extra : rebase_source : f8a5de1be1471238d62b6bbc419b3a45f2590da6
2016-08-10 10:32:25 +08:00
Alastor Wu d5a9e0c263 Bug 1283417 - part1 : implement function to notify cue's display states changed. r=bechen
MozReview-Commit-ID: AF2S2UOLCt1

--HG--
extra : rebase_source : a49043e2114cba053168b5e3f52f3846c456b2fa
2016-08-09 16:43:07 +08:00
Gerald Squelart d78a374b2d Bug 1293145 - Simulate video-decode-suspend for telemetry purposes - r=kamidphish
After a video has been playing while hidden for a certain time, count the time
until it is not hidden anymore (or it has finished playing), to test-drive how
much decoding time would have been saved by the video-decode-suspend feature.

Note that this is done inside HTMLMediaElement by simulating what should happen
in the MDSM, because instrumenting the MDSM itself and friends would have been
harder and more intrusive.

MozReview-Commit-ID: LdxhPtmoXeA

--HG--
extra : rebase_source : 151e1f1383ab5c445eb8c957be8363340cdc4ab1
2016-08-08 10:14:39 +08:00
Iris Hsiao 36c9d770e1 Backed out changeset 41138b630cdc (bug 1293145) for nsCOMPtr crash \
CLOSED TREE
2016-08-09 14:21:22 +08:00
Gerald Squelart 5ab439ad36 Bug 1293145 - Simulate video-decode-suspend for telemetry purposes - r=kamidphish
After a video has been playing while hidden for a certain time, count the time
until it is not hidden anymore (or it has finished playing), to test-drive how
much decoding time would have been saved by the video-decode-suspend feature.

Note that this is done inside HTMLMediaElement by simulating what should happen
in the MDSM, because instrumenting the MDSM itself and friends would have been
harder and more intrusive.

MozReview-Commit-ID: LdxhPtmoXeA

--HG--
extra : rebase_source : c4063d7c39b56e62e4f397bc21ef889ed14307c8
2016-08-08 10:14:39 +08:00
Kaku Kuo c05bed0045 Bug 1274626 part 1 - add a method to HTMLMediaElement for debugging visibilty change; r=jwwang,ehsan
MozReview-Commit-ID: B1gAc0KfmCQ

--HG--
extra : transplant_source : %F7%85%C0EhC%01%16%AB%60%C2%B0%1C3J%F5%2Co%8BG
2016-07-28 16:09:02 +08:00
Carsten "Tomcat" Book 740bb4ed16 Backed out changeset eb7f310f128d (bug 1274626) for breaking unified builds 2016-08-02 17:47:47 +02:00
Kaku Kuo b5496ba72c Bug 1274626 - Part 1 - add a method to HTMLMediaElement for debugging visibilty change; r=jwwang,ehsan
MozReview-Commit-ID: B1gAc0KfmCQ

--HG--
extra : transplant_source : %FD%03/Y%C3%B0%04%3ACH%8D%87%89%A1%EC%F9%89%BC%E0%9A
2016-07-28 16:09:02 +08:00
Carsten "Tomcat" Book fc8e03f0d8 Merge mozilla-central to autoland 2016-07-30 16:49:41 +02:00
JW Wang 65db31d2a5 Bug 1289649 - HTMLMediaElement should clear mDecoder when XPCOM shutdown begins. r=gerald
MozReview-Commit-ID: A3ECReCgiD7

--HG--
extra : rebase_source : 452e156b9ecb449f311bd47f0afcc3a4bd03e10e
2016-07-27 10:26:21 +08:00
Alastor Wu 0f54e0840d Bug 1282410 - part1 : open unsupported type media. r=cpearce 2016-07-29 17:02:31 -05:00
Gerald Squelart 5d19600ca6 Bug 1287712 - TimeDurationAccumulator includes running timer in reports - r=cpearce
If the timer is currently running, add started time segment until now to
Total(), and add 1 to Count().
This ensures correct values are returned without having to Pause().

MozReview-Commit-ID: JSBvL93GtkE

--HG--
extra : rebase_source : 86923c39e54c778151812a55e2ad9e4e010047fd
2016-07-19 17:46:38 +10:00
Sebastian Kaspari 7d659e0066 Backed out 3 changesets (bug 1282410)
Backed out changeset 39c367ecc144 (bug 1282410)
Backed out changeset 577309fc4bbb (bug 1282410)
Backed out changeset 339b5c5d3595 (bug 1282410)

MozReview-Commit-ID: 17IgTjbib20
2016-07-18 17:26:25 +02:00
Gerald Squelart ee83c3575b Bug 1285419 - Record mediasource hidden play time - r=kamidphish
Note that this is a simple duration counter based on the existing (non-hidden)
play-time, but it only counts when video is playing while hidden.
There is no bucketing yet, future probes may add finer-grained information.

MozReview-Commit-ID: DUfryXjGBAN

--HG--
extra : rebase_source : 4d0bd7f60329dba6c6a6ab039cc733315c50b686
2016-07-08 16:40:31 +10:00
Gregory Szorc 021d3fdfc7 Merge mozilla-central to mozilla-inbound 2016-07-06 18:26:17 -07:00
Alastor Wu 1c9d35df15 Bug 1282410 - part3 : add log. r=cpearce
MozReview-Commit-ID: KWf3uya31zv

--HG--
extra : rebase_source : 039f3d668204da35575262c36adc3bbef6b68109
2016-07-06 10:54:11 +08:00
Alastor Wu 3d564c05b3 Bug 1282410 - part1 : open unsupported type media. r=cpearce
MozReview-Commit-ID: 4fjkDlRgdt7

--HG--
extra : rebase_source : a59607b1236c0047b97d7ca05002f1960e20ce51
2016-07-06 10:34:29 +08:00
ctai ff32ed223d Bug 1266646 - Change HTMLMediaElement::StreamSizeListerner to inherit MediaStreamTrackDirectListener. r=pehrsons
MozReview-Commit-ID: HnNv9BnlbDy

--HG--
extra : transplant_source : i0%FA%08%16%A6/%96%13%C5%F22%5E%EC%8C%2B%C6%B1%F3_
2016-05-10 17:02:15 +08:00