Closed
Bug 1284548
Opened 8 years ago
Closed 6 years ago
Audio file provides Share Video option
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(firefox50 wontfix, firefox58 wontfix, firefox59 wontfix, firefox60 verified)
RESOLVED
FIXED
Firefox 60
People
(Reporter: mkaply, Assigned: Kwan)
Details
Attachments
(2 files)
If you go to: http://spe.mobilephone.net/wit/objects/ylwsub_9s_32kbps_mn.mp3 In Fennec and do a long hold, you'll be presented with a "Share Video" option at the top. I believe this should be "Share Audio" The save option correctly says "Save Audio"
Reporter | ||
Comment 1•8 years ago
|
||
Our generic sharing item is video: https://dxr.mozilla.org/mozilla-central/source/mobile/android/locales/en-US/chrome/browser.properties#274 While our saving items are audio/video: https://dxr.mozilla.org/mozilla-central/source/mobile/android/locales/en-US/chrome/browser.properties#278
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•7 years ago
|
||
This bugged me, so thanks for saving me creating a bug mkaply! The reason this happens is two fold: 1) Firefox uses a <video> when loading bare media files, regardless of the type of file. 2) The Save context item varies its label based on what is known about the file in the media tag: if nothing is known because it's not loaded it uses "Media", if the file's videoWidth and Height are 0 it uses "Audio", and uses "Video" otherwise. The Share item has none of this logic. (interestingly, files in an <audio> get no Share action at all, fodder for another bug perhaps) I have a patch that duplicates this logic so that the Share label is customised the same way, and another patch that de-dupes this logic into a helper function, since with my Share patch it's used three separate times. The reviewer may wish me to re-order the patches so the de-duping one comes first, which I'm more than happy to do. I also don't currently change the generic mime type from video/* to audio/*, which might be worth doing. (In my first de-dupe patch the function took the strings to return in an object, but I decided that was too verbose, so return hardcoded ones now, with the only downside being needing to sync the string ID suffixes) snorp, would you be willing to give some feedback on this/re-direct to someone who can please?
Flags: needinfo?(snorp)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → moz-ian
Status: NEW → ASSIGNED
Comment 5•6 years ago
|
||
mozreview-review |
Comment on attachment 8934266 [details] Bug 1284548 - Use 'Share Audio' label for sharing audio played in <video>. ? https://reviewboard.mozilla.org/r/205182/#review219716
Attachment #8934266 -
Flags: review+
Comment 6•6 years ago
|
||
mozreview-review |
Comment on attachment 8934267 [details] Bug 1284548 - Put logic classifying <video> element based on content in a function and reuse it. ? https://reviewboard.mozilla.org/r/205184/#review219718 Looks good with one nit ::: mobile/android/locales/en-US/chrome/browser.properties:318 (Diff revision 1) > # is working while "Paste" / "Add as search engine" triggers the bug. See bug 1262098 for more details. > # Manual testing the scenario described in bug 1262098 is highly recommended. > contextmenu.addSearchEngine3=Add Search Engine > contextmenu.playMedia=Play > contextmenu.pauseMedia=Pause > -contextmenu.shareMedia2=Share Media > +contextmenu.shareMedia1=Share Media This probably needs to be contextmenu.shareMedia3, since the current name indicates there was already a contextmenu.shareMedia1.
Attachment #8934267 -
Flags: review+
Sorry this took so long, Ian! I didnn't realize this was a review.
Flags: needinfo?(snorp)
Assignee | ||
Comment 8•6 years ago
|
||
mozreview-review |
Comment on attachment 8934267 [details] Bug 1284548 - Put logic classifying <video> element based on content in a function and reuse it. ? https://reviewboard.mozilla.org/r/205184/#review219804 (In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #7) > Sorry this took so long, Ian! I didnn't realize this was a review. No problem! Not exactly urgent, and I thought it was probably more at the feedback stage anyway. ::: mobile/android/chrome/content/browser.js:811 (Diff revision 1) > let url = (aElement.currentSrc || aElement.src); > let title = aElement.textContent || aElement.title; > return { > title: title, > uri: url, > type: "video/*", What do you think about making this "audio/*" when need be as well? ::: mobile/android/locales/en-US/chrome/browser.properties:318 (Diff revision 1) > # is working while "Paste" / "Add as search engine" triggers the bug. See bug 1262098 for more details. > # Manual testing the scenario described in bug 1262098 is highly recommended. > contextmenu.addSearchEngine3=Add Search Engine > contextmenu.playMedia=Play > contextmenu.pauseMedia=Pause > -contextmenu.shareMedia2=Share Media > +contextmenu.shareMedia1=Share Media I'll fix this by just making the other two end with "2" as well. I don't think 1 endings are ever used anyway.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 11•6 years ago
|
||
Comment on attachment 8934266 [details] Bug 1284548 - Use 'Share Audio' label for sharing audio played in <video>. ? Hey James, I fixed the string numbering issues (mainly by reordering the patches), and also fixed a small pre-existing typo in a moved comment I hadn't noticed before. Just need you to check the MIME change please: https://reviewboard.mozilla.org/r/205180/diff/1-2/ (not 100% sure why the r+s got cleared from bugzilla, but reviewboard still has them, so you don't actually need to do change anything)
Attachment #8934266 -
Flags: review?(snorp)
Comment 12•6 years ago
|
||
mozreview-review |
Comment on attachment 8934267 [details] Bug 1284548 - Put logic classifying <video> element based on content in a function and reuse it. ? https://reviewboard.mozilla.org/r/205180/#review220334 lgtm
Attachment #8934266 -
Flags: review?(snorp) → review+
Assignee | ||
Comment 13•6 years ago
|
||
Try (sorry about the unnecessary reftests): https://treeherder.mozilla.org/#/jobs?repo=try&revision=c63c068aef9d463c9b9b390bbcf1b7d3090fa44f&filter-resultStatus=success&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=running&filter-resultStatus=pending&filter-resultStatus=runnable (I know bugzilla doesn't think one patch has review, but reviewboard knows it does, so autoland should be fine)
Keywords: checkin-needed
Comment 14•6 years ago
|
||
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/0c4dfacc6645 Put logic classifying <video> element based on content in a function and reuse it. r=snorp? https://hg.mozilla.org/integration/autoland/rev/de83b569b39f Use 'Share Audio' label for sharing audio played in <video>. r=snorp?
Keywords: checkin-needed
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0c4dfacc6645 https://hg.mozilla.org/mozilla-central/rev/de83b569b39f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Comment 16•6 years ago
|
||
Verified as fixed on Nightly 60.0a1 (2018-02-08). Device:Huawei Honor 5X (Android 5.1.1)
status-firefox58:
--- → affected
status-firefox59:
--- → affected
Updated•6 years ago
|
Updated•6 years ago
|
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•