Closed
Bug 1127416
Opened 11 years ago
Closed 11 years ago
Fire an observer service notification when metadata loads for an EME media element
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
People
(Reporter: Gijs, Assigned: Gijs)
References
Details
Attachments
(1 file, 1 obsolete file)
5.19 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Flags: qe-verify-
Flags: in-testsuite?
Flags: firefox-backlog+
Updated•11 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•11 years ago
|
||
So after a bit of poking about I wrote this test... but it fails. The video that gets passed as the subject is not the same as |v|. However, that *is* the case for the loadedmetadata event itself, which also passes |this| (static_casted to nsIContent*). I... don't really understand how that is possible, unless there's basically an encrypted and an unencrypted video element going around that somehow point to each other or something? I did notice that |v|'s currentSrc pointed to the .sjs? version of the video being played, with the one passed as |subject| pointing to what I'm assuming is the resolved/redirected/actual mp4 file.
Finally, note that this isn't actually important for desktop's usecase here, we just need the owner document of the video to make sense so we can find the right tab and whatnot... but it's still odd.
Attachment #8557079 -
Flags: feedback?(cpearce)
Comment 2•11 years ago
|
||
It sounds like the UI string we're converging on in bug 1095734 will want to be able to refer to the specific CDM being used by name. Is that simple enough to do here, or should that be extended in a followup? (I assume the latter, since the infra from bug 1089867 hasn't landed yet.)
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Justin Dolske [:Dolske] from comment #2)
> It sounds like the UI string we're converging on in bug 1095734 will want to
> be able to refer to the specific CDM being used by name. Is that simple
> enough to do here, or should that be extended in a followup? (I assume the
> latter, since the infra from bug 1089867 hasn't landed yet.)
It depends; right now I still need to figure out why the right video element isn't being passed, but once I have that sorted, it'd be ready. If 1089867 lands in the meantime, I assume it wouldn't be hard to set up the CDM name as the last parameter of the observer notification.
Assignee | ||
Comment 4•11 years ago
|
||
(equally, if the element exposes this info in some way then the browser code could also deduce it from the video element itself)
Comment 5•11 years ago
|
||
Comment on attachment 8557079 [details] [diff] [review]
add observer service notification for EME video,
Review of attachment 8557079 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/media/test/test_eme_obs_notification.html
@@ +20,5 @@
> + var notifier = function(subject) {
> + is(subject, v, "Should get passed the video object in question");
> + gotNotified = subject;
> + };
> + SpecialPowers.Services.obs.addObserver(notifier, "media-eme-metadataloaded", false);
One of the main things that MediaTestManager does is it runs multiple tests in parallel. Two currently. So you'll have two observers here with references to video elements baked in. So since we'll run two test cases concurrently here, you'll get these observers firing pretty close to each other, and that would be why you're seeing the "wrong" video element in the observer.
Your observer needs to operate on static data, or at least test that it only responds to notifications for the video element it belongs to.
Attachment #8557079 -
Flags: feedback?(cpearce)
Assignee | ||
Comment 6•11 years ago
|
||
Ah, thanks, that helped. This passes, then. :-)
Attachment #8557613 -
Flags: review?(cpearce)
Assignee | ||
Updated•11 years ago
|
Attachment #8557079 -
Attachment is obsolete: true
Comment 7•11 years ago
|
||
Comment on attachment 8557613 [details] [diff] [review]
add observer service notification for EME video,
Review of attachment 8557613 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good!
Attachment #8557613 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 8•11 years ago
|
||
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #8)
> remote:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=c1adce33c6da
This is failing on try:
https://treeherder.mozilla.org/logviewer.html#?job_id=4618760&repo=try
I expect this is because I got rid of the waitForExplicitFinish because I noticed that the media manager requests the same... I now suspect that I still need it even in the test files (it is also in the other EME tests; I'd just thought that was an oversight).
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=2eabfbe18cfc
(the bc3 failures in the previous push are because of my tree not having the test fix I pushed shortly after I pushed the fix for bug 1125378 - I've repushed against tip now)
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #9)
> remote:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=2eabfbe18cfc
Green!
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/d46487a3cd1d
Assignee | ||
Updated•11 years ago
|
Flags: in-testsuite? → in-testsuite+
Comment 11•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Comment 12•10 years ago
|
||
I'm going to say that since we're not using this, we don't need to uplift it for the EME 37 uplift (and I will ignore the change to the test added in this bug when I uplift the patch in bug 1131392).
status-firefox37:
--- → wontfix
You need to log in
before you can comment on or make changes to this bug.
Description
•