Closed
Bug 1094310
Opened 10 years ago
Closed 10 years ago
"View Video" context menu doesn't work with mediasource
Categories
(Toolkit :: Video/Audio Controls, defect)
Toolkit
Video/Audio Controls
Tracking
()
People
(Reporter: MattN, Assigned: kinetik)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
2.93 KB,
patch
|
Details | Diff | Splinter Review |
STR:
1) Load https://www.youtube.com/watch?v=V8SjkDq2ZwI
2) Hold Shift and right-click on the video to see the Firefox context menu
3) Choose "View Video"
Expected result:
* The video opens in a new tab.
* If this isn't technically possible, then the menu item should be disabled
Actual result:
* Nothing happens
Also note that "Copy Video Location" also isn't helpful for the user AFAICT (I'm not familiar with media source extensions) as it gives a URI like:
mediasource:https://www.youtube.com/a1a13094-a089-944a-b867-e7953f0425a6
which I don't think can be navigated to.
Flags: firefox-backlog?
Assignee | ||
Comment 1•10 years ago
|
||
(In reply to Matthew N. [:MattN] (focused on Loop) from comment #0)
> * The video opens in a new tab.
> * If this isn't technically possible, then the menu item should be disabled
I don't think it is, because the data feeding media playback is controlled by third-party script in the document.
> Also note that "Copy Video Location" also isn't helpful for the user AFAICT
> (I'm not familiar with media source extensions) as it gives a URI like:
> mediasource:https://www.youtube.com/a1a13094-a089-944a-b867-e7953f0425a6
> which I don't think can be navigated to.
You're right, that's an internal UUID and isn't reusable.
Assignee | ||
Comment 2•10 years ago
|
||
Don't set this.mediaURL for media with an internal "mediasource:" URL, since they can't be reused. This effectively disables "view video", "copy video location", etc.
Attachment #8517883 -
Flags: review?(gavin.sharp)
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8517883 [details] [diff] [review]
p1: disable context menu items for URLs for MSE media
Review of attachment 8517883 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/base/content/nsContextMenu.js
@@ +627,5 @@
> else if (this.target instanceof HTMLCanvasElement) {
> this.onCanvas = true;
> }
> else if (this.target instanceof HTMLVideoElement) {
> + var mediaURL = this.target.currentSrc || this.target.src;
I think you should use |let| instead of |var| to avoid a possible warning about re-declaring the |mediaURL| variable.
@@ +643,5 @@
> }
> }
> else if (this.target instanceof HTMLAudioElement) {
> this.onAudio = true;
> + var mediaURL = this.target.currentSrc || this.target.src;
ditto
@@ +1511,5 @@
> return !this.focusedWindow.getSelection().isCollapsed;
> },
>
> + isMediaURLReusable: function(aURL) {
> + return !/^mediasource:/.test(aURL);
I'm guessing we have the same problem with blob URIs too, right?
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Matthew N. [:MattN] (focused on Loop) from comment #3)
> I think you should use |let| instead of |var| to avoid a possible warning
> about re-declaring the |mediaURL| variable.
Right, thanks!
> I'm guessing we have the same problem with blob URIs too, right?
That seems likely, yeah.
Comment 5•10 years ago
|
||
Comment on attachment 8517883 [details] [diff] [review]
p1: disable context menu items for URLs for MSE media
What Matt said, but also it would be ideal if there was an API on VideoElement (or some ancestor) for determining "has shareable URL" that didn't involve the frontend doing regexp comparisons on string attributes. Is that doable?
Updated•10 years ago
|
Flags: needinfo?(kinetik)
Assignee | ||
Comment 6•10 years ago
|
||
Something like that seems possible (and preferable, I agree), but unfortunately I don't have time to work on it right now.
Flags: needinfo?(kinetik)
Updated•10 years ago
|
Flags: firefox-backlog? → firefox-backlog+
Comment 7•10 years ago
|
||
Comment on attachment 8517883 [details] [diff] [review]
p1: disable context menu items for URLs for MSE media
It will be confusing for the user that some videos have this functionality while others don't. Not sure there's an easy way to address that, though.
Please adjust the patch per Matt's suggestions, r=me with that.
Attachment #8517883 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 8•10 years ago
|
||
Address review comments.
Assignee | ||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Updated•10 years ago
|
Iteration: --- → 36.3
Flags: qe-verify?
Updated•10 years ago
|
Flags: qe-verify? → qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•