Commit Graph

736 Commits

Author SHA1 Message Date
Paul Adenot
757aef5fa0 Bug 1385305 - Change CanBeCaptured and friends so that they use explicit and self-explaining constants. r=jya
MozReview-Commit-ID: Hpuxlc8Ib5j

--HG--
extra : rebase_source : 3a15d350b8d296f3d6c3fb3419938cdcc01526c2
2017-07-28 17:53:12 +02:00
Paul Adenot
7f1c17c634 Bug 1384247 - Check if an HTMLMediaElement can be capture before doing it. r=dminor
MozReview-Commit-ID: EWpf2qA2Yce

--HG--
extra : rebase_source : fd990877481c6f3977e2dc0ec615c0282d30123d
2017-07-27 16:02:28 +02:00
Gerald Squelart
bc05f23ecc Bug 1383984 - Enable debugging HTMLMediaElement APIs with 'tabs' permission - r=jya,smaug
While "debugger" is not available yet, we can enable these debugging APIs for
extensions that have the "tabs" privilege, which includes the Media Panel
Devtools extension, so we/webdev will get better media-playback information.

MozReview-Commit-ID: I0MAZH9g0HU

--HG--
extra : rebase_source : 98c21147cb2da4f5f3f1c4dea9d3180b774f8c1a
2017-07-25 15:53:01 +12:00
Jean-Yves Avenard
daf2be6beb Bug 1382303 - P2. Do not activate autoplay early. r=jwwang
Per spec, autoplay should only gets triggered once readyState is equal to HAVE_ENOUGH_DATA

MozReview-Commit-ID: 6nW1U6G1qme

--HG--
extra : rebase_source : da46988cc75b0b5c2a87d86f55fca2fda912be55
2017-07-20 19:11:44 +02:00
JW Wang
cf0ba2ea01 Bug 1380569. P3 - remove AbstractMediaDecoder::NotifyWaitingForKey() and its callers. r=gerald
MozReview-Commit-ID: 3fHDr0xw92P

--HG--
extra : rebase_source : 07ca1ae4e8d65e66beca2d1eb0de232ec6e291fb
extra : intermediate-source : d367e33cc9c132abb9e66aae652f4bbbf4f58be1
extra : source : 029ccea837ef1948bd33ce1d786626f362c41bdf
2017-07-13 14:52:05 +08:00
JW Wang
5cf374a225 Bug 1380569. P1 - rename CannotDecryptWaitingForKey() to NotifyWaitingForKey() and add the function to MediaDecoderOwner. r=gerald
We will use MediaEventSource to plumb the event from MFR to the media element.

MozReview-Commit-ID: 4gaEx7vYybE

--HG--
extra : rebase_source : fd595399e2db4e76ad117636768e160c2f054775
extra : intermediate-source : 1fc86c40dc83e79306c721b1acb0f31803181509
extra : source : d24b62a6041966b2639e5543c9ecccc4f7656a0d
2017-07-13 14:41:09 +08:00
JW Wang
51b253855d Bug 1376004. P1 - include http response code in the error.message field so the UI has more details to display a proper error message. r=cpearce
MozReview-Commit-ID: CHBXZZxfPc0

--HG--
extra : rebase_source : 004f5bb3552b8d2b8b3b911887037c78e7cb9e79
2017-07-14 15:17:32 +08:00
Bevis Tseng
f051ae4a45 Bug 1341540 - Label runnables in dom/html/HTMLMediaElement.cpp. r=jwwang
MozReview-Commit-ID: 7i0MhGWoNPb

--HG--
extra : rebase_source : 577a231ac5ed3658311eacd19cd3fe912fdee0b0
2017-07-07 10:36:13 +08:00
Olli Pettay
21b0ca3bbf Bug 1378196, Make IsEventAttributeName non-virtual in common case, r=ehsan
--HG--
extra : rebase_source : 9daf46de13698348b7ab6b68f8da13ffb338c0a0
2017-07-04 23:54:30 +03:00
Paul Adenot
404c800005 Bug 1341555 - Consolidate use of the MSG's AbstractMainThread, and stop having AbstractMainThread on MediaStreams. r=pehrsons
MozReview-Commit-ID: 5hGDQcfpH6a

--HG--
extra : rebase_source : 41bb678f37cfcdbc9912a25f45a5ca488084aabe
2017-06-29 11:30:57 -07:00
Paul Adenot
6e485889b8 Bug 1330360 - Create new MSGs for each nsPIDOMWindow. r=jesup
MozReview-Commit-ID: 5m1MGcLmT7J

--HG--
extra : rebase_source : b9c05464bb545c047b7718a048eb7e5de3fe275d
2017-06-23 16:18:34 -07:00
Paul Adenot
d1a2003316 Bug 1371719 - Don't create a MediaStreamGraph without doing anything with it. r=jesup
The MediaStreamGraph relies on having at least one message sent to its message
queue on creation, or it will just sit there and do nothing, and block shutdown
because its not running its rendering loop, so it's not progressing in the
MediaStreamGraph life cycle state machine.

This patch makes sure the `captureStream` will succeed before creating an MSG.

MozReview-Commit-ID: CN1arWydmxC

--HG--
extra : rebase_source : b59a8ec4de17aa90d274819ea0c7d687673c8075
2017-06-28 15:19:39 -07:00
JW Wang
1e2be3e873 Bug 1376363. P1 - store container type in MediaDecoder. r=gerald
So we can remove MediaResource::GetContentType() in the future.

MozReview-Commit-ID: zWUNF2uGpf

--HG--
extra : rebase_source : 04f50c4db9dac8503f878a8a1986e627f9a074a3
extra : source : 10737393beaabed640aa3ff67fac2a07567400b4
2017-06-26 17:10:47 +08:00
Chris Pearce
c1a1beca7f Bug 1376509 - Bump supported playack rates to [1/16,16]. r=padenot
Chrome supports playback rates in the ranges of [1/16,16], so we may as well
support the same.

MozReview-Commit-ID: 7mMXQfPiv9d

--HG--
extra : rebase_source : 5dd0b717ad711f49ff3df5156cc07d48c8a694b7
2017-06-28 10:00:58 -07:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
JW Wang
43c85c2307 Bug 1376227. P5 - merge CreateResource() and Load() for they are highly coupled. r=gerald
MozReview-Commit-ID: EH9NROdQfmd

--HG--
extra : rebase_source : 63c2ba04de1a25fb05db15977d8a19638e31b272
2017-06-23 15:39:57 +08:00
JW Wang
42e66521f5 Bug 1376227. P4 - remove the unused parameter from FinishDecoderSetup(). r=gerald
MozReview-Commit-ID: 7Ux811oMq9y

--HG--
extra : rebase_source : 82f058ad862daf93bc3c5bbb2dbc6a1b57757811
2017-06-23 15:25:40 +08:00
JW Wang
350f03bde7 Bug 1376227. P3 - move Load() down the class hierarchy. r=gerald
So we won't pass an unused |nsIStreamListener**| to MediaSourceDecoder::Load().

MozReview-Commit-ID: 2TCby8m8K5H

--HG--
extra : rebase_source : 349179aa4303c0abd8b86a695789770e158e5c28
extra : intermediate-source : d6f550bd6709a0ee7db6033286af42565a20cdb1
extra : source : ed524d855a1a78665c499152a9360ba961655641
2017-06-23 14:12:41 +08:00
JW Wang
1dbf0f77fa Bug 1376227. P2 - remove unused code following P1. r=gerald
MozReview-Commit-ID: JbwY1Owtk7H

--HG--
extra : rebase_source : 0f82ac16f56ce6ba27944b093b49c8ff6479e66c
extra : intermediate-source : 38c1c8a70fb0209f8c6a3ca596664db9af089763
extra : source : 7cfe394c4790ca7687db9004c96380f088c2bb59
2017-06-21 17:34:22 +08:00
JW Wang
884c26d368 Bug 1376227. P1 - let MediaDecoder sub-classes have the knowledge how to create a MediaResource. r=gerald
MozReview-Commit-ID: 2fHEkU46MUr

--HG--
extra : rebase_source : 18f5b01a065d6acbdc88ce808f8bd1e8e462e8d7
extra : intermediate-source : e003e070535d95f7e6334f4a92d6d763d436023c
extra : source : 450d506c6bb85f53b44fed296a32845bcd777905
2017-06-21 17:30:56 +08:00
Mats Palmgren
3ae8e80f81 Bug 1375075 - Remove a FlushPendingNotifications that we don't need anymore. r=cpearce
The code that needed it was removed in bug 1325053.

MozReview-Commit-ID: 8P60SOpqyPq
2017-06-23 02:03:09 +02:00
Mats Palmgren
c3f48d9dd2 Bug 1374875 - Use simpler mutation observer than nsRange for media elements. r=cpearce
MozReview-Commit-ID: FVPdHC6tBXg
2017-06-23 02:03:08 +02:00
JW Wang
61f7ca2479 Bug 1374930. P3 - move Clone() down to ChannelMediaDecoder for clone is possible only for those use channel-based resource. r=cpearce
MozReview-Commit-ID: Ci2kbts2pkQ

--HG--
extra : rebase_source : 3a2e70ca4bf56e1c73b7faff8e183211787a96bf
extra : source : 682cb949adae4683ae1cbbfbb4c457b83cb1fddc
2017-06-20 18:10:27 +08:00
JW Wang
1aa2d7bbd7 Bug 1374930. P2 - add an entry only after FinishDecoderSetup() succeeds. r=cpearce
MozReview-Commit-ID: 6MKRhVIZ4Z6

--HG--
extra : rebase_source : ab5a8551a1a054eba93be85c602b954ab15f9d8e
extra : intermediate-source : 75c4be291a53f119a30f40b3ae555a5ce7a0544f
extra : source : 20dd0be1d8d4f7838a0aff0755ad14e00a1d6eb0
2017-06-20 15:27:45 +08:00
JW Wang
75e01f7b0a Bug 1371202. P1 - plumb the 'loop' attribute into MDSM. r=jya
MozReview-Commit-ID: DtsaXmtQw76

--HG--
extra : rebase_source : 34686d455670975a824dc803a16b8acff97c86ab
extra : intermediate-source : 0de95b1644a365dda9beff4b75d56251da2258c7
extra : source : ba5b2599c949766395bf5b0381023a752bc6e04d
2017-06-08 12:03:10 +08:00
JW Wang
e8a94c0927 Bug 1371200. P2 - add more fields to MediaDecoderInit. r=cpearce
Now we can init some members in the constructor and remove the setters
that are called only once.

MozReview-Commit-ID: 2hkrIA6pFlh

--HG--
extra : rebase_source : 33c008ef1508597e64ef7f92b028867dbd4ffba6
extra : source : fa213ee733ea881f4f76dac06c9b4709aeba4b91
2017-06-07 14:10:26 +08:00
JW Wang
4031d18757 Bug 1371200. P1 - add MediaDecoderInit and fix MediaDecoder constructor and its friends. r=cpearce
We will add more fields to MediaDecoderInit and be able to remove some setters.

MozReview-Commit-ID: BVx935IHQHf

--HG--
extra : rebase_source : 6d167265e478ce39881ceada1303e9ca18189bbf
extra : source : 0c26f909568f673591ad6720458dfc912c01daad
2017-06-07 12:14:11 +08:00
Kirk Steuber
99a80af5db Bug 1365092 - Move side effects of SetAttr, UnsetAttr, and ParseAttribute functions to BeforeSetAttr and AfterSetAttr r=bz
This is necessary to facilitate the transition to cloning attributes instead of reparsing them.

MozReview-Commit-ID: Gyd1tD6ldly

--HG--
extra : rebase_source : 777cfed750c95c448f953a6ec98026481997e227
2017-06-07 10:28:20 -07:00
Jean-Yves Avenard
a16fab66e4 Bug 1362165: P7. Only complete appendBuffer once readyState has changed. r=jwwang
MSE specs require that the readyState be modified during either the Initialization Segment Received or the Coded Frame Processing algorithms.

At this stage, we only handle the Initialization Segment part (readyState moving from HAVE_NOTHING to HAVE_METADATA)

MozReview-Commit-ID: KBnnWuHJ6Om

--HG--
extra : rebase_source : a4450139762d5d033438fbee2ce560fe02ed6ffc
2017-05-09 12:23:11 +02:00
Alastor Wu
6ad4f8c987 Bug 1362793 - part1 : shouldn't shutdown decoder too early. r=jwwang
The spec says that we don't need to change the ready state when getting the error.
If the ready state is "HAVE_METADATA", it means we could get the video's duration
at that time.

However, if we shutdown decoder too early, we won't get the correct duration.

In addition, since we remove old decoder prior to create new one in the function
HTMLMediaElement::SetDecoder(), we can remove the decoder checking assertion
in HTMLMediaElement::InitializeDecoderForChannel().

MozReview-Commit-ID: CHRJHng8Xm0

--HG--
extra : rebase_source : 32b2114f5b4bce2d777826295959a6ce0701984d
2017-05-19 12:38:17 +08:00
Kirk Steuber
e74f1cd513 Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr r=bz
In order to facilitate the movement of code with side-effects called by Element::SetAttr to Element::BeforeSetAttr and Element::AfterSetAttr, Element::AfterSetAttr should have access to the old value of the attribute. This includes information about whether there was previously a value set or not.

Accomplishing this involved passing an additional argument through functions that find and change the old attribute value in order to ensure that we can differentiate between an empty old value and an absent old value (attribute was not set).

Note that while I tried to ensure that accurate values (and their absence) are reported to Element::AfterSetAttr, I largely ignored SVG. While the old value reported for SVG values should be however accurate the value already being reported to SetAttrAndNotify was, SVG elements do not currently report unset values properly because they will never pass a null pointer to SetAttrAndNotify.

MozReview-Commit-ID: K1mha8CNFZP

--HG--
extra : rebase_source : 42776eb01451d371e4aebcc17fe3dd112c8d268b
2017-05-18 14:09:01 -07:00
Tom Ritter
f447134149 Bug 1365036 Lowercase Objbase.h so MinGW can find the file r=baku
MozReview-Commit-ID: JCgyym17EO7

--HG--
extra : rebase_source : 2cc153f51f5de6632afa359b9b291a24401fe307
2017-05-15 15:34:58 -05:00
Chun-Min Chang
da52aad1f7 Bug 1331763 - part1: Support EME content for AudioContext::CreateMediaElementSource; r=cpearce
MozReview-Commit-ID: 1OMySAPCH4i

--HG--
extra : rebase_source : abd014ffc19976abbfdb523b6a172e42a3a80521
2017-05-15 13:21:28 +08:00
Chris Pearce
8be5473cac Bug 1362212 - Implement HTMLMediaElement.reportCanPlayTelemetry. r=gerald
Defer determining whether we have usable decoders to an off-main thread in
order to avoid janking the main thread.

MozReview-Commit-ID: Ape5zEBBMrz

--HG--
extra : rebase_source : 1b77046ebb7bb2d4ff1ba53afce904d3de45c335
2017-05-10 11:31:16 +12:00
Alastor Wu
a6e6b04a38 Bug 1351087 - part1 : don't register agent for audio without audio track. r=baku
Since we don't want to show media control for media without audio track (eg. GIFV),
it's no need to register audio agent for them.

MozReview-Commit-ID: 22YrMkpNrcP

--HG--
extra : rebase_source : 78a6c41b6018f91ed9370fb2f15c650fe76ba3a1
2017-05-09 14:10:43 +08:00
Alastor Wu
acab9ac022 Bug 1357633 - part1 : request audio focus again when resume media from page. r=baku
Should also update audio playing changed after resumed from page.

MozReview-Commit-ID: 66vuJJFeWN3

--HG--
extra : rebase_source : 06802b2e49f5e712a1d9fd34d4ae017995faaa75
2017-05-10 23:43:11 +08:00
Carsten "Tomcat" Book
d66b9f27d5 merge mozilla-inbound to mozilla-central a=merge 2017-05-10 15:07:28 +02:00
Bill McCloskey
c197e07ff2 Bug 1363560 - Name more runnables (r=mccr8)
MozReview-Commit-ID: 3hxZDA4JlTV
2017-05-09 21:53:25 -07:00
Tom Tung
150ceb8855 Bug 1348050 - Part 4: Mark channel as urgent-start for loading media. r=baku
The part is mainly to set urgent-start for loading media when it's initiated by
user interaction. For the HTMLMedia element, it has its algorithm to pre-load
the media and users will get feedback once they play the media. Thus, I only
set urgent-start when the media element has autoplay attribute since the sooner
enough resource is loaded the sooner the media will be played.

MozReview-Commit-ID: 7nu3PUt8iYo

--HG--
extra : rebase_source : f1abfecdccb74f4ec79a057534c2e9a1bfd5ae41
2017-04-28 15:27:10 +08:00
Iris Hsiao
541787d3f9 Backed out changeset 763cc804a25d (bug 1361944) for causing crashtest perma failure on Android 2017-05-05 15:12:51 +08:00
JW Wang
dba2f2df64 Bug 1361944. P2 - be sure to shut down the existing decoder before loading the next source child. r=cpearce
Otherwise we will fail the assertion (!mDecoder, "Shouldn't have a decoder")
in HTMLMediaElement::InitializeDecoderForChannel().

MozReview-Commit-ID: 1zShp0th3Uv

--HG--
extra : rebase_source : 9b61fd8f6817e33c7d041e4b49bc34ccbc357a15
2017-05-04 13:28:17 +08:00
JW Wang
0b67e0ea16 Bug 1361944. P1 - add a crash test. r=cpearce
The crash happens when:
1. there are multiple <source> children.
2. decode error happens on the 1st child.

MozReview-Commit-ID: 60UXaQ475Nh

--HG--
extra : rebase_source : b7e61ae909cfa10fb2db3c41b278449de41b9450
2017-05-04 14:23:23 +08:00
Kirk Steuber
7fdb378650 Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz
Currently, attribute and child arrays (implemented in dom/base/nsAttrAndChildArray.h) start out empty. When cloning, the array ends up being resized multiple times in order to add the attributes and children that are being cloned from the original node. This would be quicker if the array was initialized to the correct size in the first place so that resizes are not necessary.

However, preallocating space for children is only necessary when performing a deep clone. Therefore, an additional parameter is being added to the Clone, CopyInnerTo, and CloneDocHelper methods to indicate whether preallocation of children should happen. Attributes are copied either way, so that part of the array is preallocated in both cases.

MozReview-Commit-ID: 3iVezeAKXnI

--HG--
extra : rebase_source : 9c3deec6d7aafd6411044d623d4863637b45fd58
2017-04-20 12:57:48 -07:00
Kaku Kuo
dab014bd99 Bug 1360123 P2 - move ConstructMediaTracks/RemoveMediaTracks to HTMLMediaElemnt; r=jwwang
MozReview-Commit-ID: 3S63JeXAX2w

--HG--
extra : rebase_source : ef807247a5042fa23ba6b6f5c907035bd8d64199
2017-04-18 15:43:55 +08:00
Kaku Kuo
bb1078e81f Bug 1360123 P1 - don't bother creating a new track list in HTMLMediaElement::RemoveMediaTracks() r=jwwang
MozReview-Commit-ID: 6lmSxmKMrDK

--HG--
extra : rebase_source : b99831cdf14a2d0ae156792f49ef7f7f65b1a1cd
2017-04-10 18:09:35 +08:00
Alastor Wu
c03792963c Bug 1358061 - remove moz-audiochannel codes for media element and web audio. r=baku
MozReview-Commit-ID: KPuhxCVezOZ

--HG--
extra : rebase_source : 74a9c9a9746d0add26f279c6dd5ddc30681be901
2017-04-26 12:02:32 +08:00
Phil Ringnalda
6b3d58414b Backed out changeset 6e7efb9115fd (bug 1358061) for build bustage
CLOSED TREE

MozReview-Commit-ID: F9FSciVgynw
2017-04-25 20:55:30 -07:00
Alastor Wu
222377e8ac Bug 1358061 - remove moz-audiochannel codes for media element and web audio. r=baku
MozReview-Commit-ID: BwZ6vHUPnSB

--HG--
extra : rebase_source : c92556cf92ff96b8014281396b28e1e232aa8576
2017-04-25 12:19:28 +08:00
JW Wang
e96831f0c7 Bug 1356514 - remove the usage of nsContentUtils::IsInPrivateBrowsing() in HTMLMediaElement.cpp. r=Ehsan
Per bug 1194891 comment 35, use |NodePrincipal()->GetPrivateBrowsingId() > 0| instead.

MozReview-Commit-ID: Cu6geuTWhGz

--HG--
extra : rebase_source : 1f899705ce1c2d9b7beec44a2f88a2cb37d0430f
2017-04-18 14:26:32 +08:00
JW Wang
433b4bb763 Bug 1348053 - add the UrgentStart flag to the channel when the loading is initiated by a user interaction for quicker network response. r=cpearce
MozReview-Commit-ID: 1tk9k8u1zTu

--HG--
extra : rebase_source : 349a518dd071f4c4b10a3853f7d42fe9a43f0804
extra : intermediate-source : 379f010a50f6a72d5429c530b1a24bfd1c9ed803
extra : source : cd10c3301c6da15e9bc87b956d8cc2c956acefaf
2017-04-10 15:23:11 +08:00