Closed Bug 859284 Opened 11 years ago Closed 11 years ago

[Video Player] after completion of video playing in landscape mode time stamps for video files in list view are not displayed.

Categories

(Firefox OS Graveyard :: Gaia::Video, defect, P3)

ARM
Gonk (Firefox OS)

Tracking

(blocking-b2g:leo+, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix)

RESOLVED FIXED
1.1 QE1 (5may)
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: leo.bugzilla.gaia, Assigned: sjochimek)

References

Details

(Whiteboard: [TD-9680])

Attachments

(2 files, 3 obsolete files)

1. Title : after completion of video playing in landscape mode time stamps for video files in list view are not displayed.
2. Precondition : Video player app running
3. Tester's Action : Play video file in landscape mode till end of the file.
4. Detailed Symptom (ENG.) : after completion of video playing in landscape mode time stamps for video files in list view are not displayed.
5. Gaia Revision # :   "8e7262e3d98ea9574d7f79c1e890ad80cfa40c27"
6. Expected : after completion of video playing in landscape mode time stamps for video files in list view should be displayed
7.Reproducibility: Yes
                1)Frequency Rate : 100%
8.Comparison Results : 
                1)Model Comparing : 
9. Attached files: 
                1)Log : 
                2)Test Contents : 
                3)Video file :
Attached file Pointer to pull request (obsolete) —
Attachment #735772 - Flags: review?(dflanagan)
Assignee: nobody → leo.bugzilla.gaia
tracking-b2g18: --- → ?
blocking-b2g: --- → leo?
tracking-b2g18: ? → ---
Triage 4/12 - Leo+ as seems to be a function failure (time information missing)
blocking-b2g: leo? → leo+
Whiteboard: [TD-9680}
Whiteboard: [TD-9680} → [TD-9680]
Comment on attachment 735772 [details]
Pointer to pull request

I'm asking Samuel to take this review. He's the one who added the textTruncate() function as part of bug 819062. I worry that removing the call to textTruncate() in the resize event handler, as this patch does, will fix this bug but break something else.  But I don't understand what textTruncate is doing well enough to know what will break.

Sam: would you take a look at this?  Is the patch okay? And if not, is there a bug in textTruncate itself?

(What is textTruncate for, by the way? Is it just a way to get an ellipsis at the end of a long video title since the CSS-based solution in inefficient? It seems like a lot of work for what is likely to be a real corner case)
Attachment #735772 - Flags: review?(dflanagan) → review?(sjochimek)
Target Milestone: --- → Leo QE1 (5may)
Comment on attachment 735772 [details]
Pointer to pull request

Thanks to point this bug out.

You don't need to remove those lines that will broke the title truncation on resize.

See https://github.com/mozilla-b2g/gaia/pull/9091/files for review.
Please keep me inform if that fix the bug. I test it on my device.

David: textTruncate truncate a multiple line text and append duration at the end. So it's kind of ellipsis but for text.
Attachment #735772 - Flags: review?(sjochimek) → review-
Environmental  Variables:
Inari Build ID: 20130416070200
Kernel Date: Feb 21
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/6bac24e14538
Gaia: c883af5ecd0998f78d9aaa4c2337c842e1dbb5a0

The similar issue reproduces with "Inari" device.
Repro Steps:
1) Open "Video" application
2) Tap on video file for playback
3) While it's playing tap on pause or just tap on "<" button
4) Go back to the video files list

Actual result:
Total time is not displayed in the video file list

Expected result:
Total time is displayed in the video file list

Notes:
The issue reproduce in both: portrait and landscape views
see the screenshot
Attached file Gaia PR
Assignee: leo.bugzilla.gaia → sjochimek
Attachment #735772 - Attachment is obsolete: true
Attachment #738959 - Flags: review?(dale)
Attachment #738959 - Flags: review?(dale) → review?(dflanagan)
Comment on attachment 738959 [details]
Gaia PR

This patch fixes this bug but re-introduces the bug that this whole manual text formatting thing was there to fix.

If you have a movie with a really long name that fits in landscape mode but does not fit in portrait mode and you start playing the movie in landscape, then rotate to portrait and then go back to the list of videos, the title text will not be reformatted, and it will overflow its container instead of being truncated with ...

So if you're going to ignore resize events while the video list is hidden, you also have to add code to reformat the list every time you re-display it again.
Attachment #738959 - Flags: review?(dflanagan) → review-
Priority: -- → P3
Attached file Pointer to pull request (obsolete) —
Please review patch.
Assignee: sjochimek → leo.bugzilla.gaia
Attachment #741793 - Flags: review?(dflanagan)
Flags: needinfo?(dflanagan)
Comment on attachment 741793 [details]
Pointer to pull request

r- for the same reason as the last patch. See comment 7.  If you ignore the resize event then, when you go back to the thumbnail list, the text may be improperly formatted. 

In addition to the code you have so far, you must also reformat the text when you return to thumbnail mode, if the size has changed.
Attachment #741793 - Flags: review?(dflanagan) → review-
Flags: needinfo?(dflanagan)
Working with Vivien on this, here is a nicer solution instead of textTruncate.
(There maybe issue cause 'deviceorientation' event doesn't act as expected).

https://github.com/mozilla-b2g/gaia/pull/9271/files

We use the 'overflow' event of an element and force it to repaint again as long as the content fit the container. This should be take care with an ellipsis. I file a bug for it.

https://bugzilla.mozilla.org/show_bug.cgi?id=866102
Depends on: webkit-line-clamp
Flags: needinfo?(dflanagan)
Flags: needinfo?(21)
Not sure what info you need from me ?
Flags: needinfo?(21)
Flags: needinfo?(dflanagan)
Attachment #738959 - Flags: review- → review?(dflanagan)
Attached file Pointer to Pull request (obsolete) —
Made changes in 
1. video.js file for string length comparison.
2. Added word break in details class of video.css
3. added display block in After class to show time duration in a new line
Attachment #741793 - Attachment is obsolete: true
Attachment #743566 - Flags: review?(dflanagan)
Hey Leo: We already try to use the 'resize' events but it is trigger many times during the rotation of the device. That's why i use the orientation variable with the 'deviceorientation' events which is more appropriate. Also having two differents pr for this bug may be confusing, can you just remove your PR and leave comment so we can be able to improve the patch, thanks.
Flags: needinfo?(leo.bugzilla.gaia)
Comment on attachment 743566 [details]
Pointer to Pull request

I just closed this pull request because Sam's work in the other attachment is closer to what we want, I think.
Attachment #743566 - Flags: review?(dflanagan) → review-
Comment on attachment 738959 [details]
Gaia PR

I didn't know about the overflow event. I love that you can replace the old code with this overflow-based code.

But I'm giving r- because using deviceorientation is not appropriate here, and also because I think you can simplify the overflow code significantly.  See my comments on github.
Attachment #738959 - Flags: review?(dflanagan) → review-
My pull request was closed
Flags: needinfo?(leo.bugzilla.gaia)
Comment on attachment 738959 [details]
Gaia PR

David, thanks for your review.

I removed the counter, and use the resize event.

The reset of the overflow is a trick to bind the 'overflow' event. Actually it works outsize the function that is triggered by the events. 

You should try with a single very long word without the timeout the 'overflow' event is not triggered.

What do you think ?
Flags: needinfo?(dflanagan)
Sam,

The code is looking really good. I've added comments on github.
Flags: needinfo?(dflanagan)
Assignee: leo.bugzilla.gaia → sjochimek
Sam, can you provide current status on this bug?
Flags: needinfo?(sjochimek)
David: i added a clearTimeout on the 'underflow' event as you suggested. Let me know.
Flags: needinfo?(sjochimek) → needinfo?(dflanagan)
Sam: I don't remember suggesting that. I'm not sure what the particular issue you're trying to fix is, but I don't understand why you'd need the clearTimeout(). Isn't it safe to leave the element with overflow:hidden even if it no longer overflows?  If you can make it work without an underflow handler that would be simpler and better.

I haven't tested this yet, but assuming it works right, I'm basically ready to give an r+, especially if you can remove the clearTimeout and get rid of the underflow handler completely.

Sorry about my video patch landing before yours did. That must have been tricky to merge since I split up the file...
Flags: needinfo?(dflanagan)
Is this bug (https://bugzilla.mozilla.org/show_bug.cgi?id=840009) related to this?
The outcome is similar...
David: Ok the PR is ready.

John: You should mark it as duplicate.
Flags: needinfo?(dflanagan)
Comment on attachment 738959 [details]
Gaia PR

The code looks good, and seems to work well.  It is so nice having all that other formatting code gone!  Thanks!
Attachment #738959 - Flags: review- → review+
Flags: needinfo?(dflanagan)
landed on master: https://github.com/mozilla-b2g/gaia/commit/9947ab827649f9dc7b0a4c4e796fefb5c02d64dd
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment #743566 - Attachment is obsolete: true
Blocks: 863609
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
Added Video Suite Test Case #8793 - [B2G Video] Verify that after a video in landscape mode ends that the Video List resumes normally
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: