Commit graph

1408 commits

Author SHA1 Message Date
Bryce Seager van Dyk
cfec4e7dfa Bug 1724106 - Clarify threading usage when getting media debug info. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D124104
2021-09-01 22:29:48 +00:00
alwu
01fee60b95 Bug 1723799 - part2 : add test. r=padenot,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D121681
2021-08-09 19:30:12 +00:00
Kagami Sascha Rosylight
c69d367ce0 Bug 1723050 - Part 14: Replace typedef by using in dom/html/ r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121312
2021-08-09 13:37:27 +00:00
Karl Tomlinson
50445cc8e2 Bug 1577199 apply speaker-selection feature policy r=jib
Differential Revision: https://phabricator.services.mozilla.com/D119867
2021-08-02 00:13:57 +00:00
Tooru Fujisawa
cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Karl Tomlinson
ebbb65d72e Bug 1493982 accept only sinkIds exposed via enumerateDevices() r=jib
and reject with NotFoundError otherwise.

Depends on D118444

Differential Revision: https://phabricator.services.mozilla.com/D118445
2021-07-06 23:37:33 +00:00
Karl Tomlinson
832509f1a5 Bug 1493982 move GetSinkDevice() to MediaDevices for access to device exposure history r=jib
Depends on D118443

Differential Revision: https://phabricator.services.mozilla.com/D118444
2021-07-06 23:37:32 +00:00
Paul Adenot
78824dbdc4 Bug 1703603 - Handle HTMLMediaElement playing MediaSource when using mozCaptureStreamUntilEnded. r=bryce
This means keeping a reference to the MediaSource object in the MediaStream to
ensure it's being kept alive for the duration of the playback.

Differential Revision: https://phabricator.services.mozilla.com/D112607
2021-06-02 14:20:40 +00:00
Olli Pettay
b01c8b4aff Bug 1705080, make MediaStreams behave as normal EventTargets, r=jib
Differential Revision: https://phabricator.services.mozilla.com/D115269
2021-05-18 16:21:27 +00:00
Csoregi Natalia
d1bbd6e368 Backed out 2 changesets (bug 1693250) for failures on test_recreate_media_sink_audible_change.html. CLOSED TREE
Backed out changeset 0e0f90271853 (bug 1693250)
Backed out changeset 45cd86944c9f (bug 1693250)
2021-05-06 01:14:51 +03:00
alwu
429bd59056 Bug 1693250 - part2 : reset the audible state when the audio sink get shutdown. r=bryce
When the audio sink shutdown, we should also reset the audible state for the listeners. Otherwise, MediaDecoderStateMachine would possibly rely on the incorrect audible state that is produced by previous sink, which would cause showing the sound indicator even if no sound is being playing.

Eg.
Considering following case without the reset of the audible state
1. Sink A is audible -> MDSM set `mIsAudioDataAudible=true`
2. Stop sink
3. Recreate sink B and it's playing silence -> MDSM's `mIsAudioDataAudible=true` is still true, this is wrong!

Differential Revision: https://phabricator.services.mozilla.com/D113550
2021-05-05 20:07:07 +00:00
alwu
ebd128cde0 Bug 1689741 - not controlling the real-time media via the media control. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D112668
2021-04-20 16:47:41 +00:00
Brendan Early
11d4046786 Bug 1120222 - Set AudioSink name to title of MediaElement's parent r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D93462
2021-04-19 15:17:26 +00:00
Peter Van der Beken
164f59d833 Bug 1696158 - Move CanSavePresentation to the parent process. Keep track of various flags for deciding whether to put a page in BFCache. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110231
2021-04-19 14:50:54 +00:00
smolnar
84a0543987 Backed out 8 changesets (bug 1696158) for causing multiple failures. CLOSED TREE
Backed out changeset 09c598c8fd29 (bug 1696158)
Backed out changeset 02f956c26901 (bug 1696158)
Backed out changeset b61a3a324cce (bug 1696158)
Backed out changeset 95810ed7f1e5 (bug 1696158)
Backed out changeset 4f93a7b61496 (bug 1696158)
Backed out changeset c80c55b56f2a (bug 1696158)
Backed out changeset 11627c409882 (bug 1696158)
Backed out changeset b98b4316a510 (bug 1696158)
2021-04-19 17:04:08 +03:00
Peter Van der Beken
a1306f8324 Bug 1696158 - Move CanSavePresentation to the parent process. Keep track of various flags for deciding whether to put a page in BFCache. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110231
2021-04-19 12:39:19 +00:00
Paul Adenot
8d2ea44b0e Bug 1701276 - Adjust currentSrc behaviour to match the spec more closely. r=bryce
Firefox and Chrome support setting `src` with an `ObjectURL`. This is
technically a URL and should be treated as such. Firefox recently changed to
return `""` when a `MediaSource` is playing, and this is wrong, because even
though it's playing a from a "Media Provider Object", it got loaded from the
`src` attribute, so should have a non-null `currentSrc`, which should be the
blob url (`blob:origin/<an uuid>`). In this case, `currentSrc` is a string that
is opaque and doesn't allow introspection but refers to the "real" `MediaSource`
or `Blob`.

If the same `MediaSource` is loaded via the `srcObject` attribute (that Firefox
and Chrome don't support), then `currentSrc` should return `""` and `srcObject`
still has the object set to it to understand what the HTMLMediaElement is
playing. We'll implement and test this later.

Differential Revision: https://phabricator.services.mozilla.com/D110290
2021-04-01 12:28:50 +00:00
Csoregi Natalia
e99de2637f Backed out changeset fe753b00f953 (bug 1701276) for wpt fails on resource-selection-currentSrc.html. CLOSED TREE 2021-03-31 21:00:20 +03:00
Paul Adenot
3a84032713 Bug 1701276 - Adjust currentSrc behaviour to match the spec more closely. r=bryce
Firefox and Chrome support setting `src` with an `ObjectURL`. This is
technically a URL and should be treated as such. Firefox recently changed to
return `""` when a `MediaSource` is playing, and this is wrong, because even
though it's playing a from a "Media Provider Object", it got loaded from the
`src` attribute, so should have a non-null `currentSrc`, which should be the
blob url (`blob:origin/<an uuid>`). In this case, `currentSrc` is a string that
is opaque and doesn't allow introspection but refers to the "real" `MediaSource`
or `Blob`.

If the same `MediaSource` is loaded via the `srcObject` attribute (that Firefox
and Chrome don't support), then `currentSrc` should return `""` and `srcObject`
still has the object set to it to understand what the HTMLMediaElement is
playing. We'll implement and test this later.

Differential Revision: https://phabricator.services.mozilla.com/D110290
2021-03-31 12:28:39 +00:00
Eden Chuang
c7aa9a7c9c Bug 1696111 - Make LoadInfo know if the request is triggered from a media element and if it's an initial request. r=necko-reviewers,alwu,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106890
2021-03-30 00:52:31 +00:00
Butkovits Atila
ad9b1ed9d7 Backed out 12 changesets (bug 1683131, bug 1696111, bug 1695987) for causing crashes(Bug 1701151). a=backout
Backed out changeset 8ffef57e27d2 (bug 1683131)
Backed out changeset c02d5dc72abb (bug 1695987)
Backed out changeset 276f016ddc67 (bug 1683131)
Backed out changeset 2c7a45e20b50 (bug 1683131)
Backed out changeset 11fdb503d537 (bug 1696111)
Backed out changeset 2946eff1e9c8 (bug 1696111)
Backed out changeset e4d01b88e517 (bug 1696111)
Backed out changeset fab7f4cd445d (bug 1696111)
Backed out changeset d60c38f8939a (bug 1696111)
Backed out changeset 3fdc8089a46f (bug 1696111)
Backed out changeset 51a16dfabc98 (bug 1696111)
Backed out changeset 642bdd52fd57 (bug 1696111)
2021-03-26 11:30:28 +02:00
Eden Chuang
908b174731 Bug 1696111 - Make LoadInfo know if the request is triggered from a media element and if it's an initial request. r=necko-reviewers,alwu,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106890
2021-03-25 12:09:40 +00:00
Simon Giesecke
cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke
613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke
b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Simon Giesecke
cb6c8aead4 Bug 1695162 - Make nsTHashtable::ConstIter return a real ConstIterator. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D107038
2021-03-09 10:28:16 +00:00
Sylvestre Ledru
4edd85cc9b Bug 1519636 - Reformat recent changes to the Google coding style r=necko-reviewers,valentin
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D106920
2021-03-02 16:14:46 +00:00
Simon Giesecke
2586ff14b9 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in dom/html. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D106112
2021-03-01 09:59:29 +00:00
Simon Giesecke
9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
alwu
02a5936205 Bug 1691578 - part7 : add test case for audio sink failed start-up. r=bryce,emilio
Differential Revision: https://phabricator.services.mozilla.com/D104571
2021-02-25 18:07:07 +00:00
alwu
23f1c32275 Bug 1691578 - part6 : add test cases to test reporting decode error. r=bryce,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D104570
2021-02-25 18:07:06 +00:00
alwu
ee8e5fb47f Bug 1691578 - part5 : add test cases to test the ability of reporting error for not supported media type. r=bryce,emilio
Add test cases for `DecoderDoctorDiagnostics::StoreFormatDiagnostics()`, which is used when checking the ability of whether the decoder is supported for certain type.

Differential Revision: https://phabricator.services.mozilla.com/D104475
2021-02-25 18:07:06 +00:00
Cosmin Sabou
424d49d43e Backed out 8 changesets (bug 1691578) for bc failures on browser_decoderDoctor.js. CLOSED TREE
Backed out changeset c535dd429ada (bug 1691578)
Backed out changeset 518eadda7826 (bug 1691578)
Backed out changeset c181e29b13f2 (bug 1691578)
Backed out changeset 23f6dcc3ceb5 (bug 1691578)
Backed out changeset bfd3e4878545 (bug 1691578)
Backed out changeset 214ab3a2f00b (bug 1691578)
Backed out changeset 71a17ff3322c (bug 1691578)
Backed out changeset 6aa662e8d06e (bug 1691578)
2021-02-25 21:08:07 +02:00
alwu
3b9b787bdf Bug 1691578 - part7 : add test case for audio sink failed start-up. r=bryce,emilio
Differential Revision: https://phabricator.services.mozilla.com/D104571
2021-02-25 18:07:07 +00:00
alwu
5c51ce0bba Bug 1691578 - part6 : add test cases to test reporting decode error. r=bryce,webidl,emilio
Differential Revision: https://phabricator.services.mozilla.com/D104570
2021-02-25 18:07:06 +00:00
alwu
edf054e11a Bug 1691578 - part5 : add test cases to test the ability of reporting error for not supported media type. r=bryce,emilio
Add test cases for `DecoderDoctorDiagnostics::StoreFormatDiagnostics()`, which is used when checking the ability of whether the decoder is supported for certain type.

Differential Revision: https://phabricator.services.mozilla.com/D104475
2021-02-25 18:07:06 +00:00
Paul Adenot
5852688096 Bug 1686914 - Don't reset currentSrc when aborting a load in HTMLMediaElement, and reset it when it should be reset. r=bryce
Roughly:
- Don't reset on load
- Don't reset on URL parsing error
- Reset when playing a MediaStream, a MediaSource
- Otherwise follow the resource selection algorithm, and set it to what has been selected

Differential Revision: https://phabricator.services.mozilla.com/D101937
2021-02-16 12:39:34 +00:00
alwu
b248bcd4ac Bug 1686696 - part5 : remove nsSyncSection. r=bryce
`nsSyncSection` is not related with media event, so that's not proper ot put it in `MediaElementEventRunners.h`.

In addition, that can simply be implemented by `NS_NewRunnableFunction` so we don't need `nsSyncSection` anymore.

Differential Revision: https://phabricator.services.mozilla.com/D104115
2021-02-11 20:19:25 +00:00
alwu
30709122e3 Bug 1686696 - part3 : enforce to only dispatch periodic timeupdate once within 250ms. r=bryce
Inplemented an event runner for `timeupdate` only, which would ensure that for periodic `timeupdate` it should be only dispatched once within 250ms.

Differential Revision: https://phabricator.services.mozilla.com/D102675
2021-02-11 20:19:24 +00:00
alwu
777cb1ae03 Bug 1686696 - part2 : rework how does decoder handle owner's events when the logical position changes. r=bryce
Decoder needs to handle owner's events differently based on different situations, this patch makes the process clearer.

Differential Revision: https://phabricator.services.mozilla.com/D102674
2021-02-11 20:19:24 +00:00
alwu
976a59a484 Bug 1686696 - part1 : store pending event runner instead of saving event name. r=bryce,mccr8
In this patch, we move all event runners to a separate file and implement an event blocker.

In order to allow us to do a special check for `timeupdate` event, we have to know that event is periodic or mandatory.

We have to save extra information for `timeupdate, however, current design for storing pending events is not flexible enough to achieve that.

Therefore, instead of storing the event name, we store the event runners which can all have different implementation and know when they should dispatch their own event.

Differential Revision: https://phabricator.services.mozilla.com/D102673
2021-02-11 20:19:23 +00:00
Bogdan Tara
36a86026a3 Backed out 6 changesets (bug 1686696) for 1587248.html crashtest failures CLOSED TREE
Backed out changeset 690c6a094f8a (bug 1686696)
Backed out changeset 7f9d487945c3 (bug 1686696)
Backed out changeset 40358a758624 (bug 1686696)
Backed out changeset 36c696166033 (bug 1686696)
Backed out changeset ab149e8fc0d5 (bug 1686696)
Backed out changeset 8fce79f9bd65 (bug 1686696)
2021-02-11 06:29:47 +02:00
alwu
40fdde1bab Bug 1686696 - part5 : remove nsSyncSection. r=bryce
`nsSyncSection` is not related with media event, so that's not proper ot put it in `MediaElementEventRunners.h`.

In addition, that can simply be implemented by `NS_NewRunnableFunction` so we don't need `nsSyncSection` anymore.

Differential Revision: https://phabricator.services.mozilla.com/D104115
2021-02-11 03:45:30 +00:00
alwu
cc585407a3 Bug 1686696 - part3 : enforce to only dispatch periodic timeupdate once within 250ms. r=bryce
Inplemented an event runner for `timeupdate` only, which would ensure that for periodic `timeupdate` it should be only dispatched once within 250ms.

Differential Revision: https://phabricator.services.mozilla.com/D102675
2021-02-11 03:45:30 +00:00
alwu
0a8bd1bae4 Bug 1686696 - part2 : rework how does decoder handle owner's events when the logical position changes. r=bryce
Decoder needs to handle owner's events differently based on different situations, this patch makes the process clearer.

Differential Revision: https://phabricator.services.mozilla.com/D102674
2021-02-11 03:45:29 +00:00
alwu
e3e82a282d Bug 1686696 - part1 : store pending event runner instead of saving event name. r=bryce,mccr8
In this patch, we move all event runners to a separate file and implement an event blocker.

In order to allow us to do a special check for `timeupdate` event, we have to know that event is periodic or mandatory.

We have to save extra information for `timeupdate, however, current design for storing pending events is not flexible enough to achieve that.

Therefore, instead of storing the event name, we store the event runners which can all have different implementation and know when they should dispatch their own event.

Differential Revision: https://phabricator.services.mozilla.com/D102673
2021-02-11 03:45:28 +00:00
alwu
8efed25b78 Bug 1690416 - remove HTMLMediaElement::ReportCanPlayTelemetry(). r=bryce,Gijs,webidl,mccr8
The actual telemetry probes has been removed by this, so this function is no longer reporting any result and we can remove it.

[1] https://phabricator.services.mozilla.com/D37313

Differential Revision: https://phabricator.services.mozilla.com/D103846
2021-02-09 18:27:33 +00:00
Andreas Pehrson
286c8199bf Bug 1690976 - Don't reveal error details for CORS-cross-origin decoding errors. r=sstreich,bryce
Differential Revision: https://phabricator.services.mozilla.com/D104169
2021-02-08 11:43:36 +00:00
Bogdan Tara
647a1a6efc Backed out 2 changesets (bug 1690976) for ES lint failure in test_decode_error_crossorigin.html CLOSED TREE
Backed out changeset ed0ab9078607 (bug 1690976)
Backed out changeset c6c868eaf915 (bug 1690976)
2021-02-08 13:34:59 +02:00
Andreas Pehrson
79eac50473 Bug 1690976 - Don't reveal error details for CORS-cross-origin decoding errors. r=sstreich,bryce
Differential Revision: https://phabricator.services.mozilla.com/D104169
2021-02-08 10:01:07 +00:00