Closed
Bug 1100528
Opened 10 years ago
Closed 10 years ago
[Gallery][RTL] - Mirror slider thumb to progress left while playing video in gallery
Categories
(Firefox OS Graveyard :: Gaia::Gallery, defect)
Firefox OS Graveyard
Gaia::Gallery
Tracking
(feature-b2g:2.2+, b2g-v2.2 verified)
Tracking | Status | |
---|---|---|
b2g-v2.2 | --- | verified |
People
(Reporter: pdahiya, Assigned: pdahiya)
References
Details
Attachments
(2 files)
In gallery RTL mode, on playing a video
a) slider thumb should progress left
b) Time played should display at right and total time should be displayed at left
Assignee | ||
Updated•10 years ago
|
Blocks: gallery-rtl
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → pdahiya
Assignee | ||
Comment 1•10 years ago
|
||
Hi David
Please review attached PR with the fix to move slider thumb to left and swap elapsed and duration text in RTL mode.
I did try your suggestion from https://bugzilla.mozilla.org/show_bug.cgi?id=1095832#c2, however for gallery app its touching css for elapsed, duration, progress bar as they are absolute positioned by default. IMO attached PR looks a much cleaner approach. See WIP PR https://github.com/mozilla-b2g/gaia/pull/26346 . Thanks!
Attachment #8526411 -
Flags: review?(dflanagan)
Updated•10 years ago
|
feature-b2g: --- → 2.2+
Target Milestone: --- → 2.2 S1 (5dec)
Comment 2•10 years ago
|
||
Comment on attachment 8526411 [details] [review]
PR with fix of bug 1100528
A couple of nits on github, but the r- is because this bug does not update the computePosition() function so that the slider moves the right way when the user drags it for RTL locales. You don't have a different bug filed for that, so I think you ought to fix it here.
Actually, instead of modifying computePosition, I bet you can just modify this code:
var position = computePosition(e.detail.position, rect);
var pos = Math.min(Math.max(position, 0), 1);
player.currentTime = player.duration * pos;
So that it looks like this:
var position = computePosition(e.detail.position, rect);
var pos = Math.min(Math.max(position, 0), 1);
if (navigator.mozL10n.language.direction === 'rtl') {
pos = 1 - pos;
}
player.currentTime = player.duration * pos;
I haven't tried that, though, so not sure.
It seems easiest to me to just fix this as part of this bug, but if you'd prefer to file a followup and land this as is, we can do that, too.
Attachment #8526411 -
Flags: review?(dflanagan) → review-
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8526411 [details] [review]
PR with fix of bug 1100528
Hi David
Thank for catching the bug in computePosition when user drags slider in RTL locale. I have tried your suggested fix and it works! I have updated the patch with the fix. Please review.
Attachment #8526411 -
Flags: review- → review?(dflanagan)
Comment 4•10 years ago
|
||
Attachment #8526411 -
Flags: review?(dflanagan) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Thanks David for review, patch landed on master
https://github.com/mozilla-b2g/gaia/commit/fc57a56052be493e47fbfacaddefda5c5e8aaa0c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
status-b2g-v2.2:
--- → fixed
Assignee | ||
Updated•10 years ago
|
Component: Gaia → Gaia::Gallery
Comment 6•10 years ago
|
||
Test case has been added in moztrap:
https://moztrap.mozilla.org/manage/case/15914/
Flags: in-moztrap+
This issue has been verified succeffully on Flame 2.2
Progress bar in RTL is mirrored, so that the playhead progresses to the left. Played content is to the right of the playhead. Time played is displayed at right and time left is displayed at left.
See attachment:video.MP4
Rate:0/5
Flame 2.2 build:
Build ID 20150310002536
Gaia Revision 166491b92278dc9e648f8d49ab02d9ca00d74421
Gaia Date 2015-03-06 18:26:27
Gecko Revision https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/1cda026f8996
Gecko Version 37.0
Device Name flame
Firmware(Release) 4.4.2
Firmware(Incremental) eng.cltbld.20150310.042346
Firmware Date Tue Mar 10 04:23:56 EDT 2015
Bootloader L1TC000118D0
You need to log in
before you can comment on or make changes to this bug.
Description
•