Skip to content

Commit 49080e1

Browse files
committed
Merge branch 'release-6.6.3-b'
2 parents 00b564c + d31447a commit 49080e1

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

docs/notes/bugfix-13354.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# App store no longer allows use of deprecated MPMoviePlayerContentPreloadDidFinishNotification

engine/src/mbliphonevideo.mm

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ @interface FullscreenMovieDelegate : NSObject
6464
UIControl *m_overlay;
6565
}
6666

67-
- (id)init;
67+
- (id)initWithPlayer;
6868
- (void)dealloc;
6969

7070
- (void)begin: (bool)p_add_overlay;
@@ -80,7 +80,8 @@ - (void)movieWindowTouched: (UIControl*) p_sender;
8080

8181
@implementation FullscreenMovieDelegate
8282

83-
- (id)init
83+
// AL-2014-09-09: [[ Bug 13354 ]] Replace deprecated MPMoviePlayerContentPreloadDidFinishNotification
84+
- (id)initWithPlayer: (MPMoviePlayerController *)p_player
8485
{
8586
self = [super init];
8687
if (self == nil)
@@ -90,11 +91,11 @@ - (id)init
9091
selector:@selector(movieFinished:)
9192
name:MPMoviePlayerPlaybackDidFinishNotification
9293
object:nil];
93-
94+
9495
[[NSNotificationCenter defaultCenter] addObserver:self
9596
selector:@selector(moviePreloadFinished:)
96-
name:MPMoviePlayerContentPreloadDidFinishNotification
97-
object:nil];
97+
name:MPMoviePlayerLoadStateDidChangeNotification
98+
object:p_player];
9899

99100
m_running = true;
100101
m_overlay = nil;
@@ -159,7 +160,8 @@ - (void)movieFinished: (NSNotification *) p_notification
159160

160161
- (void)moviePreloadFinished: (NSNotification *) p_notification
161162
{
162-
if ([[p_notification userInfo] objectForKey: @"error"] != nil)
163+
// AL-2014-09-09: [[ Bug 13354 ]] Replace deprecated MPMoviePlayerContentPreloadDidFinishNotification
164+
if ([[p_notification object] loadState] & MPMovieLoadStateUnknown)
163165
{
164166
m_running = false;
165167

@@ -240,7 +242,7 @@ static void play_fullscreen_movie_prewait(void *p_context)
240242

241243
configure_playback_range(ctxt -> movie_player);
242244

243-
ctxt -> delegate = [[FullscreenMovieDelegate alloc] init];
245+
ctxt -> delegate = [[FullscreenMovieDelegate alloc] initWithPlayer:ctxt -> movie_player];
244246

245247
// Present the view controller and get the delegate to setup its overlay
246248
// if needed.

version

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
BUILD_REVISION = 4012
1+
BUILD_REVISION = 4020
22
BUILD_MAJOR_VERSION = 6
33
BUILD_MINOR_VERSION = 6
4-
BUILD_POINT_VERSION = 2
5-
BUILD_SHORT_VERSION = 6.6.2
6-
BUILD_LONG_VERSION = 6.6.2.4012
4+
BUILD_POINT_VERSION = 3
5+
BUILD_SHORT_VERSION = 6.6.3
6+
BUILD_LONG_VERSION = 6.6.3.4020

0 commit comments

Comments
 (0)