Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

tdz
Copy link
Contributor

@tdz tdz commented Aug 7, 2013

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

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>
@mozilla-autolander-deprecated
Copy link
Contributor

This pull request has been closed due to tree stability issues. Please rebase and re-open the pull request if you still need to land this. Ensure the gaia-try run is green before landing. Sorry for any inconvenience.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants