Skip to content

Playback rate

Compare
Choose a tag to compare
@defagos defagos released this 13 Apr 13:10
· 83 commits to master since this release
44836cc

New features

  • The controller supports the rates 0.5×, 0.75×, 1×, 1.25×, 1.5×, 2× for slow, normal or fast playback. These supported values are returned from the supportedPlaybackRates property and the desired rate can be set using the newly available playbackRate property.
  • Livestreams might not always support some playback speeds. The effectivePlaybackRate property returns the currently applied playback rate.
  • On iOS:
    • The track selection button has been transformed into a settings button from which playback speed, audio track and subtitles can be selected.
    • The settings button is visible at all times, not only when subtitles are available. The subtitle selection state is similarly not reflected anymore by the button itself.
    • The button delegate protocol provides new methods called when the user picks a playback speed, audio track or subtitles.
  • On tvOS:
    • Playback speed can be selected using a dedicated button available from SRGMediaPlayerViewController main user interface.
    • The SRGMediaPlayerViewControllerDelegate protocol provides a new delegate method called when the playback speed is changed (no similar methods are provided for audio or subtitle track selection for technical reasons, though).

Improvements

  • Playback setting window colors have been tweaked for better readability.
  • Add slider dragging start and strop delegate methods to SRGTimeSliderDelegate.
  • Add support for slider increment and decrement accessibility gestures (#116).

Fix

  • Fix tvOS 15 crashes when playing another media.

Breaking changes

  • SRGTracksButton has been renamed as SRGPlaybackSettingsButton.
  • The alwaysHidden playback settings button property has been removed, as the button is now always visible. Simply use the hidden property when you need to hide the button.
  • The selectedImage playback settings button property has been removed, as there is no selected state anymore.
  • SRGTracksButtonDelegate has been renamed as SRGPlaybackSettingsButtonDelegate. Existing method signatures have been updated appropriately.

Migration instructions

If you were previously using SRGTracksButton:

  • Update any code or resource (storyboard, xib) explicitly referencing the SRGTracksButton class, replacing it with SRGPlaybackSettingsButton.
  • Update the SRGMediaPlayerDesignables.m file if you were using it by copying the updated file available from the Designables source code folder.
  • Replace calls to alwaysHidden with hidden.
  • Update your button delegate protocol implementation to SRGPlaybackSettingsButtonDelegate.