Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 1207192 - [Flame][Music] The playback times in the Music app do not increase and decrease in sync in both NGA and OGA #33301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/music/elements/music-seek-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ Object.defineProperty(proto, 'remainingTime', {

IntlHelper.get('duration').then((duration) => {
this.els.remainingTime.textContent =
duration.format(-this._remainingTime * 1000);
duration.format(-(Math.floor(this.duration) - this._remainingTime) * 1000);
this.els.elapsedTime.textContent =
duration.format(this._elapsedTime * 1000);
});
Expand Down
4 changes: 2 additions & 2 deletions dev_apps/music-oga/js/ui/views/player_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ var PlayerView = {
this.seekBar.max = isFinite(endTime) ? endTime : 0;
this.seekBar.value = currentTime;

var formattedCurrentTime = formatTime(currentTime);
var formattedCurrentTime = formatTime(Math.floor(currentTime));
// Adjust values for accessibility
this.seekSlider.setAttribute('aria-valuetext', formattedCurrentTime);
this.seekSlider.setAttribute('aria-valuemax', this.seekBar.max);
Expand All @@ -587,7 +587,7 @@ var PlayerView = {
this.seekIndicator.style.transform = 'translateX(' + x + ')';

this.seekElapsed.textContent = formattedCurrentTime;
var remainingTime = endTime - currentTime;
var remainingTime = Math.floor(endTime - currentTime);
// Check if there is remaining time to show, avoiding to display "-00:00"
// while song is loading (Bug 833710)
this.seekRemaining.textContent =
Expand Down