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)

defect
Not set
normal

Tracking

(feature-b2g:2.2+, b2g-v2.2 verified)

VERIFIED FIXED
2.2 S1 (5dec)
feature-b2g 2.2+
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
Blocks: gallery-rtl
Assignee: nobody → pdahiya
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)
feature-b2g: --- → 2.2+
Target Milestone: --- → 2.2 S1 (5dec)
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-
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 on attachment 8526411 [details] [review] PR with fix of bug 1100528 Looks good to me.
Attachment #8526411 - Flags: review?(dflanagan) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Component: Gaia → Gaia::Gallery
Test case has been added in moztrap: https://moztrap.mozilla.org/manage/case/15914/
Flags: in-moztrap+
Attached video video.MP4
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
Status: RESOLVED → VERIFIED
QA Whiteboard: [MGSEI-Triage+]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: