diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md index 955e182a1ac..8d744b5a675 100644 --- a/packages/video_player/video_player_avfoundation/CHANGELOG.md +++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.5.0 + +* Adds support for macOS. + ## 2.4.11 * Updates Pigeon. diff --git a/packages/video_player/video_player_avfoundation/README.md b/packages/video_player/video_player_avfoundation/README.md index 58c4bbd6705..0e20e3a8c3a 100644 --- a/packages/video_player/video_player_avfoundation/README.md +++ b/packages/video_player/video_player_avfoundation/README.md @@ -1,6 +1,6 @@ # video\_player\_avfoundation -The iOS implementation of [`video_player`][1]. +The iOS and macOS implementation of [`video_player`][1]. ## Usage diff --git a/packages/video_player/video_player_avfoundation/ios/Assets/.gitkeep b/packages/video_player/video_player_avfoundation/darwin/Assets/.gitkeep similarity index 100% rename from packages/video_player/video_player_avfoundation/ios/Assets/.gitkeep rename to packages/video_player/video_player_avfoundation/darwin/Assets/.gitkeep diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.h b/packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.h similarity index 100% rename from packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.h rename to packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.h diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.m b/packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.m similarity index 100% rename from packages/video_player/video_player_avfoundation/ios/Classes/AVAssetTrackUtils.m rename to packages/video_player/video_player_avfoundation/darwin/Classes/AVAssetTrackUtils.m diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.h b/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.h similarity index 83% rename from packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.h rename to packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.h index b0ed49da22a..b64a173fe0c 100644 --- a/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.h +++ b/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.h @@ -2,7 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#if TARGET_OS_OSX +#import +#else #import +#endif @interface FVPVideoPlayerPlugin : NSObject - (instancetype)initWithRegistrar:(NSObject *)registrar; diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.m b/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.m similarity index 83% rename from packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.m rename to packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.m index 5b00ab87fd9..df39593d35d 100644 --- a/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin.m +++ b/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin.m @@ -18,7 +18,11 @@ @interface FVPFrameUpdater : NSObject @property(nonatomic) int64_t textureId; @property(nonatomic, weak, readonly) NSObject *registry; +// The output that this updater is managing. +@property(nonatomic, weak) AVPlayerItemVideoOutput *videoOutput; +#if TARGET_OS_IOS - (void)onDisplayLink:(CADisplayLink *)link; +#endif @end @implementation FVPFrameUpdater @@ -29,11 +33,34 @@ - (FVPFrameUpdater *)initWithRegistry:(NSObject *)regist return self; } +#if TARGET_OS_IOS - (void)onDisplayLink:(CADisplayLink *)link { + // TODO(stuartmorgan): Investigate switching this to displayLinkFired; iOS may also benefit from + // the availability check there. [_registry textureFrameAvailable:_textureId]; } +#endif + +- (void)displayLinkFired { + // Only report a new frame if one is actually available. + CMTime outputItemTime = [self.videoOutput itemTimeForHostTime:CACurrentMediaTime()]; + if ([self.videoOutput hasNewPixelBufferForItemTime:outputItemTime]) { + [_registry textureFrameAvailable:_textureId]; + } +} @end +#if TARGET_OS_OSX +static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeStamp *now, + const CVTimeStamp *outputTime, CVOptionFlags flagsIn, + CVOptionFlags *flagsOut, void *displayLinkSource) { + // Trigger the main-thread dispatch queue, to drive a frame update check. + __weak dispatch_source_t source = (__bridge dispatch_source_t)displayLinkSource; + dispatch_source_merge_data(source, 1); + return kCVReturnSuccess; +} +#endif + @interface FVPDefaultPlayerFactory : NSObject @end @@ -53,7 +80,10 @@ @interface FVPVideoPlayer : NSObject // An invisible AVPlayerLayer is used to overwrite the protection of pixel buffers in those streams // for issue #1, and restore the correct width and height for issue #2. @property(readonly, nonatomic) AVPlayerLayer *playerLayer; -@property(readonly, nonatomic) CADisplayLink *displayLink; +// The plugin registrar, to obtain view information from. +@property(nonatomic, weak) NSObject *registrar; +// The CALayer associated with the Flutter view this plugin is associated with, if any. +@property(nonatomic, readonly) CALayer *flutterViewLayer; @property(nonatomic) FlutterEventChannel *eventChannel; @property(nonatomic) FlutterEventSink eventSink; @property(nonatomic) CGAffineTransform preferredTransform; @@ -61,10 +91,22 @@ @interface FVPVideoPlayer : NSObject @property(nonatomic, readonly) BOOL isPlaying; @property(nonatomic) BOOL isLooping; @property(nonatomic, readonly) BOOL isInitialized; +// TODO(stuartmorgan): Extract and abstract the display link to remove all the display-link-related +// ifdefs from this file. +#if TARGET_OS_OSX +// The display link to trigger frame reads from the video player. +@property(nonatomic, assign) CVDisplayLinkRef displayLink; +// A dispatch source to move display link callbacks to the main thread. +@property(nonatomic, strong) dispatch_source_t displayLinkSource; +#else +@property(nonatomic) CADisplayLink *displayLink; +#endif + - (instancetype)initWithURL:(NSURL *)url frameUpdater:(FVPFrameUpdater *)frameUpdater httpHeaders:(nonnull NSDictionary *)headers - playerFactory:(id)playerFactory; + playerFactory:(id)playerFactory + registrar:(NSObject *)registrar; @end static void *timeRangeContext = &timeRangeContext; @@ -77,12 +119,27 @@ - (instancetype)initWithURL:(NSURL *)url @implementation FVPVideoPlayer - (instancetype)initWithAsset:(NSString *)asset frameUpdater:(FVPFrameUpdater *)frameUpdater - playerFactory:(id)playerFactory { + playerFactory:(id)playerFactory + registrar:(NSObject *)registrar { NSString *path = [[NSBundle mainBundle] pathForResource:asset ofType:nil]; +#if TARGET_OS_OSX + // See https://github.com/flutter/flutter/issues/135302 + // TODO(stuartmorgan): Remove this if the asset APIs are adjusted to work better for macOS. + if (!path) { + path = [NSURL URLWithString:asset relativeToURL:NSBundle.mainBundle.bundleURL].path; + } +#endif return [self initWithURL:[NSURL fileURLWithPath:path] frameUpdater:frameUpdater httpHeaders:@{} - playerFactory:playerFactory]; + playerFactory:playerFactory + registrar:registrar]; +} + +- (void)dealloc { + if (!_disposed) { + [self removeKeyValueObservers]; + } } - (void)addObserversForItem:(AVPlayerItem *)item player:(AVPlayer *)player { @@ -153,15 +210,6 @@ NS_INLINE CGFloat radiansToDegrees(CGFloat radians) { return degrees; }; -NS_INLINE UIViewController *rootViewController(void) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - // TODO: (hellohuanlin) Provide a non-deprecated codepath. See - // https://github.com/flutter/flutter/issues/104117 - return UIApplication.sharedApplication.keyWindow.rootViewController; -#pragma clang diagnostic pop -} - - (AVMutableVideoComposition *)getVideoCompositionWithTransform:(CGAffineTransform)transform withAsset:(AVAsset *)asset withVideoTrack:(AVAssetTrack *)videoTrack { @@ -202,31 +250,55 @@ - (void)createVideoOutputAndDisplayLink:(FVPFrameUpdater *)frameUpdater { }; _videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:pixBuffAttributes]; +#if TARGET_OS_OSX + frameUpdater.videoOutput = _videoOutput; + // Create and start the main-thread dispatch queue to drive frameUpdater. + self.displayLinkSource = + dispatch_source_create(DISPATCH_SOURCE_TYPE_DATA_ADD, 0, 0, dispatch_get_main_queue()); + dispatch_source_set_event_handler(self.displayLinkSource, ^() { + @autoreleasepool { + [frameUpdater displayLinkFired]; + } + }); + dispatch_resume(self.displayLinkSource); + if (CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink) == kCVReturnSuccess) { + CVDisplayLinkSetOutputCallback(_displayLink, &DisplayLinkCallback, + (__bridge void *)(self.displayLinkSource)); + } +#else _displayLink = [CADisplayLink displayLinkWithTarget:frameUpdater selector:@selector(onDisplayLink:)]; [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; _displayLink.paused = YES; +#endif } - (instancetype)initWithURL:(NSURL *)url frameUpdater:(FVPFrameUpdater *)frameUpdater httpHeaders:(nonnull NSDictionary *)headers - playerFactory:(id)playerFactory { + playerFactory:(id)playerFactory + registrar:(NSObject *)registrar { NSDictionary *options = nil; if ([headers count] != 0) { options = @{@"AVURLAssetHTTPHeaderFieldsKey" : headers}; } AVURLAsset *urlAsset = [AVURLAsset URLAssetWithURL:url options:options]; AVPlayerItem *item = [AVPlayerItem playerItemWithAsset:urlAsset]; - return [self initWithPlayerItem:item frameUpdater:frameUpdater playerFactory:playerFactory]; + return [self initWithPlayerItem:item + frameUpdater:frameUpdater + playerFactory:playerFactory + registrar:registrar]; } - (instancetype)initWithPlayerItem:(AVPlayerItem *)item frameUpdater:(FVPFrameUpdater *)frameUpdater - playerFactory:(id)playerFactory { + playerFactory:(id)playerFactory + registrar:(NSObject *)registrar { self = [super init]; NSAssert(self, @"super init cannot be nil"); + _registrar = registrar; + AVAsset *asset = [item asset]; void (^assetCompletionHandler)(void) = ^{ if ([asset statusOfValueForKey:@"tracks" error:nil] == AVKeyValueStatusLoaded) { @@ -265,7 +337,7 @@ - (instancetype)initWithPlayerItem:(AVPlayerItem *)item // invisible AVPlayerLayer is used to overwrite the protection of pixel buffers in those streams // for issue #1, and restore the correct width and height for issue #2. _playerLayer = [AVPlayerLayer playerLayerWithPlayer:_player]; - [rootViewController().view.layer addSublayer:_playerLayer]; + [self.flutterViewLayer addSublayer:_playerLayer]; [self createVideoOutputAndDisplayLink:frameUpdater]; @@ -350,7 +422,23 @@ - (void)updatePlayingState { } else { [_player pause]; } +#if TARGET_OS_OSX + if (_displayLink) { + if (_isPlaying) { + NSScreen *screen = self.registrar.view.window.screen; + if (screen) { + CGDirectDisplayID viewDisplayID = + (CGDirectDisplayID)[screen.deviceDescription[@"NSScreenNumber"] unsignedIntegerValue]; + CVDisplayLinkSetCurrentCGDisplay(_displayLink, viewDisplayID); + } + CVDisplayLinkStart(_displayLink); + } else { + CVDisplayLinkStop(_displayLink); + } + } +#else _displayLink.paused = !_isPlaying; +#endif } - (void)setupEventSinkIfReadyToPlay { @@ -515,14 +603,17 @@ - (void)disposeSansEventChannel { _disposed = YES; [_playerLayer removeFromSuperlayer]; +#if TARGET_OS_OSX + if (_displayLink) { + CVDisplayLinkStop(_displayLink); + CVDisplayLinkRelease(_displayLink); + _displayLink = NULL; + } + dispatch_source_cancel(_displayLinkSource); +#else [_displayLink invalidate]; - AVPlayerItem *currentItem = self.player.currentItem; - [currentItem removeObserver:self forKeyPath:@"status"]; - [currentItem removeObserver:self forKeyPath:@"loadedTimeRanges"]; - [currentItem removeObserver:self forKeyPath:@"presentationSize"]; - [currentItem removeObserver:self forKeyPath:@"duration"]; - [currentItem removeObserver:self forKeyPath:@"playbackLikelyToKeepUp"]; - [self.player removeObserver:self forKeyPath:@"rate"]; +#endif + [self removeKeyValueObservers]; [self.player replaceCurrentItemWithPlayerItem:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -533,6 +624,33 @@ - (void)dispose { [_eventChannel setStreamHandler:nil]; } +- (CALayer *)flutterViewLayer { +#if TARGET_OS_OSX + return self.registrar.view.layer; +#else +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + // TODO(hellohuanlin): Provide a non-deprecated codepath. See + // https://github.com/flutter/flutter/issues/104117 + UIViewController *root = UIApplication.sharedApplication.keyWindow.rootViewController; +#pragma clang diagnostic pop + return root.view.layer; +#endif +} + +/// Removes all key-value observers set up for the player. +/// +/// This is called from dealloc, so must not use any methods on self. +- (void)removeKeyValueObservers { + AVPlayerItem *currentItem = _player.currentItem; + [currentItem removeObserver:self forKeyPath:@"status"]; + [currentItem removeObserver:self forKeyPath:@"loadedTimeRanges"]; + [currentItem removeObserver:self forKeyPath:@"presentationSize"]; + [currentItem removeObserver:self forKeyPath:@"duration"]; + [currentItem removeObserver:self forKeyPath:@"playbackLikelyToKeepUp"]; + [_player removeObserver:self forKeyPath:@"rate"]; +} + @end @interface FVPVideoPlayerPlugin () @@ -547,7 +665,11 @@ @interface FVPVideoPlayerPlugin () @implementation FVPVideoPlayerPlugin + (void)registerWithRegistrar:(NSObject *)registrar { FVPVideoPlayerPlugin *instance = [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; +#if !TARGET_OS_OSX + // TODO(stuartmorgan): Remove the ifdef once >3.13 reaches stable. See + // https://github.com/flutter/flutter/issues/135320 [registrar publish:instance]; +#endif FVPAVFoundationVideoPlayerApiSetup(registrar.messenger, instance); } @@ -592,8 +714,10 @@ - (FVPTextureMessage *)onPlayerSetup:(FVPVideoPlayer *)player } - (void)initialize:(FlutterError *__autoreleasing *)error { +#if TARGET_OS_IOS // Allow audio playback when the Ring/Silent switch is set to silent [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; +#endif [self.playersByTextureId enumerateKeysAndObjectsUsingBlock:^(NSNumber *textureId, FVPVideoPlayer *player, BOOL *stop) { @@ -616,7 +740,8 @@ - (FVPTextureMessage *)create:(FVPCreateMessage *)input error:(FlutterError **)e @try { player = [[FVPVideoPlayer alloc] initWithAsset:assetPath frameUpdater:frameUpdater - playerFactory:_playerFactory]; + playerFactory:_playerFactory + registrar:self.registrar]; return [self onPlayerSetup:player frameUpdater:frameUpdater]; } @catch (NSException *exception) { *error = [FlutterError errorWithCode:@"video_player" message:exception.reason details:nil]; @@ -626,7 +751,8 @@ - (FVPTextureMessage *)create:(FVPCreateMessage *)input error:(FlutterError **)e player = [[FVPVideoPlayer alloc] initWithURL:[NSURL URLWithString:input.uri] frameUpdater:frameUpdater httpHeaders:input.httpHeaders - playerFactory:_playerFactory]; + playerFactory:_playerFactory + registrar:self.registrar]; return [self onPlayerSetup:player frameUpdater:frameUpdater]; } else { *error = [FlutterError errorWithCode:@"video_player" message:@"not implemented" details:nil]; @@ -702,6 +828,9 @@ - (void)pause:(FVPTextureMessage *)input error:(FlutterError **)error { - (void)setMixWithOthers:(FVPMixWithOthersMessage *)input error:(FlutterError *_Nullable __autoreleasing *)error { +#if TARGET_OS_OSX + // AVAudioSession doesn't exist on macOS, and audio always mixes, so just no-op. +#else if (input.mixWithOthers.boolValue) { [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers @@ -709,6 +838,7 @@ - (void)setMixWithOthers:(FVPMixWithOthersMessage *)input } else { [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil]; } +#endif } @end diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin_Test.h b/packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin_Test.h similarity index 100% rename from packages/video_player/video_player_avfoundation/ios/Classes/FVPVideoPlayerPlugin_Test.h rename to packages/video_player/video_player_avfoundation/darwin/Classes/FVPVideoPlayerPlugin_Test.h diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.h b/packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.h similarity index 100% rename from packages/video_player/video_player_avfoundation/ios/Classes/messages.g.h rename to packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.h diff --git a/packages/video_player/video_player_avfoundation/ios/Classes/messages.g.m b/packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.m similarity index 100% rename from packages/video_player/video_player_avfoundation/ios/Classes/messages.g.m rename to packages/video_player/video_player_avfoundation/darwin/Classes/messages.g.m diff --git a/packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m b/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m similarity index 87% rename from packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m rename to packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m index dbee6ac64f6..2ef7a2bdc9d 100644 --- a/packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m +++ b/packages/video_player/video_player_avfoundation/darwin/RunnerTests/VideoPlayerTests.m @@ -10,6 +10,15 @@ #import #import +// TODO(stuartmorgan): Convert to using mock registrars instead. +NSObject *GetPluginRegistry(void) { +#if TARGET_OS_IOS + return (NSObject *)[[UIApplication sharedApplication] delegate]; +#else + return (FlutterViewController *)NSApplication.sharedApplication.windows[0].contentViewController; +#endif +} + @interface FVPVideoPlayer : NSObject @property(readonly, nonatomic) AVPlayer *player; @property(readonly, nonatomic) AVPlayerLayer *playerLayer; @@ -23,6 +32,7 @@ @interface FVPVideoPlayerPlugin (Test) NSMutableDictionary *playersByTextureId; @end +#if TARGET_OS_IOS @interface FakeAVAssetTrack : AVAssetTrack @property(readonly, nonatomic) CGAffineTransform preferredTransform; @property(readonly, nonatomic) CGSize naturalSize; @@ -60,6 +70,7 @@ - (CGAffineTransform)preferredTransform { } @end +#endif @interface VideoPlayerTests : XCTestCase @end @@ -112,10 +123,8 @@ - (void)testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSom // video streams (not just iOS 16). (https://github.com/flutter/flutter/issues/109116). An // invisible AVPlayerLayer is used to overwrite the protection of pixel buffers in those streams // for issue #1, and restore the correct width and height for issue #2. - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = - [registry registrarForPlugin:@"testPlayerLayerWorkaround"]; + [GetPluginRegistry() registrarForPlugin:@"testPlayerLayerWorkaround"]; FVPVideoPlayerPlugin *videoPlayerPlugin = [[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; @@ -142,25 +151,24 @@ - (void)testBlankVideoBugWithEncryptedVideoStreamAndInvertedAspectRatioBugForSom - (void)testSeekToInvokesTextureFrameAvailableOnTextureRegistry { NSObject *mockTextureRegistry = OCMProtocolMock(@protocol(FlutterTextureRegistry)); - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = - [registry registrarForPlugin:@"SeekToInvokestextureFrameAvailable"]; + [GetPluginRegistry() registrarForPlugin:@"SeekToInvokestextureFrameAvailable"]; NSObject *partialRegistrar = OCMPartialMock(registrar); OCMStub([partialRegistrar textures]).andReturn(mockTextureRegistry); FVPVideoPlayerPlugin *videoPlayerPlugin = (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:partialRegistrar]; - FlutterError *error; - [videoPlayerPlugin initialize:&error]; - XCTAssertNil(error); + FlutterError *initalizationError; + [videoPlayerPlugin initialize:&initalizationError]; + XCTAssertNil(initalizationError); FVPCreateMessage *create = [FVPCreateMessage makeWithAsset:nil uri:@"https://flutter.github.io/assets-for-api-docs/assets/videos/hls/bee.m3u8" packageName:nil formatHint:nil httpHeaders:@{}]; - FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&error]; + FlutterError *createError; + FVPTextureMessage *textureMessage = [videoPlayerPlugin create:create error:&createError]; NSNumber *textureId = textureMessage.textureId; XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"seekTo completes"]; @@ -177,10 +185,8 @@ - (void)testSeekToInvokesTextureFrameAvailableOnTextureRegistry { } - (void)testDeregistersFromPlayer { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = - [registry registrarForPlugin:@"testDeregistersFromPlayer"]; + [GetPluginRegistry() registrarForPlugin:@"testDeregistersFromPlayer"]; FVPVideoPlayerPlugin *videoPlayerPlugin = (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; @@ -210,10 +216,8 @@ - (void)testDeregistersFromPlayer { } - (void)testBufferingStateFromPlayer { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = - [registry registrarForPlugin:@"testLiveStreamBufferEndFromPlayer"]; + [GetPluginRegistry() registrarForPlugin:@"testLiveStreamBufferEndFromPlayer"]; FVPVideoPlayerPlugin *videoPlayerPlugin = (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; @@ -256,9 +260,8 @@ - (void)testBufferingStateFromPlayer { } - (void)testVideoControls { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; - NSObject *registrar = [registry registrarForPlugin:@"TestVideoControls"]; + NSObject *registrar = + [GetPluginRegistry() registrarForPlugin:@"TestVideoControls"]; FVPVideoPlayerPlugin *videoPlayerPlugin = (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; @@ -272,9 +275,8 @@ - (void)testVideoControls { } - (void)testAudioControls { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; - NSObject *registrar = [registry registrarForPlugin:@"TestAudioControls"]; + NSObject *registrar = + [GetPluginRegistry() registrarForPlugin:@"TestAudioControls"]; FVPVideoPlayerPlugin *videoPlayerPlugin = (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; @@ -289,9 +291,8 @@ - (void)testAudioControls { } - (void)testHLSControls { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; - NSObject *registrar = [registry registrarForPlugin:@"TestHLSControls"]; + NSObject *registrar = + [GetPluginRegistry() registrarForPlugin:@"TestHLSControls"]; FVPVideoPlayerPlugin *videoPlayerPlugin = (FVPVideoPlayerPlugin *)[[FVPVideoPlayerPlugin alloc] initWithRegistrar:registrar]; @@ -304,6 +305,7 @@ - (void)testHLSControls { XCTAssertEqualWithAccuracy([videoInitialization[@"duration"] intValue], 4000, 200); } +#if TARGET_OS_IOS - (void)testTransformFix { [self validateTransformFixForOrientation:UIImageOrientationUp]; [self validateTransformFixForOrientation:UIImageOrientationDown]; @@ -314,11 +316,11 @@ - (void)testTransformFix { [self validateTransformFixForOrientation:UIImageOrientationLeftMirrored]; [self validateTransformFixForOrientation:UIImageOrientationRightMirrored]; } +#endif - (void)testSeekToleranceWhenNotSeekingToEnd { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; - NSObject *registrar = [registry registrarForPlugin:@"TestSeekTolerance"]; + NSObject *registrar = + [GetPluginRegistry() registrarForPlugin:@"TestSeekTolerance"]; StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; StubFVPPlayerFactory *stubFVPPlayerFactory = @@ -326,9 +328,9 @@ - (void)testSeekToleranceWhenNotSeekingToEnd { FVPVideoPlayerPlugin *pluginWithMockAVPlayer = [[FVPVideoPlayerPlugin alloc] initWithPlayerFactory:stubFVPPlayerFactory registrar:registrar]; - FlutterError *error; - [pluginWithMockAVPlayer initialize:&error]; - XCTAssertNil(error); + FlutterError *initializationError; + [pluginWithMockAVPlayer initialize:&initializationError]; + XCTAssertNil(initializationError); FVPCreateMessage *create = [FVPCreateMessage makeWithAsset:nil @@ -336,7 +338,8 @@ - (void)testSeekToleranceWhenNotSeekingToEnd { packageName:nil formatHint:nil httpHeaders:@{}]; - FVPTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&error]; + FlutterError *createError; + FVPTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&createError]; NSNumber *textureId = textureMessage.textureId; XCTestExpectation *initializedExpectation = @@ -353,10 +356,8 @@ - (void)testSeekToleranceWhenNotSeekingToEnd { } - (void)testSeekToleranceWhenSeekingToEnd { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = - [registry registrarForPlugin:@"TestSeekToEndTolerance"]; + [GetPluginRegistry() registrarForPlugin:@"TestSeekToEndTolerance"]; StubAVPlayer *stubAVPlayer = [[StubAVPlayer alloc] init]; StubFVPPlayerFactory *stubFVPPlayerFactory = @@ -364,9 +365,9 @@ - (void)testSeekToleranceWhenSeekingToEnd { FVPVideoPlayerPlugin *pluginWithMockAVPlayer = [[FVPVideoPlayerPlugin alloc] initWithPlayerFactory:stubFVPPlayerFactory registrar:registrar]; - FlutterError *error; - [pluginWithMockAVPlayer initialize:&error]; - XCTAssertNil(error); + FlutterError *initializationError; + [pluginWithMockAVPlayer initialize:&initializationError]; + XCTAssertNil(initializationError); FVPCreateMessage *create = [FVPCreateMessage makeWithAsset:nil @@ -374,7 +375,8 @@ - (void)testSeekToleranceWhenSeekingToEnd { packageName:nil formatHint:nil httpHeaders:@{}]; - FVPTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&error]; + FlutterError *createError; + FVPTextureMessage *textureMessage = [pluginWithMockAVPlayer create:create error:&createError]; NSNumber *textureId = textureMessage.textureId; XCTestExpectation *initializedExpectation = @@ -449,13 +451,11 @@ - (void)testSeekToleranceWhenSeekingToEnd { // // Failing to de-register results in a crash in [AVPlayer willChangeValueForKey:]. - (void)testDoesNotCrashOnRateObservationAfterDisposal { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = - [registry registrarForPlugin:@"testDoesNotCrashOnRateObservationAfterDisposal"]; + [GetPluginRegistry() registrarForPlugin:@"testDoesNotCrashOnRateObservationAfterDisposal"]; AVPlayer *avPlayer = nil; - __weak FVPVideoPlayer *player = nil; + __weak FVPVideoPlayer *weakPlayer = nil; // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation. @autoreleasepool { @@ -476,8 +476,9 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { XCTAssertNil(error); XCTAssertNotNil(textureMessage); - player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId]; + FVPVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId]; XCTAssertNotNil(player); + weakPlayer = player; avPlayer = player.player; [videoPlayerPlugin dispose:textureMessage error:&error]; @@ -487,9 +488,12 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { // [FVPVideoPlayerPlugin dispose:error:] selector is dispatching the [FVPVideoPlayer dispose] call // with a 1-second delay keeping a strong reference to the player. The polling ensures the player // was truly deallocated. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" [self expectationForPredicate:[NSPredicate predicateWithFormat:@"self != nil"] - evaluatedWithObject:player + evaluatedWithObject:weakPlayer handler:nil]; +#pragma clang diagnostic pop [self waitForExpectationsWithTimeout:10.0 handler:nil]; [avPlayer willChangeValueForKey:@"rate"]; // No assertions needed. Lack of crash is a success. @@ -502,12 +506,10 @@ - (void)testDoesNotCrashOnRateObservationAfterDisposal { // Both of these methods dispatch [FVPVideoPlayer dispose] on the main thread // leading to a possible crash when de-registering observers twice. - (void)testHotReloadDoesNotCrash { - NSObject *registry = - (NSObject *)[[UIApplication sharedApplication] delegate]; NSObject *registrar = - [registry registrarForPlugin:@"testHotReloadDoesNotCrash"]; + [GetPluginRegistry() registrarForPlugin:@"testHotReloadDoesNotCrash"]; - __weak FVPVideoPlayer *player = nil; + __weak FVPVideoPlayer *weakPlayer = nil; // Autoreleasepool is needed to simulate conditions of FVPVideoPlayer deallocation. @autoreleasepool { @@ -528,8 +530,9 @@ - (void)testHotReloadDoesNotCrash { XCTAssertNil(error); XCTAssertNotNil(textureMessage); - player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId]; + FVPVideoPlayer *player = videoPlayerPlugin.playersByTextureId[textureMessage.textureId]; XCTAssertNotNil(player); + weakPlayer = player; [player onTextureUnregistered:nil]; XCTAssertNil(error); @@ -541,13 +544,17 @@ - (void)testHotReloadDoesNotCrash { // [FVPVideoPlayerPlugin dispose:error:] selector is dispatching the [FVPVideoPlayer dispose] call // with a 1-second delay keeping a strong reference to the player. The polling ensures the player // was truly deallocated. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Warc-repeated-use-of-weak" [self expectationForPredicate:[NSPredicate predicateWithFormat:@"self != nil"] - evaluatedWithObject:player + evaluatedWithObject:weakPlayer handler:nil]; +#pragma clang diagnostic pop [self waitForExpectationsWithTimeout:10.0 handler:nil]; // No assertions needed. Lack of crash is a success. } +#if TARGET_OS_IOS - (void)validateTransformFixForOrientation:(UIImageOrientation)orientation { AVAssetTrack *track = [[FakeAVAssetTrack alloc] initWithOrientation:orientation]; CGAffineTransform t = FVPGetStandardizedTransformForTrack(track); @@ -590,5 +597,6 @@ - (void)validateTransformFixForOrientation:(UIImageOrientation)orientation { XCTAssertEqual(t.tx, expectX); XCTAssertEqual(t.ty, expectY); } +#endif @end diff --git a/packages/video_player/video_player_avfoundation/ios/video_player_avfoundation.podspec b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation.podspec similarity index 87% rename from packages/video_player/video_player_avfoundation/ios/video_player_avfoundation.podspec rename to packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation.podspec index 7e925795b17..3f873fc9a40 100644 --- a/packages/video_player/video_player_avfoundation/ios/video_player_avfoundation.podspec +++ b/packages/video_player/video_player_avfoundation/darwin/video_player_avfoundation.podspec @@ -16,8 +16,9 @@ Downloaded by pub (not CocoaPods). s.documentation_url = 'https://pub.dev/packages/video_player' s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' - s.dependency 'Flutter' - - s.platform = :ios, '11.0' + s.ios.dependency 'Flutter' + s.osx.dependency 'FlutterMacOS' + s.ios.deployment_target = '11.0' + s.osx.deployment_target = '10.14' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } end diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj index 5f6d3414a5b..62e62758345 100644 --- a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/project.pbxproj @@ -75,7 +75,7 @@ F7151F2E26603EBD0028CB91 /* VideoPlayerUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoPlayerUITests.m; sourceTree = ""; }; F7151F3026603EBD0028CB91 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F7151F3A26603ECA0028CB91 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - F7151F3C26603ECA0028CB91 /* VideoPlayerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoPlayerTests.m; sourceTree = ""; }; + F7151F3C26603ECA0028CB91 /* VideoPlayerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = VideoPlayerTests.m; path = ../../../darwin/RunnerTests/VideoPlayerTests.m; sourceTree = ""; }; F7151F3E26603ECA0028CB91 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ @@ -269,7 +269,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = "The Flutter Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -588,7 +588,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -609,7 +612,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -624,7 +630,11 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = RunnerUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerUITests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -637,7 +647,11 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = RunnerUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerUITests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -652,7 +666,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = RunnerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -667,7 +685,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = RunnerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 0632b6533bc..d72cd8b8010 100644 --- a/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/video_player/video_player_avfoundation/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + pod 'OCMock', '3.9.1' + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..b43b5503c9c --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,813 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 18AD5E2A5B24DAFCF3749529 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7FA146FB7E9341C7D2257338 /* Pods_RunnerTests.framework */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33683FF12ABCAC94007305E4 /* VideoPlayerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33683FF02ABCAC94007305E4 /* VideoPlayerTests.m */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + C000184E56E3386C22EF683A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC60543320154AF9A465D416 /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 02C27A1B6E2107E1180C7844 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 044AB83CB7314E1A17E5664E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33683FF02ABCAC94007305E4 /* VideoPlayerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VideoPlayerTests.m; path = ../../../darwin/RunnerTests/VideoPlayerTests.m; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* video_player_avfoundation_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = video_player_avfoundation_example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 6219A9055D27630C4A195F9E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 7FA146FB7E9341C7D2257338 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 88628E8F00815A73ED1C8120 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + C6A82353943E29605DBDFCE3 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + CC60543320154AF9A465D416 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E2FB7E9AE1C550EE55EE6D27 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 18AD5E2A5B24DAFCF3749529 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C000184E56E3386C22EF683A /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 33683FF02ABCAC94007305E4 /* VideoPlayerTests.m */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 628924301D1755B9EF85E51F /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* video_player_avfoundation_example.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + 628924301D1755B9EF85E51F /* Pods */ = { + isa = PBXGroup; + children = ( + 88628E8F00815A73ED1C8120 /* Pods-Runner.debug.xcconfig */, + 6219A9055D27630C4A195F9E /* Pods-Runner.release.xcconfig */, + 044AB83CB7314E1A17E5664E /* Pods-Runner.profile.xcconfig */, + E2FB7E9AE1C550EE55EE6D27 /* Pods-RunnerTests.debug.xcconfig */, + C6A82353943E29605DBDFCE3 /* Pods-RunnerTests.release.xcconfig */, + 02C27A1B6E2107E1180C7844 /* Pods-RunnerTests.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + CC60543320154AF9A465D416 /* Pods_Runner.framework */, + 7FA146FB7E9341C7D2257338 /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 5121AE1943D8EE14C90ED8B7 /* [CP] Check Pods Manifest.lock */, + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + 0D0E54DEED2C6FB4DAE44CD9 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + D3E396DFBCC51886820113AA /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + C24F02DB02736B93EB0B2096 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* video_player_avfoundation_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + LastSwiftMigration = 1500; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 0D0E54DEED2C6FB4DAE44CD9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RunnerTests/Pods-RunnerTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + 5121AE1943D8EE14C90ED8B7 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C24F02DB02736B93EB0B2096 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + D3E396DFBCC51886820113AA /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33683FF12ABCAC94007305E4 /* VideoPlayerTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E2FB7E9AE1C550EE55EE6D27 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.videoPlayerAvfoundationExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/video_player_avfoundation_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/video_player_avfoundation_example"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C6A82353943E29605DBDFCE3 /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.videoPlayerAvfoundationExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/video_player_avfoundation_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/video_player_avfoundation_example"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 02C27A1B6E2107E1180C7844 /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.videoPlayerAvfoundationExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/video_player_avfoundation_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/video_player_avfoundation_example"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 00000000000..cb4090c1270 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..21a3cc14c74 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000000..18d981003d6 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/AppDelegate.swift b/packages/video_player/video_player_avfoundation/example/macos/Runner/AppDelegate.swift new file mode 100644 index 00000000000..5cec4c48f62 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..a2ec33f19f1 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 00000000000..82b6f9d9a33 Binary files /dev/null and b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 00000000000..13b35eba55c Binary files /dev/null and b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 00000000000..0a3f5fa40fb Binary files /dev/null and b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 00000000000..bdb57226d5f Binary files /dev/null and b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 00000000000..f083318e09c Binary files /dev/null and b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 00000000000..326c0e72c9d Binary files /dev/null and b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 00000000000..2f1632cfddf Binary files /dev/null and b/packages/video_player/video_player_avfoundation/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Base.lproj/MainMenu.xib b/packages/video_player/video_player_avfoundation/example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 00000000000..80e867a4e06 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 00000000000..8ad5fb7b711 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = video_player_avfoundation_example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.videoPlayerAvfoundationExample + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2023 dev.flutter. All rights reserved. diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Debug.xcconfig b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 00000000000..36b0fd9464f --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Release.xcconfig b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 00000000000..dff4f49561c --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Warnings.xcconfig b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 00000000000..42bcbf4780b --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/DebugProfile.entitlements b/packages/video_player/video_player_avfoundation/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 00000000000..3ba6c1266f2 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Info.plist b/packages/video_player/video_player_avfoundation/example/macos/Runner/Info.plist new file mode 100644 index 00000000000..4789daa6a44 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/MainFlutterWindow.swift b/packages/video_player/video_player_avfoundation/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 00000000000..f21908966e9 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,19 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/packages/video_player/video_player_avfoundation/example/macos/Runner/Release.entitlements b/packages/video_player/video_player_avfoundation/example/macos/Runner/Release.entitlements new file mode 100644 index 00000000000..ee95ab7e582 --- /dev/null +++ b/packages/video_player/video_player_avfoundation/example/macos/Runner/Release.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/packages/video_player/video_player_avfoundation/example/pubspec.yaml b/packages/video_player/video_player_avfoundation/example/pubspec.yaml index b18178a61e7..9b13d500625 100644 --- a/packages/video_player/video_player_avfoundation/example/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the video_player plugin. publish_to: none environment: - sdk: ">=2.19.0 <4.0.0" - flutter: ">=3.7.0" + sdk: ">=3.1.0 <4.0.0" + flutter: ">=3.13.0" dependencies: flutter: diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml index eb4292c05ce..31e6b1696d8 100644 --- a/packages/video_player/video_player_avfoundation/pubspec.yaml +++ b/packages/video_player/video_player_avfoundation/pubspec.yaml @@ -1,12 +1,12 @@ name: video_player_avfoundation -description: iOS implementation of the video_player plugin. +description: iOS and macOS implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_avfoundation issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.4.11 +version: 2.5.0 environment: - sdk: ">=2.19.0 <4.0.0" - flutter: ">=3.7.0" + sdk: ">=3.1.0 <4.0.0" + flutter: ">=3.13.0" flutter: plugin: @@ -15,6 +15,11 @@ flutter: ios: dartPluginClass: AVFoundationVideoPlayer pluginClass: FVPVideoPlayerPlugin + sharedDarwinSource: true + macos: + dartPluginClass: AVFoundationVideoPlayer + pluginClass: FVPVideoPlayerPlugin + sharedDarwinSource: true dependencies: flutter: