Closed Bug 924609 Opened 11 years ago Closed 8 years ago

[B2G][SMS] Video thumbnails previews are not showing in MMS when attaching a video or receiving a video

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog, b2g18 affected, b2g-v1.2 affected)

RESOLVED WONTFIX
tracking-b2g backlog
Tracking Status
b2g18 --- affected
b2g-v1.2 --- affected

People

(Reporter: KTucker, Unassigned, Mentored)

References

Details

(Keywords: feature, Whiteboard: burirun2, [lang=js])

Attachments

(1 file)

Attached image Video thumbnail preview screenshot (deleted) —
Description:
Video thumbnails previews are not showing in MMS when attaching a video or receiving a video. A generic video thumbnail is shown.

Repro Steps:
1)  Updated Buri to Build ID: 20131008004009
2)  Tap on the "Messaging" icon.
3)  Tap on the "Compose New Message" icon.
4)  Tap on the "Paperclip" and attach a video to the message.

Actual:
The thumbnail is a generic video icon and instead of a preview thumbnail like a picture.

Expected:
The thumbnail should show a screenshot preview of the video. 

Environmental Variables
Device: Buri v 1.1.0 Mozilla RIL
Build ID: 20131008004009
Gecko: http://hg.mozilla.org/releases/mozilla-aurora/rev/decf58f0d596
Gaia: 313599c293f596519604070fa378ffc89e61e98f
Platform Version: 26.0a2
RIL Version: 01.02.00.019.056 

Notes:
Repro frequency: 100%
See attached: screenshot
This issue occurs on Leo v1.1.1 Mozilla Rill

Environmental Variables
Device: Leo v 1.1.1.0 Mozilla COM RIL
Build ID: 20131001041206
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/c630289d6388
Gaia: 02b975e6ce12922928c74276ac7d19432a03f126
Platform Version: 18.1
RIL Version: 01.01.00.019.240 

Video thumbnails in MMS are generic.
Yep, we don't display a video thumbnail, that's expected.

Could be a feature request for later, what do you think Wilfried and Joe ?
Flags: needinfo?(wmathanaraj)
Flags: needinfo?(jcheng)
1.3? into feature triage discussion
blocking-b2g: --- → 1.3?
Flags: needinfo?(jcheng)
Keywords: feature
triage: minus and add to backlog
blocking-b2g: 1.3? → ---
Whiteboard: burirun2 → burirun2, [mentor=:julienw]
Flags: needinfo?(wmathanaraj)
I'd like to help with this bug.

My plan is to copy the logic used in the gaia video app to generate the video thumbnail. There is an API for generating thumbnails in the making (see bug #873959). I can implement the functionality first, close this bug, and then create a new bug that asks to use the new API.
Please do!

The relevant code probably lives in compose.js or attachment.js. Also, instead of copy the logic, it's probably better to make it a small library in /shared/js (if it's not there already).

Please ask if you need anymore information, either here or on IRC!

Thanks a lot!
Assignee: nobody → gonzaandreani
blocking-b2g: --- → backlog
Julien,

I have a been trying to work on this for about a week. I cloned the B2G repo and created an emulator. Everytime I change the code in the GAIA project and rebuild the emulator, the changes are not reflected. Could you help?
You don't need to rebuild the emulator to change the code. The emulator is just like a phone: you use "adb" to push changes to the emulator.

To do this, you just need to run the following shell command from the "gaia" directory while the emulator is running:

  APP=sms make install-gaia

This should flash the current version of the SMS/MMS app to the emulator.


Hope this helps
Note that you can also probably works directly in Firefox.

Here is how you can do this:

* create a suitable profile:

  PROFILE_FOLDER=profile-sms DEBUG=1 DESKTOP=0 make

* run firefox nightly with this profile:

  /path/to/firefox --no-remote -profile ./profile-sms http://sms.gaiamobile.org:8080

* toggle the "responsive mode" (Ctrl + Shift + M)

Then you can use the app in a limited way; the thread "052780" contains some MMS with a video.
The good thing with the way in comment 10 is that you can just hit "reload" in Firefox to see your changes.
I have tried using both firefox and the simulator but neither allows me to put a video on the device. 

I have tried to place a video in my "Pictures" and "Video" folder. The photos are detected but the videos are not. I have also tried to download the videos from the browser on the simulator, but it always throws an error. 

Do you have any idea why this happens?
Have you tried the steps in comment 10? The thread "05280" has a MMS with a video, this should be good enough for a start?
That's awesome! It works great. So much simpler than what I have been doing. I should have asked for help sooner
I have a fix ready. I basically copied the code from the video app. I can't see a clear way to extract the thumbnail functionality because it's tightly coupled with the code that extracts and stores the video's metadata into MediaDB. I'm not sure how to separate it. 

Here's my fix if you want to take a look at it...

https://github.com/NakedFerret/gaia/commit/35dca235d4df030c456996d37665c4251a592494
I added comments ot your commit.

Don't hesitate to ask if something is not clear enough.


Basically, this looks nice, except I wonder if we should not store the thumbnails instead of generating them each time. Bug 876467 is especially related if you want to have a look, but it's maybe difficult for a first-time contributor.
Gecko can be smart about images (like decoding them directly in a smaller size) and it can't for videos.

Some other general notes:
* you should really create a separate branch to do your work. "master" should only contain the master code from mozilla, regularly fetched and merged (I even use "reset --hard" to be sure it's always correct, but it can be scary ;) )
* then, please create a pull request out of your branch, this will make it easier to see the history of comments

Thanks !
Oleg, do you mind following this bug as a mentored bug (instead of me ;) ) ? Also, Bug 876467 could probably be a nice addition to your thoughts about an in-app database.
Flags: needinfo?(azasypkin)
(In reply to Julien Wajsberg [:julienw] from comment #17)
> Oleg, do you mind following this bug as a mentored bug (instead of me ;) ) ?
> Also, Bug 876467 could probably be a nice addition to your thoughts about an
> in-app database.

Sure, I'm happy to help with that!

Gonzalo, please ping me here or on IRC if you have any questions.

Thanks!
Flags: needinfo?(azasypkin)
Whiteboard: burirun2, [mentor=:julienw] → burirun2, [mentor=:azasypkin]
Mentor: azasypkin
Whiteboard: burirun2, [mentor=:azasypkin] → burirun2,
Mentor: azasypkin
Brett had a good idea in bug 1047479: if we can get the thumbnail directly from the video application (when attaching and when viewing) it could be nicer than decoding ourself.
Yes, I'll try to see if we can do that. Hopefully I'll have sometime this week to finish this fix
I gave more thought: if we get the thumbnail from the Video app, then we need to store it locally. But we don't really have a DB in the SMS app yet (we plan to have one before the end of this year). So we're not in a very good position right now...

Maybe you can try to use asyncStorage to store the video thumbnail (using a "message-<id>" key)?
blocking-b2g: backlog → ---
Reseting the assignee.

Gonzalo, if you still want to work on this, please do ! :)
Assignee: gonzaandreani → nobody
Marking as a mentored bug. Not sure what the right approach is, it could be better to wait for the DB in Gaia bug.
Mentor: azasypkin
Whiteboard: burirun2, → burirun2, [lang=js]
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: