Skip to content

Commit

Permalink
Merge branch 'hotfix/8.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
defagos committed Jul 18, 2022
2 parents 412acb0 + 2d1840a commit 6cea537
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
"repositoryURL": "https://github.com/SRGSSR/srgmediaplayer-apple.git",
"state": {
"branch": null,
"revision": "d97e45370d747c10c03341754af3741fafb6bf9f",
"version": "7.0.2"
"revision": "00ed47f86ac872d420583967e07e12fcbebaf8dc",
"version": "7.0.3"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Demo/Xcode/Shared/Targets/Application.xcconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "Xcode/Shared/Common.xcconfig"

// Version information
MARKETING_VERSION = 8.2.0
CURRENT_PROJECT_VERSION = 96
MARKETING_VERSION = 8.2.1
CURRENT_PROJECT_VERSION = 97

// Deployment targets
IPHONEOS_DEPLOYMENT_TARGET = 12.0
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
"repositoryURL": "https://github.com/SRGSSR/srgmediaplayer-apple.git",
"state": {
"branch": null,
"revision": "d97e45370d747c10c03341754af3741fafb6bf9f",
"version": "7.0.2"
"revision": "00ed47f86ac872d420583967e07e12fcbebaf8dc",
"version": "7.0.3"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import PackageDescription

struct ProjectSettings {
static let marketingVersion: String = "8.2.0"
static let marketingVersion: String = "8.2.1"
}

let package = Package(
Expand Down
54 changes: 27 additions & 27 deletions Sources/SRGLetterbox/SRGLetterboxView~ios.m
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ - (void)layoutPlayerViewInView:(UIView *)view
[self addGestureRecognizer:singleTapGestureRecognizer];
self.singleTapGestureRecognizer = singleTapGestureRecognizer;

SRGTapGestureRecognizer *doubleTapGestureRecognizer = [[SRGTapGestureRecognizer alloc] initWithTarget:self action:@selector(skipFromGestureRecognizer:)];
SRGTapGestureRecognizer *doubleTapGestureRecognizer = [[SRGTapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSkip:)];
doubleTapGestureRecognizer.numberOfTapsRequired = 2;
doubleTapGestureRecognizer.delaysTouchesEnded = NO;
doubleTapGestureRecognizer.tapDelay = 0.25;
[self addGestureRecognizer:doubleTapGestureRecognizer];
self.doubleTapGestureRecognizer = doubleTapGestureRecognizer;

UIPinchGestureRecognizer *videoGravityChangePinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinch:)];
UIPinchGestureRecognizer *videoGravityChangePinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handleVideoGravityPinch:)];
[self addGestureRecognizer:videoGravityChangePinchGestureRecognizer];
}

Expand Down Expand Up @@ -307,7 +307,6 @@ - (void)willMoveToWindow:(UIWindow *)newWindow
@weakify(self)
[self.controller addObserver:self keyPath:@keypath(SRGLetterboxController.new, mediaPlayerController.player.externalPlaybackActive) options:0 block:^(MAKVONotification *notification) {
@strongify(self)

// Called e.g. when the route is changed from the control center
[self showAirPlayNotificationMessageIfNeededAnimated:YES];
}];
Expand Down Expand Up @@ -591,7 +590,9 @@ - (BOOL)isLive
- (void)registerObservers
{
SRGLetterboxController *controller = self.controller;
@weakify(self)
[controller addObserver:self keyPath:@keypath(controller.loading) options:0 block:^(MAKVONotification *notification) {
@strongify(self)
[self setNeedsLayoutAnimated:YES];
}];

Expand Down Expand Up @@ -628,7 +629,6 @@ - (void)registerObservers

SRGMediaPlayerView *mediaPlayerView = mediaPlayerController.view;

@weakify(self)
[mediaPlayerView addObserver:self keyPath:@keypath(mediaPlayerView.readyForDisplay) options:0 block:^(MAKVONotification *notification) {
@strongify(self)
[self setNeedsLayoutAnimated:YES];
Expand Down Expand Up @@ -960,7 +960,7 @@ - (void)handleSingleTap:(UITapGestureRecognizer *)gestureRecognizer
switch (self.transientState) {
case SRGLetterboxViewTransientStateDoubleTapSkippingBackward:
case SRGLetterboxViewTransientStateDoubleTapSkippingForward: {
[self skipFromGestureRecognizer:gestureRecognizer];
[self handleSkip:gestureRecognizer];
break;
}

Expand All @@ -971,7 +971,7 @@ - (void)handleSingleTap:(UITapGestureRecognizer *)gestureRecognizer
}
}

- (void)skipFromGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
- (void)handleSkip:(UIGestureRecognizer *)gestureRecognizer
{
if (! self.userInterfaceTogglable && self.userInterfaceHidden) {
return;
Expand Down Expand Up @@ -1031,7 +1031,9 @@ - (void)resetTransientState
self.doubleTapSkipCount = 0;
}

- (void)handlePinch:(UIPinchGestureRecognizer *)gestureRecognizer
#pragma mark Actions

- (void)handleVideoGravityPinch:(UIPinchGestureRecognizer *)gestureRecognizer
{
if (gestureRecognizer.state == UIGestureRecognizerStateBegan) {
BOOL isZooming = (gestureRecognizer.scale > 1.f);
Expand All @@ -1054,15 +1056,31 @@ - (void)handlePinch:(UIPinchGestureRecognizer *)gestureRecognizer
}
}

#pragma mark Actions

- (void)toggleFullScreen:(id)sender
{
[self setFullScreen:! self.isFullScreen animated:YES];
}

#pragma mark SRGContinuousPlaybackViewDelegate protocol

- (void)continuousPlaybackView:(SRGContinuousPlaybackView *)continuousPlaybackView didEngageWithUpcomingMedia:(SRGMedia *)upcomingMedia
{
[self setTogglableUserInterfaceHidden:YES animated:NO];

if ([self.delegate respondsToSelector:@selector(letterboxView:didEngageInContinuousPlaybackWithUpcomingMedia:)]) {
[self.delegate letterboxView:self didEngageInContinuousPlaybackWithUpcomingMedia:upcomingMedia];
}
}

- (void)continuousPlaybackView:(SRGContinuousPlaybackView *)continuousPlaybackView didCancelWithUpcomingMedia:(SRGMedia *)upcomingMedia
{
if ([self.delegate respondsToSelector:@selector(letterboxView:didCancelContinuousPlaybackWithUpcomingMedia:)]) {
[self.delegate letterboxView:self didCancelContinuousPlaybackWithUpcomingMedia:upcomingMedia];
}
}

#pragma mark SRGControlsViewDelegate protocol

- (void)controlsView:(SRGControlsView *)controlsView didSelectPlaybackRate:(float)playbackRate
{
if ([self.delegate respondsToSelector:@selector(letterboxView:didSelectPlaybackRate:)]) {
Expand All @@ -1084,24 +1102,6 @@ - (void)controlsView:(SRGControlsView *)controlsView didSelectSubtitleLanguageCo
}
}

- (void)continuousPlaybackView:(SRGContinuousPlaybackView *)continuousPlaybackView didEngageWithUpcomingMedia:(SRGMedia *)upcomingMedia
{
[self setTogglableUserInterfaceHidden:YES animated:NO];

if ([self.delegate respondsToSelector:@selector(letterboxView:didEngageInContinuousPlaybackWithUpcomingMedia:)]) {
[self.delegate letterboxView:self didEngageInContinuousPlaybackWithUpcomingMedia:upcomingMedia];
}
}

- (void)continuousPlaybackView:(SRGContinuousPlaybackView *)continuousPlaybackView didCancelWithUpcomingMedia:(SRGMedia *)upcomingMedia
{
if ([self.delegate respondsToSelector:@selector(letterboxView:didCancelContinuousPlaybackWithUpcomingMedia:)]) {
[self.delegate letterboxView:self didCancelContinuousPlaybackWithUpcomingMedia:upcomingMedia];
}
}

#pragma mark SRGControlsViewDelegate protocol

- (BOOL)controlsViewShouldHideFullScreenButton:(SRGControlsView *)controlsView
{
return [self isFullScreenButtonHidden];
Expand Down
3 changes: 2 additions & 1 deletion WhatsNew-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
"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.1.0-95": "- This releases is a maintenance release without visible changes.",
"8.2.0-96": "- This demo application now supports 5 languages: Romansh, Italian, German, French and English.\n- Forced subtitles matching the currently selected audio language are automatically displayed.\n- Fix font weight on devices whose language is different from English."
"8.2.0-96": "- This demo application now supports 5 languages: Romansh, Italian, German, French and English.\n- Forced subtitles matching the currently selected audio language are automatically displayed.\n- Fix font weight on devices whose language is different from English.",
"8.2.1-97": "- This releases is a maintenance release without visible changes."
}

0 comments on commit 6cea537

Please sign in to comment.