From 3b3c824d998b15b9f72fabf77445ad0036e4656c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Fri, 20 May 2022 15:25:56 +0200 Subject: [PATCH 01/15] Bump version number --- Demo/Xcode/Shared/Targets/Application.xcconfig | 4 ++-- Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Demo/Xcode/Shared/Targets/Application.xcconfig b/Demo/Xcode/Shared/Targets/Application.xcconfig index 851f96ae..a2201a95 100644 --- a/Demo/Xcode/Shared/Targets/Application.xcconfig +++ b/Demo/Xcode/Shared/Targets/Application.xcconfig @@ -1,8 +1,8 @@ #include "Xcode/Shared/Common.xcconfig" // Version information -MARKETING_VERSION = 8.0.0 -CURRENT_PROJECT_VERSION = 93 +MARKETING_VERSION = 8.0.1 +CURRENT_PROJECT_VERSION = 94 // Deployment targets IPHONEOS_DEPLOYMENT_TARGET = 12.0 diff --git a/Package.swift b/Package.swift index af745ea9..59d703ec 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ import PackageDescription struct ProjectSettings { - static let marketingVersion: String = "8.0.0" + static let marketingVersion: String = "8.0.1" } let package = Package( From 73b2b421be2d14a69533719526f025541947d862 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Fri, 20 May 2022 16:55:31 +0200 Subject: [PATCH 02/15] Fix demo build number LB demo tvOS has 93, LB demo iOS has 94. ITMS auth issue. --- Demo/Xcode/Shared/Targets/Application.xcconfig | 2 +- WhatsNew-demo.json | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Demo/Xcode/Shared/Targets/Application.xcconfig b/Demo/Xcode/Shared/Targets/Application.xcconfig index a2201a95..99fe1609 100644 --- a/Demo/Xcode/Shared/Targets/Application.xcconfig +++ b/Demo/Xcode/Shared/Targets/Application.xcconfig @@ -2,7 +2,7 @@ // Version information MARKETING_VERSION = 8.0.1 -CURRENT_PROJECT_VERSION = 94 +CURRENT_PROJECT_VERSION = 95 // Deployment targets IPHONEOS_DEPLOYMENT_TARGET = 12.0 diff --git a/WhatsNew-demo.json b/WhatsNew-demo.json index 99203fb3..669d7a0d 100644 --- a/WhatsNew-demo.json +++ b/WhatsNew-demo.json @@ -57,5 +57,6 @@ "7.3.2-89": "- Demo use the MediaPlayer patch release, which fixes some background video playback incorrectly paused ", "7.4.0-91": "- Fix crash during continuous playback transitions on tvOS 15.2.\n- Fix countdown layout issue.", "7.5.0-92": "## Playback speed\n\n- On iOS, the settings button has playback speed, subtitles and audio tracks.\n- On tvOS, the playback speed can be selected using a dedicated button, like subtitles and audio tracks.\n\n## Seek preview (iOS only)\n\n- Seek preview automatically displayed when interacting with the slider.\n- The preview might not be available for old videos or depending on the kind of content protection (e.g. content protected by DRM).\n\n## Fixes (iOS only)\n\n- Avoid content overlaps during continuous playback transitions.\n- Fix slider up and down accessibility gestures.", - "8.0.0-93": "## Modern gestures (iOS only)\n\n- Skip mode is entered by double-tapping the player once. This gesture can be followed by additional single taps to move further in time.\n- Content gravity is now managed with a pinch gesture and also provides a way to enter or exit full screen mode (provided the dedicated button is also available).\n- The skip and pinch gestures can be performed whether user interface controls are visible or not.\n- The forward skip buttons now move 10 seconds forward instead of 30 seconds. Control center behavior has been updated accordingly.\n\n## Improvements\n\n- Times displayed by a Letterbox view during DVR livestream playback are now always formatted in the Zurich timezone.\n- Age rating blocking reason messages have been updated." + "8.0.0-93": "## Modern gestures (iOS only)\n\n- Skip mode is entered by double-tapping the player once. This gesture can be followed by additional single taps to move further in time.\n- Content gravity is now managed with a pinch gesture and also provides a way to enter or exit full screen mode (provided the dedicated button is also available).\n- The skip and pinch gestures can be performed whether user interface controls are visible or not.\n- The forward skip buttons now move 10 seconds forward instead of 30 seconds. Control center behavior has been updated accordingly.\n\n## Improvements\n\n- Times displayed by a Letterbox view during DVR livestream playback are now always formatted in the Zurich timezone.\n- Age rating blocking reason messages have been updated.", + "8.0.0-94": "## Modern gestures (iOS only)\n\n- Skip mode is entered by double-tapping the player once. This gesture can be followed by additional single taps to move further in time.\n- Content gravity is now managed with a pinch gesture and also provides a way to enter or exit full screen mode (provided the dedicated button is also available).\n- The skip and pinch gestures can be performed whether user interface controls are visible or not.\n- The forward skip buttons now move 10 seconds forward instead of 30 seconds. Control center behavior has been updated accordingly.\n\n## Improvements\n\n- Times displayed by a Letterbox view during DVR livestream playback are now always formatted in the Zurich timezone.\n- Age rating blocking reason messages have been updated." } \ No newline at end of file From af45cb22fd389569091d121739c3cef82094004c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Wed, 8 Jun 2022 10:30:34 +0200 Subject: [PATCH 03/15] Update fastlane --- Gemfile.lock | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3b915100..99f8f27c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,20 +8,20 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.554.0) - aws-sdk-core (3.126.0) + aws-partitions (1.597.0) + aws-sdk-core (3.131.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.54.0) - aws-sdk-core (~> 3, >= 3.126.0) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.57.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.112.0) - aws-sdk-core (~> 3, >= 3.126.0) + aws-sdk-s3 (1.114.0) + aws-sdk-core (~> 3, >= 3.127.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) - aws-sigv4 (1.4.0) + aws-sigv4 (1.5.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.0.3) @@ -36,8 +36,8 @@ GEM unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) emoji_regex (3.2.3) - excon (0.91.0) - faraday (1.9.3) + excon (0.92.3) + faraday (1.10.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -56,8 +56,8 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.3) - multipart-post (>= 1.2, < 3) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) @@ -66,7 +66,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.6) - fastlane (2.204.3) + fastlane (2.206.2) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -108,9 +108,9 @@ GEM fastlane-plugin-appcenter (2.0.0) fastlane-plugin-xcconfig (2.0.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.16.0) + google-apis-androidpublisher_v3 (0.21.0) google-apis-core (>= 0.4, < 2.a) - google-apis-core (0.4.2) + google-apis-core (0.5.0) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -123,15 +123,15 @@ GEM google-apis-core (>= 0.4, < 2.a) google-apis-playcustomapp_v1 (0.7.0) google-apis-core (>= 0.4, < 2.a) - google-apis-storage_v1 (0.11.0) + google-apis-storage_v1 (0.14.0) google-apis-core (>= 0.4, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.5.0) - faraday (>= 0.17.3, < 2.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.2.0) - google-cloud-storage (1.36.1) + google-cloud-storage (1.36.2) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) @@ -139,20 +139,20 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.1.1) - faraday (>= 0.17.3, < 2.0) + googleauth (1.1.3) + faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.4) + http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - jmespath (1.6.0) - json (2.6.1) - jwt (2.3.0) + jmespath (1.6.1) + json (2.6.2) + jwt (2.4.1) memoist (0.16.2) mini_magick (4.11.0) mini_mime (1.1.2) @@ -163,9 +163,9 @@ GEM optparse (0.1.1) os (1.1.4) plist (3.6.0) - public_suffix (4.0.6) + public_suffix (4.0.7) rake (13.0.6) - representable (3.1.1) + representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) @@ -175,9 +175,9 @@ GEM ruby2_keywords (0.0.5) rubyzip (2.3.2) security (0.1.3) - signet (0.16.0) + signet (0.16.1) addressable (~> 2.8) - faraday (>= 0.17.3, < 2.0) + faraday (>= 0.17.5, < 3.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) simctl (1.6.8) @@ -194,7 +194,7 @@ GEM uber (0.1.0) unf (0.1.4) unf_ext - unf_ext (0.0.8) + unf_ext (0.0.8.2) unicode-display_width (1.8.0) webrick (1.7.0) word_wrap (1.0.0) From e0560a1b3ed3cf75afa9d95de31293704e14cef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20De=CC=81fago?= Date: Wed, 8 Jun 2022 12:00:59 +0200 Subject: [PATCH 04/15] Modernize with Xcode 13.4 --- .swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme | 2 +- Demo/SRGLetterbox-demo.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/SRGLetterbox-demo.xcscheme | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme index 48fdf5a2..540600c2 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme @@ -1,6 +1,6 @@ Date: Wed, 8 Jun 2022 12:01:02 +0200 Subject: [PATCH 05/15] Add view delegate method to report playback button user interactions --- Sources/SRGLetterbox/SRGControlsView.h | 9 +++++++- Sources/SRGLetterbox/SRGControlsView~ios.m | 9 +++++++- .../SRGLetterbox/SRGLetterboxPlaybackButton.h | 23 +++++++++++++++++++ .../SRGLetterboxPlaybackButton~ios.m | 3 +++ Sources/SRGLetterbox/SRGLetterboxView~ios.m | 7 ++++++ .../SRGLetterbox/include/SRGLetterboxView.h | 6 +++++ 6 files changed, 55 insertions(+), 2 deletions(-) diff --git a/Sources/SRGLetterbox/SRGControlsView.h b/Sources/SRGLetterbox/SRGControlsView.h index 7b354837..716c03bf 100644 --- a/Sources/SRGLetterbox/SRGControlsView.h +++ b/Sources/SRGLetterbox/SRGControlsView.h @@ -5,6 +5,7 @@ // #import "SRGLetterboxControllerView.h" +#import "SRGLetterboxPlaybackButton.h" #import "SRGLetterboxTimeSlider.h" @import SRGMediaPlayer; @@ -33,6 +34,12 @@ API_UNAVAILABLE(tvos) */ - (void)controlsViewDidToggleFullScreen:(SRGControlsView *)controlsView; +/** + * Method called when the user interactively toggles play / pause, with `paused` set to `YES` if the user + * paused playback. + */ +- (void)controlsView:(SRGControlsView *)controlsView didTogglePlayPause:(BOOL)paused; + /** * Method called when the time slider moved, either interactively or during normal playback. */ @@ -69,7 +76,7 @@ API_UNAVAILABLE(tvos) * View displaying controls. */ API_UNAVAILABLE(tvos) -@interface SRGControlsView : SRGLetterboxControllerView +@interface SRGControlsView : SRGLetterboxControllerView /** * View optional delegate. diff --git a/Sources/SRGLetterbox/SRGControlsView~ios.m b/Sources/SRGLetterbox/SRGControlsView~ios.m index 8d8c837f..ee979383 100644 --- a/Sources/SRGLetterbox/SRGControlsView~ios.m +++ b/Sources/SRGLetterbox/SRGControlsView~ios.m @@ -20,7 +20,6 @@ #import "SRGLetterboxController+Private.h" #import "SRGLetterboxControllerView+Subclassing.h" #import "SRGLetterboxService.h" -#import "SRGLetterboxPlaybackButton.h" #import "SRGLetterboxTimeSlider.h" #import "SRGLetterboxView+Private.h" #import "SRGLiveLabel.h" @@ -288,6 +287,7 @@ - (void)layoutPlaybackButtonInView:(UIView *)view { SRGLetterboxPlaybackButton *playbackButton = [[SRGLetterboxPlaybackButton alloc] init]; playbackButton.tintColor = UIColor.whiteColor; + playbackButton.delegate = self; [view addSubview:playbackButton]; self.playbackButton = playbackButton; @@ -719,6 +719,13 @@ - (void)timeSlider:(SRGLetterboxTimeSlider *)slider didStopDraggingAtTime:(CMTim self.movingSlider = NO; } +#pragma mark SRGPlaybackButtonDelegate protocol + +- (void)playbackButton:(SRGLetterboxPlaybackButton *)playbackButton didTogglePlayPause:(BOOL)paused +{ + [self.delegate controlsView:self didTogglePlayPause:paused]; +} + #pragma mark SRGPlaybackSettingsButtonDelegate protocol - (void)playbackSettingsButton:(SRGPlaybackSettingsButton *)playbackSettingsButton didSelectPlaybackRate:(float)playbackRate diff --git a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h index 3b0d057c..7cba1cf1 100644 --- a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h +++ b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h @@ -7,6 +7,22 @@ #import "SRGLetterboxController.h" #import "UIImage+SRGLetterbox.h" +NS_ASSUME_NONNULL_BEGIN + +@class SRGLetterboxPlaybackButton; + +/** + * Playback button delegate. + */ +@protocol SRGLetterboxPlaybackButtonDelegate + +/** + * Called when the button is toggled, with `paused` set to `YES` if the user paused playback. + */ +- (void)playbackButton:(SRGLetterboxPlaybackButton *)playbackButton didTogglePlayPause:(BOOL)paused; + +@end + /** * Playback button. */ @@ -23,4 +39,11 @@ API_UNAVAILABLE(tvos) */ @property (nonatomic) SRGImageSet imageSet; +/** + * The playback button delegate. + */ +@property (nonatomic, weak) id delegate; + @end + +NS_ASSUME_NONNULL_END diff --git a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m index 1c706f6b..6fd8b28f 100644 --- a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m +++ b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m @@ -107,6 +107,9 @@ - (void)refresh - (void)togglePlayPause:(id)sender { [self.controller togglePlayPause]; + + BOOL paused = (self.controller.playbackState == SRGMediaPlayerPlaybackStatePaused); + [self.delegate playbackButton:self didTogglePlayPause:paused]; } #pragma mark Accessibility diff --git a/Sources/SRGLetterbox/SRGLetterboxView~ios.m b/Sources/SRGLetterbox/SRGLetterboxView~ios.m index ae24acdb..fd5b01ea 100644 --- a/Sources/SRGLetterbox/SRGLetterboxView~ios.m +++ b/Sources/SRGLetterbox/SRGLetterboxView~ios.m @@ -1112,6 +1112,13 @@ - (void)controlsViewDidToggleFullScreen:(SRGControlsView *)controlsView [self setFullScreen:! self.isFullScreen animated:YES]; } +- (void)controlsView:(SRGControlsView *)controlsView didTogglePlayPause:(BOOL)paused +{ + if ([self.delegate respondsToSelector:@selector(letterboxView:didTogglePlayPause:)]) { + [self.delegate letterboxView:self didTogglePlayPause:paused]; + } +} + - (void)controlsView:(SRGControlsView *)controlsView isMovingSliderToTime:(CMTime)time date:(NSDate *)date withValue:(float)value interactive:(BOOL)interactive { SRGSubdivision *subdivision = [self.controller displayableSubdivisionAtTime:time]; diff --git a/Sources/SRGLetterbox/include/SRGLetterboxView.h b/Sources/SRGLetterbox/include/SRGLetterboxView.h index d3a6861b..914f44b6 100644 --- a/Sources/SRGLetterbox/include/SRGLetterboxView.h +++ b/Sources/SRGLetterbox/include/SRGLetterboxView.h @@ -58,6 +58,12 @@ API_UNAVAILABLE(tvos) */ - (void)letterboxViewWillAnimateUserInterface:(SRGLetterboxView *)letterboxView; +/** + * This method is called when the user interactively toggles play / pause, with `paused` set to `YES` if the user + * paused playback. + */ +- (void)letterboxView:(SRGLetterboxView *)letterboxView didTogglePlayPause:(BOOL)paused; + /** * This method is called when the Letterbox view slider did scroll. The subdivision, time and date (if any) corresponding to * the current slider position are provided, if any. The `interactive` boolean is `YES` if scrolling was interactively made From 450f8f0cd4069117c5a0eb7126abe2127d922c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20De=CC=81fago?= Date: Fri, 10 Jun 2022 10:13:13 +0200 Subject: [PATCH 06/15] Cover interactive pause and stop in a consistent way --- Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m index 6fd8b28f..e2dffd51 100644 --- a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m +++ b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton~ios.m @@ -108,7 +108,8 @@ - (void)togglePlayPause:(id)sender { [self.controller togglePlayPause]; - BOOL paused = (self.controller.playbackState == SRGMediaPlayerPlaybackStatePaused); + // Covers both cases of a paused or stopped player + BOOL paused = (self.controller.mediaPlayerController.player.rate == 0.f); [self.delegate playbackButton:self didTogglePlayPause:paused]; } From ac1b03ad4c50b6db8904cb1c4a04291b0b0259d8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Fri, 10 Jun 2022 14:31:09 +0200 Subject: [PATCH 07/15] Declare delegates as nullables --- Sources/SRGLetterbox/SRGContinuousPlaybackViewController.h | 4 ++-- Sources/SRGLetterbox/SRGControlsView.h | 2 +- Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h | 4 ++-- Sources/SRGLetterbox/SRGLetterboxSubdivisionCell.h | 2 +- Sources/SRGLetterbox/SRGLetterboxSubdivisionCell~ios.m | 4 +--- Sources/SRGLetterbox/include/SRGLetterboxView.h | 2 +- Sources/SRGLetterbox/include/SRGLetterboxViewController.h | 2 +- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Sources/SRGLetterbox/SRGContinuousPlaybackViewController.h b/Sources/SRGLetterbox/SRGContinuousPlaybackViewController.h index adf4c614..49473f1e 100644 --- a/Sources/SRGLetterbox/SRGContinuousPlaybackViewController.h +++ b/Sources/SRGLetterbox/SRGContinuousPlaybackViewController.h @@ -46,9 +46,9 @@ API_AVAILABLE(tvos(9.0)) API_UNAVAILABLE(ios) - (instancetype)initWithMedia:(SRGMedia *)media upcomingMedia:(SRGMedia *)upcomingMedia endDate:(NSDate *)endDate controller:(SRGLetterboxController *)controller; /** - * The delegate. + * The view controller delegate. */ -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak, nullable) id delegate; @end diff --git a/Sources/SRGLetterbox/SRGControlsView.h b/Sources/SRGLetterbox/SRGControlsView.h index 716c03bf..185e6f75 100644 --- a/Sources/SRGLetterbox/SRGControlsView.h +++ b/Sources/SRGLetterbox/SRGControlsView.h @@ -79,7 +79,7 @@ API_UNAVAILABLE(tvos) @interface SRGControlsView : SRGLetterboxControllerView /** - * View optional delegate. + * The view delegate. */ @property (nonatomic, weak, nullable) id delegate; diff --git a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h index 7cba1cf1..72ad9af5 100644 --- a/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h +++ b/Sources/SRGLetterbox/SRGLetterboxPlaybackButton.h @@ -40,9 +40,9 @@ API_UNAVAILABLE(tvos) @property (nonatomic) SRGImageSet imageSet; /** - * The playback button delegate. + * The button delegate. */ -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak, nullable) id delegate; @end diff --git a/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell.h b/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell.h index 6cd7df52..3c0c8042 100644 --- a/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell.h +++ b/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell.h @@ -55,7 +55,7 @@ API_UNAVAILABLE(tvos) @property (nonatomic, getter=isCurrent) BOOL current; /** - * Cell optional delegate. + * The cell delegate. */ @property (nonatomic, weak, nullable) id delegate; diff --git a/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell~ios.m b/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell~ios.m index 5f701c45..e77d3fdf 100644 --- a/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell~ios.m +++ b/Sources/SRGLetterbox/SRGLetterboxSubdivisionCell~ios.m @@ -358,9 +358,7 @@ - (void)setCurrent:(BOOL)current - (void)longPress:(UIGestureRecognizer *)gestureRecognizer { if (gestureRecognizer.state == UIGestureRecognizerStateBegan) { - if (self.delegate) { - [self.delegate letterboxSubdivisionCellDidLongPress:self]; - } + [self.delegate letterboxSubdivisionCellDidLongPress:self]; } } diff --git a/Sources/SRGLetterbox/include/SRGLetterboxView.h b/Sources/SRGLetterbox/include/SRGLetterboxView.h index 914f44b6..cf6f43d9 100644 --- a/Sources/SRGLetterbox/include/SRGLetterboxView.h +++ b/Sources/SRGLetterbox/include/SRGLetterboxView.h @@ -205,7 +205,7 @@ IB_DESIGNABLE API_UNAVAILABLE(tvos) @interface SRGLetterboxView : SRGLetterboxControllerView /** - * View optional delegate. + * The view delegate. */ @property (nonatomic, weak, nullable) IBOutlet id delegate; diff --git a/Sources/SRGLetterbox/include/SRGLetterboxViewController.h b/Sources/SRGLetterbox/include/SRGLetterboxViewController.h index fe9b118d..95203b8a 100644 --- a/Sources/SRGLetterbox/include/SRGLetterboxViewController.h +++ b/Sources/SRGLetterbox/include/SRGLetterboxViewController.h @@ -81,7 +81,7 @@ API_AVAILABLE(tvos(9.0)) API_UNAVAILABLE(ios) /** * The view controller delegate. */ -@property (nonatomic, weak) id delegate; +@property (nonatomic, weak, nullable) id delegate; @end From 23c61a7e3f21e53879d1ab107d3eba27e3b5a7d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20De=CC=81fago?= Date: Tue, 14 Jun 2022 11:24:22 +0200 Subject: [PATCH 08/15] Fix countdown label truncation for German This fixes #269. --- Sources/SRGLetterbox/SRGCountdownView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SRGLetterbox/SRGCountdownView.m b/Sources/SRGLetterbox/SRGCountdownView.m index 34a65329..d07f06cf 100644 --- a/Sources/SRGLetterbox/SRGCountdownView.m +++ b/Sources/SRGLetterbox/SRGCountdownView.m @@ -677,7 +677,7 @@ - (void)updateLayout CGFloat height = isLarge ? 57.f : 45.f; CGFloat digitFontSize = isLarge ? 45.f : 36.f; - CGFloat titleFontSize = isLarge ? 17.f : 13.f; + CGFloat titleFontSize = isLarge ? 16.f : 13.f; CGFloat digitCornerRadius = isLarge ? 3.f : 2.f; CGFloat spacing = isLarge ? 3.f : 2.f; From 63b5f81825f864bf6ec4ef0d422f4f973d7c40d5 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Mon, 13 Jun 2022 19:19:32 +0200 Subject: [PATCH 09/15] Update srgssr stream urls in demo --- Demo/Resources/MediaDemoConfiguration.plist | 40 ++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/Demo/Resources/MediaDemoConfiguration.plist b/Demo/Resources/MediaDemoConfiguration.plist index cd612a07..0acb8e6c 100644 --- a/Demo/Resources/MediaDemoConfiguration.plist +++ b/Demo/Resources/MediaDemoConfiguration.plist @@ -108,7 +108,7 @@ name - RTS Info DVR + RTS Info LIVE urn urn:rts:video:1967124 @@ -154,30 +154,30 @@ name Scheduled livestreams summary - Simulated scheduled livestreams, like those supplied by SwissTXT for sports events. + Simulated scheduled livestreams, like those supplied by SwissTXT for sports events and LSVE for events. medias name - SwissTXT Full DVR + LiveCenter Full DVR urn - urn:rts:video:_rts_info_fulldvr + urn:rts:video:_couleur3_fulldvr service mmf name - SwissTXT Limited DVR + LiveCenter Limited DVR urn - urn:rts:video:_rts_info_liveonly_limiteddvr + urn:rts:video:_couleur3_liveonly_limiteddvr service mmf name - SwissTXT Live Only + LiveCenter Live Only urn - urn:rts:video:_rts_info_liveonly_delay + urn:rts:video:_couleur3_liveonly_delay service mmf @@ -185,7 +185,7 @@ name Scheduled livestream (100 days transition) urn - urn:rts:video:_rts_info_delay_100DAYS_ + urn:rts:video:_couleur3_delay_100DAYS_ service mmf @@ -193,7 +193,7 @@ name Scheduled livestream urn - urn:rts:video:_rts_info_delay + urn:rts:video:_couleur3_delay service mmf @@ -201,7 +201,7 @@ name Scheduled livestream (1 day transition) urn - urn:rts:video:_rts_info_delay_1DAY_ + urn:rts:video:_couleur3_delay_1DAY_ service mmf @@ -209,7 +209,7 @@ name Scheduled livestream (1 hour transition) urn - urn:rts:video:_rts_info_delay_1HOUR_ + urn:rts:video:_couleur3_delay_1HOUR_ service mmf @@ -217,7 +217,7 @@ name Scheduled livestream (start) urn - urn:rts:video:_rts_info_delay_START_ + urn:rts:video:_couleur3_delay_START_ service mmf @@ -225,7 +225,7 @@ name Scheduled livestream (soon expired) urn - urn:rts:video:_rts_info_delay_SOON_EXPIRED_ + urn:rts:video:_couleur3_delay_SOON_EXPIRED_ service mmf @@ -233,7 +233,7 @@ name Scheduled livestream with server cache urn - urn:rts:video:_rts_info_cacheddelay + urn:rts:video:_couleur3_cacheddelay service mmf @@ -241,7 +241,7 @@ name Scheduled livestream never playable urn - urn:rts:video:_rts_info_never + urn:rts:video:_couleur3_never service mmf @@ -249,7 +249,7 @@ name SwissTXT Full DVR with start date change urn - urn:rts:video:_rts_info_fulldvrstartdate + urn:rts:video:_couleur3_fulldvrstartdate service mmf @@ -278,7 +278,7 @@ name Temporary geoblocking urn - urn:rts:video:_rts_info_geoblocked + urn:rts:video:_couleur3_geoblocked service mmf @@ -286,7 +286,7 @@ name Temporary live-only restriction urn - urn:rts:video:_rts_info_killswitch + urn:rts:video:_couleur3_killswitch service mmf @@ -294,7 +294,7 @@ name Temporarily not found urn - urn:rts:video:_rts_info_notfound + urn:rts:video:_couleur3_notfound service mmf From 84d388244be0ff9cb1811dd41f867fdcbf02cfc2 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Tue, 14 Jun 2022 11:37:31 +0200 Subject: [PATCH 10/15] Disable a test due to missing test stream #270 --- .swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme | 3 +++ Tests/SRGLetterboxTests/SwissTXTTestCase.m | 1 + 2 files changed, 4 insertions(+) diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme index 540600c2..8af64b87 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/SRGLetterbox.xcscheme @@ -69,6 +69,9 @@ + + diff --git a/Tests/SRGLetterboxTests/SwissTXTTestCase.m b/Tests/SRGLetterboxTests/SwissTXTTestCase.m index 8297447f..64de5f29 100644 --- a/Tests/SRGLetterboxTests/SwissTXTTestCase.m +++ b/Tests/SRGLetterboxTests/SwissTXTTestCase.m @@ -38,6 +38,7 @@ - (void)tearDown - (void)testSkipToLiveForSwissTXTLimitedDVRStream { +#warning "This test has been disabled due to missing test stream. See issue #270" self.controller.updateInterval = 10.; self.controller.serviceURL = MMFServiceURL(); From b123380332207cbe9a9186d9b006dba68d0478b0 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Mon, 13 Jun 2022 18:17:41 +0200 Subject: [PATCH 11/15] Fastlane: set test language and test region --- fastlane/Fastfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index ea53a80e..821995a0 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -672,7 +672,7 @@ def srg_xcodebuild(device, test_build) end def srg_test_xcargs - '-retry-tests-on-failure' + '-retry-tests-on-failure -testLanguage en -testRegion en-US' end def srg_xcodebuild_workspace(test_build) From fac15eeb96136c7cf4e988216e708db1ebcf1fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20De=CC=81fago?= Date: Wed, 15 Jun 2022 11:46:04 +0200 Subject: [PATCH 12/15] Update release instructions --- docs/RELEASE_CHECKLIST.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/RELEASE_CHECKLIST.md b/docs/RELEASE_CHECKLIST.md index 87602a58..ffd3617b 100644 --- a/docs/RELEASE_CHECKLIST.md +++ b/docs/RELEASE_CHECKLIST.md @@ -21,7 +21,7 @@ To release an SRG SSR library, perform the following steps sequentially (some st - On _develop_, edit `Package.swift` to point at `.upToNextMinor(from:)` tagged versions of dependencies. - If there is a demo also ensure its dependencies (SPM, Carthage or CocoaPods depending on the kind of integration required) are also set to official tags. - Update packages for all projects (main framework of course, but also demo and test projects if they exist). Wait until package dependencies have been updated and build each project to ensure everything compiles successfully. Then commit the changes. -- Run swift linter and commit, if needed. `swiftlint --fix && swiftlint`. +- Run swift linter and fix if needed: `swiftlint --fix && swiftlint`. - Perform a global diff with the last release to verify changes. - Bump the library (and demo project, if any) versions in `Package.swift` (respectively `Demo.xcconfig`). Please observe [semantic versioning](https://semver.org) rules, as well as our [additional conventions](https://confluence.srg.beecollaboration.com/pages/viewpage.action?pageId=25624796): - If the deployment target of the library is changed, at least its minor version number must be updated. From da283cfed3979631dfe84434e0de79ae380a35f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20De=CC=81fago?= Date: Wed, 15 Jun 2022 11:48:22 +0200 Subject: [PATCH 13/15] Update dependencies to official releases --- .../xcshareddata/swiftpm/Package.resolved | 8 ++++---- Package.resolved | 8 ++++---- Package.swift | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Demo/SRGLetterbox-demo.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Demo/SRGLetterbox-demo.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2e628278..9ea9dda0 100644 --- a/Demo/SRGLetterbox-demo.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Demo/SRGLetterbox-demo.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -78,8 +78,8 @@ "repositoryURL": "https://github.com/SRGSSR/srganalytics-apple.git", "state": { "branch": null, - "revision": "5df56e21e23ffab0e7c8f374f440d6800227e985", - "version": "7.6.0" + "revision": "d0de40a67e2fb29765205620603b7e0b2973821b", + "version": "7.7.0" } }, { @@ -105,8 +105,8 @@ "repositoryURL": "https://github.com/SRGSSR/srgdataprovider-apple.git", "state": { "branch": null, - "revision": "cf802c734d42a5a40200ad21015524093b12f7bf", - "version": "14.0.0" + "revision": "d492e3b7c7ef6b4d4a9c37721897115fb5030dd0", + "version": "15.0.0" } }, { diff --git a/Package.resolved b/Package.resolved index 59545ef1..ee8504f0 100644 --- a/Package.resolved +++ b/Package.resolved @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/SRGSSR/srganalytics-apple.git", "state": { "branch": null, - "revision": "5df56e21e23ffab0e7c8f374f440d6800227e985", - "version": "7.6.0" + "revision": "d0de40a67e2fb29765205620603b7e0b2973821b", + "version": "7.7.0" } }, { @@ -87,8 +87,8 @@ "repositoryURL": "https://github.com/SRGSSR/srgdataprovider-apple.git", "state": { "branch": null, - "revision": "cf802c734d42a5a40200ad21015524093b12f7bf", - "version": "14.0.0" + "revision": "d492e3b7c7ef6b4d4a9c37721897115fb5030dd0", + "version": "15.0.0" } }, { diff --git a/Package.swift b/Package.swift index 59d703ec..e0a78d40 100644 --- a/Package.swift +++ b/Package.swift @@ -22,7 +22,7 @@ let package = Package( dependencies: [ .package(name: "FXReachability", url: "https://github.com/SRGSSR/FXReachability.git", .exact("1.3.2-srg5")), .package(name: "OHHTTPStubs", url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.0.0")), - .package(name: "SRGAnalytics", url: "https://github.com/SRGSSR/srganalytics-apple.git", .upToNextMajor(from: "7.6.0")), + .package(name: "SRGAnalytics", url: "https://github.com/SRGSSR/srganalytics-apple.git", .upToNextMajor(from: "7.7.0")), .package(name: "SRGAppearance", url: "https://github.com/SRGSSR/srgappearance-apple.git", .upToNextMinor(from: "5.1.0")), .package(name: "YYWebImage", url: "https://github.com/SRGSSR/YYWebImage.git", .exact("1.0.5-srg3")) ], From f8129b2d0c48df187f96700a11beb6f000e09ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20De=CC=81fago?= Date: Wed, 15 Jun 2022 11:50:26 +0200 Subject: [PATCH 14/15] Bump version number --- Demo/Xcode/Shared/Targets/Application.xcconfig | 2 +- Package.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Demo/Xcode/Shared/Targets/Application.xcconfig b/Demo/Xcode/Shared/Targets/Application.xcconfig index 99fe1609..66e5fc0b 100644 --- a/Demo/Xcode/Shared/Targets/Application.xcconfig +++ b/Demo/Xcode/Shared/Targets/Application.xcconfig @@ -1,7 +1,7 @@ #include "Xcode/Shared/Common.xcconfig" // Version information -MARKETING_VERSION = 8.0.1 +MARKETING_VERSION = 8.1.0 CURRENT_PROJECT_VERSION = 95 // Deployment targets diff --git a/Package.swift b/Package.swift index e0a78d40..acf039f0 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ import PackageDescription struct ProjectSettings { - static let marketingVersion: String = "8.0.1" + static let marketingVersion: String = "8.1.0" } let package = Package( From f375f14d69b3b36cf0819e5a2a6af2485008cb94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20De=CC=81fago?= Date: Wed, 15 Jun 2022 11:51:35 +0200 Subject: [PATCH 15/15] Update what's new --- WhatsNew-demo.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WhatsNew-demo.json b/WhatsNew-demo.json index 669d7a0d..0ac501d7 100644 --- a/WhatsNew-demo.json +++ b/WhatsNew-demo.json @@ -58,5 +58,6 @@ "7.4.0-91": "- Fix crash during continuous playback transitions on tvOS 15.2.\n- Fix countdown layout issue.", "7.5.0-92": "## Playback speed\n\n- On iOS, the settings button has playback speed, subtitles and audio tracks.\n- On tvOS, the playback speed can be selected using a dedicated button, like subtitles and audio tracks.\n\n## Seek preview (iOS only)\n\n- Seek preview automatically displayed when interacting with the slider.\n- The preview might not be available for old videos or depending on the kind of content protection (e.g. content protected by DRM).\n\n## Fixes (iOS only)\n\n- Avoid content overlaps during continuous playback transitions.\n- Fix slider up and down accessibility gestures.", "8.0.0-93": "## Modern gestures (iOS only)\n\n- Skip mode is entered by double-tapping the player once. This gesture can be followed by additional single taps to move further in time.\n- Content gravity is now managed with a pinch gesture and also provides a way to enter or exit full screen mode (provided the dedicated button is also available).\n- The skip and pinch gestures can be performed whether user interface controls are visible or not.\n- The forward skip buttons now move 10 seconds forward instead of 30 seconds. Control center behavior has been updated accordingly.\n\n## Improvements\n\n- Times displayed by a Letterbox view during DVR livestream playback are now always formatted in the Zurich timezone.\n- Age rating blocking reason messages have been updated.", - "8.0.0-94": "## Modern gestures (iOS only)\n\n- Skip mode is entered by double-tapping the player once. This gesture can be followed by additional single taps to move further in time.\n- Content gravity is now managed with a pinch gesture and also provides a way to enter or exit full screen mode (provided the dedicated button is also available).\n- The skip and pinch gestures can be performed whether user interface controls are visible or not.\n- The forward skip buttons now move 10 seconds forward instead of 30 seconds. Control center behavior has been updated accordingly.\n\n## Improvements\n\n- Times displayed by a Letterbox view during DVR livestream playback are now always formatted in the Zurich timezone.\n- Age rating blocking reason messages have been updated." + "8.0.0-94": "## Modern gestures (iOS only)\n\n- Skip mode is entered by double-tapping the player once. This gesture can be followed by additional single taps to move further in time.\n- Content gravity is now managed with a pinch gesture and also provides a way to enter or exit full screen mode (provided the dedicated button is also available).\n- The skip and pinch gestures can be performed whether user interface controls are visible or not.\n- The forward skip buttons now move 10 seconds forward instead of 30 seconds. Control center behavior has been updated accordingly.\n\n## Improvements\n\n- Times displayed by a Letterbox view during DVR livestream playback are now always formatted in the Zurich timezone.\n- Age rating blocking reason messages have been updated.", + "8.1.0-95": "- This releases is a maintenance release without visible changes." } \ No newline at end of file