Skip to content

v1.3.0 — quality audio fix, qualityChangedStream, Android background playback

Choose a tag to compare

@DaniKemper010 DaniKemper010 released this 23 Jun 13:03
· 12 commits to master since this release

Quality-selection and Android background-playback fixes.

Fixed

  • Quality switching no longer drops audio (iOS + Android). Selecting an HLS quality — or switching back to Auto — previously reloaded a single video-only variant playlist, replacing the master. On adaptive streams that carry audio as a separate rendition (#EXT-X-MEDIA:TYPE=AUDIO), that silenced the audio while video kept playing. The plugin now keeps the master loaded and constrains the video track via the player's track selector (preferredMaximumResolution/preferredPeakBitRate on iOS, setMaxVideoSize/setMaxVideoBitrate on Android), so audio is untouched and the switch is instant (no buffering reload). (#40)
  • qualityChangedStream now emits the selected quality. Native emits the quality fields flat in the event map, but the Dart handler only accepted a nested quality key, so the stream stayed silent and any UI bound to it was stuck on "Auto". The handler now accepts both shapes. (#39)
  • iOS: position/time updates no longer stop when Auto quality is enabled. The old auto-quality monitor reused the shared periodic time observer that drives timeUpdate, clobbering position reporting. The monitor is removed — AVPlayer's native ABR handles Auto. (#40)
  • Android: background playback (live + VOD) no longer dies after a few minutes. The plugin posted a media notification but never ran a real foreground service, so Doze/App-Standby cut the app's network and ExoPlayer failed with UnknownHostException. Playback now runs as a real foreground service while playing (stopped on pause/stop), and the shared player uses setWakeMode(WAKE_MODE_NETWORK) (partial WakeLock + WifiLock). Adds the WAKE_LOCK permission to the plugin manifest. (#38)

Full Changelog: v1.2.1...v1.3.0