Commit Graph

1099 Commits

Author SHA1 Message Date
Alex Chronopoulos
1d4e155d80 Bug 1387454 - Create a MediaStreamGraph according to the given sample rate. r=padenot
MozReview-Commit-ID: 4YP8oWIVyjy
2018-04-03 20:02:15 +03:00
Boris Zbarsky
152cd3ba6e Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Chris Pearce
d10ef7d9bd Bug 1445104 - Format HTMLMediaElement constructor with leading ',' instead of trailing. r=jya
MozReview-Commit-ID: DiRjKmtERGq
2018-03-13 13:41:46 +13:00
Chris Pearce
cf783c6abe Bug 1445104 - Remove HTMLMediaElement::{mStatsShowing,mMediaSecurityVerified} as they're unused. r=jya
MozReview-Commit-ID: LtKw4Hj3M0G
2018-03-13 13:33:42 +13:00
Chris Pearce
dc786266e3 Bug 1445104 - Initialize HTMLMediaElement fields in class declaration. r=jya
This makes the constructor simpler.

MozReview-Commit-ID: 30CO1iBj4rH
2018-03-13 13:32:05 +13:00
Chris Pearce
8e88624abd Bug 1434804 - Pause autoplayed media if they become audible. r=kamidphish
Our autoplay blocking is trivial to defeat; just mute or volume=0 a video,
play(), and then unmute, and then you're playing audibly.

So this patch makes us pause() media that become audible atfter playback
has started.

MozReview-Commit-ID: 2RAtbohMGJO
2018-03-12 13:05:04 +13:00
Videet
2c62d46dd7 Bug 547707: replaced hardcoded strings by definitions in nsMimeTypes.h r=gerald
MozReview-Commit-ID: 6f85pRUe8Tg
2018-03-06 17:43:57 +01:00
Emilio Cobos Álvarez
0ff849122a Bug 1442207: Remove unneeded arguments to nsIMutationObserver. r=smaug
aDocument is always content->OwnerDoc().
aContainer is always content->GetParent().

Differential Revision: https://phabricator.services.mozilla.com/D664

MozReview-Commit-ID: 4xwPCOnhyIL
2018-03-01 22:45:17 +01:00
Dan Glastonbury
60283ce4dd Bug 1440555 - P1: Allow setVisible to take effect before decoder creation. r=cpearce
MozReview-Commit-ID: GSNM6esm0fW
2018-02-27 14:33:41 +10:00
Ben Kelly
d1e74e121d Bug 1440407 P2 Remove some unnecessary nsPIDOMWindowInner QI to nsIGlobalObject. r=mystor 2018-02-22 14:28:39 -08:00
Chris Pearce
452586fd3b Bug 1439473 - Improve logging of HTMLMediaElement JS API calls. r=kamidphish
To make it easier to tell what HTMLMediaElement API functions sites' JS is
calling, we should add more mozlogs. This will make it easier to figure out why
things aren't playing.

MozReview-Commit-ID: 9eVvkagGNgf
2018-02-15 16:39:44 +13:00
Csoregi Natalia
39c999114b Backed out changeset 2d7a7976ee3a (bug 1439473) for bustage HTMLMediaElement.cpp:4032. CLOSED TREE 2018-02-22 04:43:29 +02:00
Chris Pearce
35f6a976f6 Bug 1439473 - Improve logging of HTMLMediaElement JS API calls. r=kamidphish
To make it easier to tell what HTMLMediaElement API functions sites' JS is
calling, we should add more mozlogs. This will make it easier to figure out why
things aren't playing.

MozReview-Commit-ID: 9eVvkagGNgf
2018-02-15 16:39:44 +13:00
Adrian Wielgosik
5dd6662e27 Bug 1438956 - Modify HTMLMediaElement::Seek to avoid undefined behavior. r=bz
Previously, in IsInRanges, aIntervalIndex could have values between -1..length-1.
After the change, the values are in range 0..length, which makes it possible to use unsigned ints and avoid UB.

MozReview-Commit-ID: 39SIzXRHv91
2018-02-17 19:29:43 +01:00
Adrian Wielgosik
85e83416d3 Bug 1438956 - Add inline Start/End TimeRanges methods for C++ users. r=bz
MozReview-Commit-ID: DcLsYyKV7WX
2018-02-16 19:36:40 +01:00
Adrian Wielgosik
14167d9013 Bug 1438956 - Remove nsIDOMTimeRanges. r=bz
MozReview-Commit-ID: DAgQ0OkSxkq
2018-02-16 19:34:28 +01:00
Kyle Machulis
9ce6990bc9 Bug 1407040 - Remove C++ usage of nsIDOMHTMLMediaElement; r=bz
MozReview-Commit-ID: 6MGS4UqKwrU
2018-02-14 21:22:38 -08:00
Kyle Machulis
b3a2a50103 Bug 1407040 - Change HTMLMediaElement QIs to FromContent calls; r=bz
MozReview-Commit-ID: JoHA0LbJnu9
2018-02-14 21:17:45 -08:00
Kyle Machulis
6404db48ec Bug 1407040 - Change HTMLMediaElement XPCOM Enums to WebIDL Enums; r=bz
MozReview-Commit-ID: 55GnbaL2HKl
2018-02-14 19:23:32 -08:00
Chris Pearce
e22e59f94c Bug 1431674 - Backed out changeset 9d197f1860e6. r=backout
MozReview-Commit-ID: wP0aucXgzA
2018-02-07 15:28:48 +13:00
Chris Pearce
20ed465a7f Bug 1431674 - Backed out changeset 3e22200b7e83. r=backout
The changes in bug 1324883 regressed YouTube, so back them out.

The changes in bug 1324883 were trying to cause the media cache to be cleared
on tab close and on CTRL+F5 reload (i.e. a bypass cache-reload) but they are
causing problems on YouTube,  which doesn't use the media cache and instead
uses MSE.

MozReview-Commit-ID: Hx2cehZ2wm1
2018-02-07 15:28:07 +13:00
Andreas Pehrson
c38486c12d Bug 1299515 - Plumb MediaStreamTrack enabled state to sources. r=jib
MozReview-Commit-ID: Eg1g9JtLmOz
2017-11-10 15:55:42 +01:00
Andrea Marchesini
3faaf5a84b Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Brindusan Cristian
1153f2c09e Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Andrea Marchesini
b434804b93 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Chris Peterson
677bf4030c Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe
2017-11-05 19:37:28 -08:00
Honza Bambas
0691670da7 Bug 1391277 - Investigative logging in CSP: log when 'upgrade-insecure-requests' CSP is added to the CSP context, r=bz 2018-01-11 10:57:00 +02:00
Kilik Kuo
ba14257c35 Bug 1429284 - Expose compositor dropped frame count to HTMLMediaElement's debug info. r=jwwang
MozReview-Commit-ID: GYtHxdsGSk1
2018-01-10 12:07:47 +08:00
Emilio Cobos Álvarez
8a71d3197b Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-25 17:50:10 +01:00
Emilio Cobos Álvarez
ecd202d763 Backout changeset e43f568b3e9a (bug 1423990) because some OSX-only code still doesn't build. r=me 2017-12-25 12:55:45 +01:00
Emilio Cobos Álvarez
b3956b6171 Bug 1423990: Move the last few attribute-related methods outside of nsIContent. r=bz
MozReview-Commit-ID: 8JZuS6O8f8W
2017-12-07 19:13:50 +01:00
Gerald Squelart
39c2b02fa1 Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0
2017-10-10 17:55:27 +11:00
Gerald Squelart
b25c781d32 Bug 1407810 - Implement HTMLMediaElement::Moz{Enable,Request}DebugLog - r=jwwang
MozReview-Commit-ID: 7Hhy6qBVjDk
2017-10-16 16:18:58 +11:00
JW Wang
f96c236ca3 Bug 1422677. P2 - remove the side effect of MediaDecoder::CanPlayThrough(). r=bechen,gerald
We calculate 'canplaythrough' in ChannelMediaDecoder::DownloadProgressed() and
send updates to MDSM.

MozReview-Commit-ID: KAeDciPAUKs
2017-12-01 14:34:58 +08:00
Andreas Pehrson
cd521a3dbc Bug 1419363 - Switch to WeakPtr. r=jib 2017-12-01 10:52:18 -05:00
Alastor Wu
ddc69c4c1a Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH
2017-11-30 10:50:21 +08:00
Alastor Wu
f1a57c71e0 Bug 1420488 - part1 : bless media if media has started playing before. r=jwwang
If the media has started playing before, bless it and it would always be allowed
to autoplay.

MozReview-Commit-ID: 4GqMARLXULU
2017-11-29 18:59:56 +08:00
Sebastian Hengst
5c93ed8143 Backed out 2 changesets (bug 1420488) for eslint failures in toolkit/content/tests/browser/browser_autoplay_policy_play_twice.js. r=backout
Backed out changeset 92bd0fcb67d5 (bug 1420488)
Backed out changeset 0f211029517c (bug 1420488)
2017-11-29 17:31:28 +02:00
Alastor Wu
92ac80ff76 Bug 1420488 - part1 : bless media if media has started playing before. r=jwwang
If the media has started playing before, bless it and it would always be allowed
to autoplay.

MozReview-Commit-ID: 28X4TmG25aJ
2017-11-29 18:05:56 +08:00
Kilik Kuo
9af080a497 Bug 1419897 - Crash in mozilla::dom::HTMLMediaElement::RemoveMediaKeys. r=jwwang
The process of |TryRemoveMediaKeysAssociation()| is a 2-step async procedue in mainthread.
mMediaKeys might be set to null inside |NotifyOwnerDocumentActivityChanged()| in between
|TryRemoveMediaKeysAssociation| and |RemoveMediaKeys|.

MozReview-Commit-ID: HtiADt3UTvp
2017-11-28 23:06:34 +08:00
Sebastian Hengst
a3d3aaf9d3 Backed out 3 changesets (bug 1415478) for frequently asserting in own test test_autoplay_policy.html at MediaDecoderStateMachine.cpp:989. r=backout
Backed out changeset 6ba103fe1caf (bug 1415478)
Backed out changeset df6721a3584f (bug 1415478)
Backed out changeset 8a802839959b (bug 1415478)
2017-11-27 19:57:34 +02:00
Alastor Wu
79671d4fb8 Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH
2017-11-27 19:20:15 +08:00
Alastor Wu
de0fd34b42 Bug 1420192 - when disable autoplay, allow script calls play() once user triggered load() or seek(). r=jwwang
This patch is mainly reverting the changing of bug1382574 part3, but not all the same.

Since youtube would call load() when user clicks to play, and then call play()
later. For the old pref (checking user-input-play), we should still allow the
following play() even it's not triggered via user input. It's also same for
seeking, Youtube would call play() after seeking completed.

In this patch, we would allow the script-calling once play() if user has called load()
or seek() before that.

MozReview-Commit-ID: 1UcxRCVfhnR
2017-11-27 10:55:02 +08:00
dluca
ee725b2035 Backed out 3 changesets (bug 1415478) for frequently asserting at dom/media/MediaDecoderStateMachine.cpp:1009 on a CLOSED TREE
Backed out changeset 447d895b350d (bug 1415478)
Backed out changeset d855c032c823 (bug 1415478)
Backed out changeset 6739012c4bdf (bug 1415478)
2017-11-24 18:50:53 +02:00
Alastor Wu
eb061944a9 Bug 1415478 - part2 : allow autoplay for non-audible media content and video without audio content. r=jwwang
Per UX spec, we would allow non-audible media (volume 0, muted, video without audio track)
to autoplay.

MozReview-Commit-ID: HKUyt5Jt4sH
2017-11-24 11:14:26 +08:00
Kris Maglione
48e53b3df5 Bug 1415352: Part 1a - Pass subject principal through to ParseAttribute. r=bz
This is necessary in order to parse style attributes using the subject
principal of the caller, rather than defaulting to the page principal.

MozReview-Commit-ID: GIshajQ28la
2017-11-01 20:35:52 -07:00
JW Wang
963ded77a8 Bug 1417869. P2 - abort the load algorithm early if media not allowed to load. r=jya
MozReview-Commit-ID: DUxyo4ywCPW
2017-11-21 14:02:13 +08:00
Alastor Wu
7baabd66f1 Bug 1382574 - part3 : remove HTMLMediaElement::mHasUserInteraction. r=jwwang
We won't need to check the whether the media element is interacted with user for
autoplay anymore.

MozReview-Commit-ID: 2tll9LtGyVR
2017-11-22 00:33:23 +08:00
Alastor Wu
02838507d1 Bug 1382574 - part1 : create new class AutoplayPolicy to handle autoplay logic. r=jwwang
AutoplayPolicy is used to manage autoplay logic for all kinds of media,
including MediaElement, Web Audio and Web Speech.

MozReview-Commit-ID: R1TxMkarIw
2017-11-22 00:33:16 +08:00
Andreas Pehrson
f8e3023623 Bug 1208378 - Distinguish track sinks on whether their presence allows a source to stop. r=jib
There are currently two types of sinks for a MediaStreamTrackSource.
Actual MediaStreamTracks and HTMLMediaElement::StreamCaptureTrackSource.
A source needs actual tracks as sinks to not stop() the underlying source.

A StreamCaptureTrackSource, however, should not count toward keeping a source
alive (otherwise HTMLMediaElement.mozCaptureStream() would prevent track.stop()
from working on the track feeding the media element).

MozReview-Commit-ID: 9MBAyZFZUIQ
2017-11-10 15:08:02 +01:00