Skip to content

Update track length if unknown at the start of playback

Robert Stone requested to merge rhstone/vlc-android:update-length-for-aac into master

Description

Register for LengthChanged events and update length if unknown during initial playback.

Motivation and Context

AAC audio files do not display duration in Android Auto or via Bluetooth.

How Has This Been Tested?

Tested with AAC files, which apparently do not provide duration information in their headers. Upon load, the length of an AAC audio file is 0, and it subsequently updates with a duration during playback. I have observed the value appears to jump around by a few seconds, as the VLC seek bar does show a changing length; however, we should not update the Android media session on every length change event. One update is sufficient, as multiple updates are sent via Bluetooth and to Android Auto unnecessarily.

Types of changes

  • Enhancement (non-breaking change which cleans up / improves existing functionality)

Checklist

  • I have read the CONTRIBUTING section of the README document.
Edited by Robert Stone

Merge request reports

Loading