This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Bug 783512: Remove timer for switching tracks in Music app #11402
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As reported in bug 783512, for some MP3 files, no 'ended' events
are fired by Gecko. The workaround for this bug introduced a timer
for switching tracks in the music player. When the timer expires,
it switches the Music app to the next track in the play list.
The problem is caused by Android's way of computing the duration of
an MP3 file. MP3 files are split into short frames with a duration
of a few milliseconds each. The actual value per frame depends on
the frame's bit rate. Android's implementation computes the duration
of the first frame using its bit rate, and approximates the track's
duration from that bit rate. Many MP3 files use varying bit rates.
This results in an incorrect duration for the whole track.
With the fix for bug 831224, we support MP3 files with varying bit
rate directly in Gecko.
This patch thus removes the workaround for bug 783512 from the Music
app. The app now registers an event listener for 'durationchange'
events, which get fired when the duration of an MP3 file has been
updated.
Signed-off-by: Thomas Zimmermann tdz@users.sourceforge.net