SRGMediaPlayer-iOS v5.0.0 Release Notes

Release Date: 2020-07-08 // almost 4 years ago
  • ๐Ÿ‘ Date support

    ๐Ÿš€ This release adds support for dates when playing a livestream:

    • When playing a livestream, the currentDate property of SRGMediaPlayerController provides the date corresponding to the current position, if any.
    • ๐Ÿ‘€ For livestreams the player can equivalently start playback or seek to time or date-based positions. New SRGMark and SRGMarkRange classes have been introduced to support this duality.
    • (Breaking change) To support the time / date duality, segments are not defined anymore with time ranges, but with mark ranges. The previously required -srg_timeRange property has therefore been replaced with -srg_markRange.
    • (Breaking change) SRGTimeSliderDelegate methods receive an optional date parameter. Be sure your implementation adopt the new method signatures.

    ๐Ÿ‘€ This feature works best if date information is supplied in the streams themselves with EXT-X-PROGRAM-DATE-TIME tags. This ensures that the stream time and the wall-clock time can be related. If no such information is available in your streams you can still use date-based seeking, but accuracy might not be optimal (there is a delay between broadcasting and streaming). To mitigate this issue, you can measure which delay there is between broadcasting and streaming, and provide a SRGMediaPlayerUserInfoStreamOffsetKey as userInfo when playing your stream.

    ๐Ÿ›  Fixes

    • ๐Ÿ‘ Ensure the player prevents the device from sleeping only when required. For video background playback proper behavior requires a device supporting iOS 12 or above.
    • ๐Ÿ›  Fix imprecise seeks when a Bluetooth handset is connected.
    • ๐Ÿ›  Fix issue preventing the player from correctly resuming when seeking outside the available media range.
    • ๐Ÿ›  Fix tvOS build issue with Xcode 11.4.