peachsim 0.1.1808 → 0.1.1812
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/cli/app-bundle-resources.ts +15 -2
- package/cli/cloud-box-artifact.ts +115 -0
- package/cli/cloud-client.ts +148 -76
- package/cli/cloud-dispatch.ts +4 -4
- package/cli/cloud-session.ts +60 -22
- package/cli/commands/box.ts +8 -2
- package/cli/commands/compat.ts +7 -4
- package/cli/commands/control.ts +69 -3
- package/cli/commands/coverage.ts +14 -4
- package/cli/commands/daemon.ts +41 -0
- package/cli/commands/no-bridge-hint.ts +9 -0
- package/cli/commands/package.ts +31 -56
- package/cli/commands/platform.ts +71 -60
- package/cli/commands/preview.ts +73 -24
- package/cli/commands/record.ts +10 -2
- package/cli/commands/screenshot.ts +17 -60
- package/cli/commands/setup.ts +3 -1
- package/cli/commands/three-mode.ts +22 -12
- package/cli/commands/upload.ts +2 -1
- package/cli/desktop-companion.ts +6 -1
- package/cli/drivers/desktop.ts +4 -1
- package/cli/main.ts +12 -2
- package/cli/metro-bundle-assets.ts +14 -4
- package/cli/outbound-endpoints.ts +7 -3
- package/cli/output-redaction.ts +38 -0
- package/cli/privacy.ts +2 -2
- package/cli/recording-access.ts +5 -0
- package/cli/remote-project-bundle.ts +83 -0
- package/cli/shell-init.ts +7 -11
- package/cli/telemetry.ts +41 -4
- package/cli/usage-error.ts +3 -0
- package/cli/ws-bridge.ts +42 -6
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +42897 -40755
- package/dist-lib/capture-contract.cjs +7 -8
- package/dist-lib/capture-contract.mjs +7 -8
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +13 -7
- package/dist-lib/dev-bundle-resolution.cjs +10 -4
- package/dist-lib/expo-swift-bundle.cjs +15889 -15553
- package/dist-lib/expo-swift-metadata.cjs +2 -1
- package/dist-lib/expo-swift-metadata.mjs +2 -1
- package/dist-lib/home-paths.cjs +2 -33
- package/dist-lib/host/bridge-host.cjs +20891 -18714
- package/dist-lib/host/fetch-proxy-handler.cjs +10 -11
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +620 -553
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +57 -28
- package/dist-lib/native-app-identity-project.cjs +47 -14
- package/dist-lib/native-app-identity-project.mjs +55 -20
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +27 -26
- package/dist-lib/public-origins-lib.json +104 -81
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +30700 -24410
- package/dist-lib/swift-compile.cjs +336 -222
- package/dist-lib/swift-compile.mjs +378 -263
- package/dist-lib/swift-package.cjs +19 -7
- package/dist-lib/swift-package.mjs +16 -6
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +49 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +19213 -18937
- package/dist-lib/vite.cjs +11 -12
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/animated.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/engine/animation-graph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/expo-manifest.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/preview/upload-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +8 -1
- package/dist-types/packages/peach-globals/src/electronBridgeContract.d.ts +2 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCall.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCallCenter.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriber.h +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriberInfo.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSDictionary.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSExtensionItem.h +1 -1
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/AVFoundation+MPNowPlayingInfoLanguageOptionAdditions.h +39 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/AVPlayerItem+MediaPlayerAdditions.h +26 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPContentItem.h +67 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPError.h +33 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaEntity.h +53 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaItem.h +346 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaItemCollection.h +42 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaLibrary.h +76 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPickerController.h +64 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPlayback.h +47 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaPlaylist.h +82 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaQuery.h +120 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMediaQuerySection.h +26 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerController.h +444 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMoviePlayerViewController.h +43 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerApplicationController.h +47 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerController.h +147 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerQueueDescriptor.h +75 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h +197 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoLanguageOption.h +107 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingSession.h +89 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentDataSource.h +59 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentDelegate.h +64 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentManager.h +46 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPPlayableContentManagerContext.h +32 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommand.h +143 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommandCenter.h +66 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteCommandEvent.h +128 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPRemoteControlTypes.h +27 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPVolumeSettings.h +20 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPVolumeView.h +82 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayer.apinotes +74 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayer.h +40 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MediaPlayerDefines.h +84 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/NSUserActivity+MediaPlayerAdditions.h +20 -0
- package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityCustomRotor.h +2 -2
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBackgroundConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIButtonConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIContextMenuConfiguration.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIContextMenuInteraction.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDeferredMenuElement.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIMenu.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPointerStyle.h +5 -5
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISlider.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewController.h +12 -50
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISplitViewControllerLayoutEnvironment.h +2 -8
- package/sdk/ios/System/Library/Frameworks/UIKitTypes.framework/Headers/UIKitTypes.h +62 -0
- package/sdk/ios/usr/include/dispatch.modulemap +22 -0
- package/sdk/ios/usr/include/module.modulemap +8 -3
- package/sdk/ios/usr/include/net/if.h +24 -0
- package/sdk/ios/usr/include/sys/time.h +1 -1
- package/sdk/ios/usr/lib/swift/Foundation.swiftmodule/arm64-apple-ios-simulator.swiftinterface +265 -0
- package/sdk/ios/usr/lib/swift/ObjectiveC.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -0
- package/sdk/ios/wasm/include/fcntl.h +2 -0
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/stdlib.h +2 -0
- package/sdk/ios/wasm/include/unistd.h +2 -2
- package/skills/contrast/SKILL.md +2 -2
- package/src/bundle-channel.mjs +9 -72
- package/src/capture-contract.ts +12 -9
- package/src/desktop-host-delivery.ts +16 -2
- package/src/dev-bundle-resolution.ts +12 -3
- package/src/expo-native-workspace.ts +113 -46
- package/src/expo-swift-host.ts +17 -12
- package/src/expo-swift-ready.ts +4 -1
- package/src/expoSwiftContract.ts +1 -0
- package/src/home-paths.ts +4 -48
- package/src/host/bridge-host.ts +1 -0
- package/src/installed-native-libraries.ts +2 -8
- package/src/metro-project-root.ts +2 -1
- package/src/native-bundles.ts +122 -0
- package/src/native-static-libraries.ts +65 -8
- package/src/nitro-adapter.lock.json +272 -272
- package/src/nitro-bundle.ts +2 -2
- package/src/nitro-compile.ts +68 -28
- package/src/nitro-source.ts +24 -6
- package/src/nitro-superset.lock.json +94 -34
- package/src/nitroContract.ts +3 -0
- package/src/podspec-sources.ts +1966 -0
- package/src/storageSnapshotContract.ts +40 -0
- package/src/swift-compile.ts +77 -26
- package/src/swift-design-time.ts +18 -1
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-distribution.ts +9 -6
- package/src/swift-host.ts +1 -2
- package/src/swift-link-roots.ts +13 -2
- package/src/swift-objc-compile.ts +12 -0
- package/src/swift-objc-standin.ts +321 -114
- package/src/swift-package-manifest.ts +4 -3
- package/src/swift-package.ts +31 -4
- package/src/swift-root-lock.ts +11 -0
- package/src/swift-shared-sdk.ts +10 -9
- package/src/swift-source-pods.ts +2 -2
- package/src/swift-standins.ts +40 -143
- package/src/swift-toolchain.ts +59 -0
- package/src/swift-wasm-prune.ts +53 -21
- package/src/turbo-bundle.ts +4 -5
- package/src/turbo-codegen-intake.ts +111 -108
- package/src/turbo-compile.ts +63 -33
- package/src/turbo-runtime.lock.json +22 -22
- package/src/turbo-source.ts +171 -76
- package/src/wasm-optimize.ts +31 -2
- package/src/xcode-project.ts +65 -15
package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPMusicPlayerController.h
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MPMusicPlayerController.h
|
|
3
|
+
// MediaPlayer
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2008-2017 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <MediaPlayer/MediaPlayerDefines.h>
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <MediaPlayer/MPMediaItemCollection.h>
|
|
11
|
+
#import <MediaPlayer/MPMediaItem.h>
|
|
12
|
+
#import <MediaPlayer/MPMediaQuery.h>
|
|
13
|
+
#import <MediaPlayer/MPMediaPlayback.h>
|
|
14
|
+
#import <MediaPlayer/MPMusicPlayerQueueDescriptor.h>
|
|
15
|
+
|
|
16
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
17
|
+
|
|
18
|
+
@class MPMusicPlayerApplicationController;
|
|
19
|
+
|
|
20
|
+
typedef NS_ENUM(NSInteger, MPMusicPlaybackState) {
|
|
21
|
+
MPMusicPlaybackStateStopped,
|
|
22
|
+
MPMusicPlaybackStatePlaying,
|
|
23
|
+
MPMusicPlaybackStatePaused,
|
|
24
|
+
MPMusicPlaybackStateInterrupted,
|
|
25
|
+
MPMusicPlaybackStateSeekingForward,
|
|
26
|
+
MPMusicPlaybackStateSeekingBackward
|
|
27
|
+
} MP_API(ios(3.0), tvos(14.0)) API_UNAVAILABLE(watchos, macos);
|
|
28
|
+
|
|
29
|
+
typedef NS_ENUM(NSInteger, MPMusicRepeatMode) {
|
|
30
|
+
MPMusicRepeatModeDefault, // the user's preference for repeat mode
|
|
31
|
+
MPMusicRepeatModeNone,
|
|
32
|
+
MPMusicRepeatModeOne,
|
|
33
|
+
MPMusicRepeatModeAll
|
|
34
|
+
} MP_API(ios(3.0), tvos(14.0)) API_UNAVAILABLE(watchos, macos);
|
|
35
|
+
|
|
36
|
+
typedef NS_ENUM(NSInteger, MPMusicShuffleMode) {
|
|
37
|
+
MPMusicShuffleModeDefault, // the user's preference for shuffle mode
|
|
38
|
+
MPMusicShuffleModeOff,
|
|
39
|
+
MPMusicShuffleModeSongs,
|
|
40
|
+
MPMusicShuffleModeAlbums
|
|
41
|
+
} MP_API(ios(3.0), tvos(14.0)) API_UNAVAILABLE(watchos, macos);
|
|
42
|
+
|
|
43
|
+
@protocol MPSystemMusicPlayerController <NSObject>
|
|
44
|
+
|
|
45
|
+
/// Switches to Music to play the content provided by the queue descriptor.
|
|
46
|
+
- (void)openToPlayQueueDescriptor:(MPMusicPlayerQueueDescriptor *)queueDescriptor
|
|
47
|
+
MP_API(ios(11.0), tvos(14.0))
|
|
48
|
+
MP_UNAVAILABLE(watchos, macos)
|
|
49
|
+
NS_SWIFT_NAME(openToPlay(_:));
|
|
50
|
+
|
|
51
|
+
@end
|
|
52
|
+
|
|
53
|
+
// MPMusicPlayerController allows playback of MPMediaItems through the Music application.
|
|
54
|
+
// See MPMediaPlayback.h for basic playback control.
|
|
55
|
+
MP_API(ios(3.0), tvos(14.0))
|
|
56
|
+
API_UNAVAILABLE(watchos, macos)
|
|
57
|
+
@interface MPMusicPlayerController : NSObject <MPMediaPlayback>
|
|
58
|
+
|
|
59
|
+
/// Playing items with applicationMusicPlayer does not affect Music's playback state.
|
|
60
|
+
@property (class, nonatomic, readonly) MPMusicPlayerController *applicationMusicPlayer;
|
|
61
|
+
|
|
62
|
+
/// Similar to applicationMusicPlayer, but allows direct manipulation of the queue.
|
|
63
|
+
@property (class, nonatomic, readonly) MPMusicPlayerApplicationController *applicationQueuePlayer MP_API(ios(10.3), tvos(14.0));
|
|
64
|
+
|
|
65
|
+
/// Playing media items with the systemMusicPlayer will replace the user's current Music state.
|
|
66
|
+
@property (class, nonatomic, readonly) MPMusicPlayerController<MPSystemMusicPlayerController> *systemMusicPlayer;
|
|
67
|
+
|
|
68
|
+
MP_INIT_UNAVAILABLE
|
|
69
|
+
|
|
70
|
+
// Returns the current playback state of the music player
|
|
71
|
+
@property (nonatomic, readonly) MPMusicPlaybackState playbackState;
|
|
72
|
+
|
|
73
|
+
// Determines how music repeats after playback completes. Defaults to MPMusicRepeatModeDefault.
|
|
74
|
+
@property (nonatomic) MPMusicRepeatMode repeatMode;
|
|
75
|
+
|
|
76
|
+
// Determines how music is shuffled when playing. Defaults to MPMusicShuffleModeDefault.
|
|
77
|
+
@property (nonatomic) MPMusicShuffleMode shuffleMode;
|
|
78
|
+
|
|
79
|
+
// The current volume of playing music, in the range of 0.0 to 1.0.
|
|
80
|
+
// This property is deprecated -- use MPVolumeView for volume control instead.
|
|
81
|
+
@property (nonatomic) float volume
|
|
82
|
+
MP_DEPRECATED("Use MPVolumeView for volume control.", ios(3.0, 7.0))
|
|
83
|
+
API_UNAVAILABLE(tvos);
|
|
84
|
+
|
|
85
|
+
// Returns the currently playing media item, or nil if none is playing.
|
|
86
|
+
// Setting the nowPlayingItem to an item in the current queue will begin playback at that item.
|
|
87
|
+
@property (nonatomic, copy, nullable) MPMediaItem *nowPlayingItem;
|
|
88
|
+
|
|
89
|
+
// Returns the index of the now playing item in the current playback queue.
|
|
90
|
+
// May return NSNotFound if the index is not valid (e.g. an empty queue or an infinite playlist).
|
|
91
|
+
@property (nonatomic, readonly) NSUInteger indexOfNowPlayingItem MP_API(ios(5.0), tvos(14.0));
|
|
92
|
+
|
|
93
|
+
// Call -play to begin playback after setting an item queue source. Setting a query will implicitly use MPMediaGroupingTitle.
|
|
94
|
+
- (void)setQueueWithQuery:(MPMediaQuery *)query API_UNAVAILABLE(tvos);
|
|
95
|
+
- (void)setQueueWithItemCollection:(MPMediaItemCollection *)itemCollection API_UNAVAILABLE(tvos);
|
|
96
|
+
- (void)setQueueWithStoreIDs:(NSArray<NSString *> *)storeIDs MP_API(ios(9.3), tvos(14.0));
|
|
97
|
+
- (void)setQueueWithDescriptor:(MPMusicPlayerQueueDescriptor *)descriptor MP_API(ios(10.1), tvos(14.0));
|
|
98
|
+
|
|
99
|
+
// Inserts the contents of the queue descriptor after the now playing item
|
|
100
|
+
- (void)prependQueueDescriptor:(MPMusicPlayerQueueDescriptor *)descriptor MP_API(ios(10.3), tvos(14.0));
|
|
101
|
+
|
|
102
|
+
// Adds the contents of the queue descriptor to the end of the queue
|
|
103
|
+
- (void)appendQueueDescriptor:(MPMusicPlayerQueueDescriptor *)descriptor MP_API(ios(10.3), tvos(14.0));
|
|
104
|
+
|
|
105
|
+
// The completion handler will be called when the first item from the queue is buffered and ready to play.
|
|
106
|
+
// If a first item has been specified using MPMusicPlayerQueueDescriptor, the error will be non-nil if the specified item cannot be prepared for playback.
|
|
107
|
+
// If a first item is not specified, the error will be non-nil if an item cannot be prepared for playback.
|
|
108
|
+
// Errors will be in MPErrorDomain.
|
|
109
|
+
- (void)prepareToPlayWithCompletionHandler:(void (^)(NSError *_Nullable error))completionHandler MP_API(ios(10.1), tvos(14.0));
|
|
110
|
+
|
|
111
|
+
// Skips to the next item in the queue.
|
|
112
|
+
// If already at the last item, this resets the queue to the first item in a paused playback state.
|
|
113
|
+
- (void)skipToNextItem;
|
|
114
|
+
|
|
115
|
+
// Restarts playback at the beginning of the currently playing media item.
|
|
116
|
+
- (void)skipToBeginning;
|
|
117
|
+
|
|
118
|
+
// Skips to the previous item in the queue. If already at the first item, this will end playback.
|
|
119
|
+
- (void)skipToPreviousItem;
|
|
120
|
+
|
|
121
|
+
// These methods determine whether playback notifications will be generated.
|
|
122
|
+
// Calls to begin/endGeneratingPlaybackNotifications are nestable.
|
|
123
|
+
- (void)beginGeneratingPlaybackNotifications;
|
|
124
|
+
- (void)endGeneratingPlaybackNotifications;
|
|
125
|
+
|
|
126
|
+
@property (class, nonatomic, readonly) MPMusicPlayerController *iPodMusicPlayer
|
|
127
|
+
MP_DEPRECATED_WITH_REPLACEMENT("systemMusicPlayer", ios(3.0, 8.0))
|
|
128
|
+
API_UNAVAILABLE(tvos);
|
|
129
|
+
|
|
130
|
+
@end
|
|
131
|
+
|
|
132
|
+
// Posted when the playback state changes, either programatically or by the user.
|
|
133
|
+
MP_EXTERN NSNotificationName const MPMusicPlayerControllerPlaybackStateDidChangeNotification
|
|
134
|
+
MP_API(ios(3.0), tvos(14.0))
|
|
135
|
+
API_UNAVAILABLE(watchos, macos);
|
|
136
|
+
|
|
137
|
+
// Posted when the currently playing media item changes.
|
|
138
|
+
MP_EXTERN NSNotificationName const MPMusicPlayerControllerNowPlayingItemDidChangeNotification
|
|
139
|
+
MP_API(ios(3.0), tvos(14.0))
|
|
140
|
+
API_UNAVAILABLE(watchos, macos);
|
|
141
|
+
|
|
142
|
+
// Posted when the current volume changes.
|
|
143
|
+
MP_EXTERN NSNotificationName const MPMusicPlayerControllerVolumeDidChangeNotification
|
|
144
|
+
MP_API(ios(3.0))
|
|
145
|
+
API_UNAVAILABLE(tvos, watchos, macos);
|
|
146
|
+
|
|
147
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MPMusicPlayerQueueDescriptor.h
|
|
3
|
+
// MediaPlayerFramework
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2016-2017 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <MediaPlayer/MediaPlayerDefines.h>
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
@class MPMediaItem, MPMediaItemCollection, MPMediaQuery;
|
|
14
|
+
|
|
15
|
+
MP_API(ios(10.1), tvos(14.0))
|
|
16
|
+
API_UNAVAILABLE(watchos, macos)
|
|
17
|
+
@interface MPMusicPlayerQueueDescriptor : NSObject
|
|
18
|
+
MP_INIT_UNAVAILABLE
|
|
19
|
+
@end
|
|
20
|
+
|
|
21
|
+
MP_API(ios(10.1))
|
|
22
|
+
API_UNAVAILABLE(tvos, watchos, macos)
|
|
23
|
+
@interface MPMusicPlayerMediaItemQueueDescriptor : MPMusicPlayerQueueDescriptor
|
|
24
|
+
|
|
25
|
+
- (instancetype)initWithQuery:(MPMediaQuery *)query;
|
|
26
|
+
- (instancetype)initWithItemCollection:(MPMediaItemCollection *)itemCollection;
|
|
27
|
+
|
|
28
|
+
@property (nonatomic, readonly, copy) MPMediaQuery *query;
|
|
29
|
+
@property (nonatomic, readonly, strong) MPMediaItemCollection *itemCollection;
|
|
30
|
+
@property (nonatomic, nullable, strong) MPMediaItem *startItem;
|
|
31
|
+
|
|
32
|
+
- (void)setStartTime:(NSTimeInterval)startTime forItem:(MPMediaItem *)mediaItem;
|
|
33
|
+
- (void)setEndTime:(NSTimeInterval)endTime forItem:(MPMediaItem *)mediaItem;
|
|
34
|
+
|
|
35
|
+
@end
|
|
36
|
+
|
|
37
|
+
MP_API(ios(10.1), tvos(14.0))
|
|
38
|
+
API_UNAVAILABLE(watchos, macos)
|
|
39
|
+
@interface MPMusicPlayerStoreQueueDescriptor : MPMusicPlayerQueueDescriptor
|
|
40
|
+
|
|
41
|
+
- (instancetype)initWithStoreIDs:(NSArray<NSString *> *)storeIDs;
|
|
42
|
+
|
|
43
|
+
@property (nonatomic, nullable, copy) NSArray<NSString *> *storeIDs;
|
|
44
|
+
@property (nonatomic, nullable, copy) NSString *startItemID;
|
|
45
|
+
|
|
46
|
+
- (void)setStartTime:(NSTimeInterval)startTime forItemWithStoreID:(NSString *)storeID;
|
|
47
|
+
- (void)setEndTime:(NSTimeInterval)endTime forItemWithStoreID:(NSString *)storeID;
|
|
48
|
+
|
|
49
|
+
@end
|
|
50
|
+
|
|
51
|
+
MP_API(ios(11.0), tvos(14.0))
|
|
52
|
+
API_UNAVAILABLE(watchos, macos)
|
|
53
|
+
@interface MPMusicPlayerPlayParameters : NSObject
|
|
54
|
+
|
|
55
|
+
- (nullable instancetype)initWithDictionary:(NSDictionary<NSString *, id> *)dictionary;
|
|
56
|
+
|
|
57
|
+
@property (nonatomic, readonly, copy) NSDictionary<NSString *, id> *dictionary;
|
|
58
|
+
|
|
59
|
+
@end
|
|
60
|
+
|
|
61
|
+
MP_API(ios(11.0), tvos(14.0))
|
|
62
|
+
API_UNAVAILABLE(watchos, macos)
|
|
63
|
+
@interface MPMusicPlayerPlayParametersQueueDescriptor : MPMusicPlayerQueueDescriptor
|
|
64
|
+
|
|
65
|
+
- (instancetype)initWithPlayParametersQueue:(NSArray<MPMusicPlayerPlayParameters *> *)playParametersQueue;
|
|
66
|
+
|
|
67
|
+
@property (nonatomic, copy) NSArray<MPMusicPlayerPlayParameters *> *playParametersQueue;
|
|
68
|
+
@property (nonatomic, nullable, strong) MPMusicPlayerPlayParameters *startItemPlayParameters;
|
|
69
|
+
|
|
70
|
+
- (void)setStartTime:(NSTimeInterval)startTime forItemWithPlayParameters:(MPMusicPlayerPlayParameters *)playParameters;
|
|
71
|
+
- (void)setEndTime:(NSTimeInterval)endTime forItemWithPlayParameters:(MPMusicPlayerPlayParameters *)playParameters;
|
|
72
|
+
|
|
73
|
+
@end
|
|
74
|
+
|
|
75
|
+
NS_ASSUME_NONNULL_END
|
package/sdk/ios/System/Library/Frameworks/MediaPlayer.framework/Headers/MPNowPlayingInfoCenter.h
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MPNowPlayingInfoCenter.h
|
|
3
|
+
// MediaPlayer
|
|
4
|
+
//
|
|
5
|
+
// Copyright 2011 Apple, Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <MediaPlayer/MediaPlayerDefines.h>
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
// -----------------------------------------------------------------------------
|
|
14
|
+
// MPNowPlayingInfoCenter provides an interface for setting the current now
|
|
15
|
+
// playing information for the application. This information will be displayed
|
|
16
|
+
// wherever now playing information typically appears, such as the lock screen
|
|
17
|
+
// and app switcher. The now playing info dictionary contains a group of
|
|
18
|
+
// metadata properties for a now playing item. The list of property constants
|
|
19
|
+
// is available in <MediaPlayer/MPMediaItem.h>. The properties which are
|
|
20
|
+
// currently supported include:
|
|
21
|
+
//
|
|
22
|
+
// MPMediaItemPropertyAlbumTitle
|
|
23
|
+
// MPMediaItemPropertyAlbumTrackCount
|
|
24
|
+
// MPMediaItemPropertyAlbumTrackNumber
|
|
25
|
+
// MPMediaItemPropertyArtist
|
|
26
|
+
// MPMediaItemPropertyArtwork
|
|
27
|
+
// MPMediaItemPropertyComposer
|
|
28
|
+
// MPMediaItemPropertyDiscCount
|
|
29
|
+
// MPMediaItemPropertyDiscNumber
|
|
30
|
+
// MPMediaItemPropertyGenre
|
|
31
|
+
// MPMediaItemPropertyPersistentID
|
|
32
|
+
// MPMediaItemPropertyPlaybackDuration
|
|
33
|
+
// MPMediaItemPropertyTitle
|
|
34
|
+
//
|
|
35
|
+
// In addition, metadata properties specific to the current playback session
|
|
36
|
+
// may also be specified -- see "Additional metadata properties" below.
|
|
37
|
+
|
|
38
|
+
typedef NS_ENUM(NSUInteger, MPNowPlayingInfoMediaType) {
|
|
39
|
+
MPNowPlayingInfoMediaTypeNone = 0,
|
|
40
|
+
MPNowPlayingInfoMediaTypeAudio,
|
|
41
|
+
MPNowPlayingInfoMediaTypeVideo,
|
|
42
|
+
} MP_API(ios(10.0), macos(10.12.2), watchos(5.0));
|
|
43
|
+
|
|
44
|
+
typedef NS_ENUM(NSUInteger, MPNowPlayingPlaybackState) {
|
|
45
|
+
MPNowPlayingPlaybackStateUnknown = 0,
|
|
46
|
+
MPNowPlayingPlaybackStatePlaying,
|
|
47
|
+
MPNowPlayingPlaybackStatePaused,
|
|
48
|
+
MPNowPlayingPlaybackStateStopped,
|
|
49
|
+
MPNowPlayingPlaybackStateInterrupted
|
|
50
|
+
} MP_API(ios(11.0), tvos(11.0), macos(10.12.2), watchos(5.0));
|
|
51
|
+
|
|
52
|
+
MP_API(ios(5.0), tvos(5.0), macos(10.12.2), watchos(5.0))
|
|
53
|
+
@interface MPNowPlayingInfoCenter : NSObject
|
|
54
|
+
|
|
55
|
+
/// Returns the default now playing info center.
|
|
56
|
+
/// The default center holds now playing info about the current application.
|
|
57
|
+
+ (MPNowPlayingInfoCenter *)defaultCenter;
|
|
58
|
+
|
|
59
|
+
MP_INIT_UNAVAILABLE
|
|
60
|
+
|
|
61
|
+
/// The current now playing info for the center.
|
|
62
|
+
/// Setting the info to nil will clear it.
|
|
63
|
+
@property (nonatomic, copy, nullable) NSDictionary<NSString *, id> *nowPlayingInfo;
|
|
64
|
+
|
|
65
|
+
/// The current playback state of the app.
|
|
66
|
+
/// This only applies on macOS, where playback state cannot be determined by
|
|
67
|
+
/// the application's audio session. This property must be set every time
|
|
68
|
+
/// the app begins or halts playback, otherwise remote control functionality may
|
|
69
|
+
/// not work as expected.
|
|
70
|
+
@property (nonatomic) MPNowPlayingPlaybackState playbackState MP_API(macos(10.12.2), ios(13.0), macCatalyst(13.0));
|
|
71
|
+
|
|
72
|
+
/// Keys related to animated artwork that are supported by the current platform.
|
|
73
|
+
///
|
|
74
|
+
/// If you specify an instance of animated artwork (an `MPMediaItemAnimatedArtwork`) to
|
|
75
|
+
/// `nowPlayingInfo` using any key not in this collection it will be ignored.
|
|
76
|
+
@property (class, nonatomic, readonly) NSArray<NSString *> *supportedAnimatedArtworkKeys MP_API(ios(19.0), tvos(19.0), macos(16.0), watchos(12.0), visionos(3.0));
|
|
77
|
+
|
|
78
|
+
@end
|
|
79
|
+
|
|
80
|
+
// -----------------------------------------------------------------------------
|
|
81
|
+
// Additional metadata properties
|
|
82
|
+
|
|
83
|
+
// The elapsed time of the now playing item, in seconds.
|
|
84
|
+
// Note the elapsed time will be automatically extrapolated from the previously
|
|
85
|
+
// provided elapsed time and playback rate, so updating this property frequently
|
|
86
|
+
// is not required (or recommended.)
|
|
87
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyElapsedPlaybackTime MP_API(ios(5.0), macos(10.12.2), watchos(5.0)); // NSNumber (double)
|
|
88
|
+
|
|
89
|
+
// The playback rate of the now playing item, with 1.0 representing normal
|
|
90
|
+
// playback. For example, 2.0 would represent playback at twice the normal rate.
|
|
91
|
+
// If not specified, assumed to be 1.0.
|
|
92
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyPlaybackRate MP_API(ios(5.0), macos(10.12.2), watchos(5.0)); // NSNumber (double)
|
|
93
|
+
|
|
94
|
+
// The "default" playback rate of the now playing item. You should set this
|
|
95
|
+
// property if your app is playing a media item at a rate other than 1.0 in a
|
|
96
|
+
// default playback state. e.g., if you are playing back content at a rate of
|
|
97
|
+
// 2.0 and your playback state is not fast-forwarding, then the default
|
|
98
|
+
// playback rate should also be 2.0. Conversely, if you are playing back content
|
|
99
|
+
// at a normal rate (1.0) but the user is fast-forwarding your content at a rate
|
|
100
|
+
// greater than 1.0, then the default playback rate should be set to 1.0.
|
|
101
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyDefaultPlaybackRate MP_API(ios(8.0), macos(10.12.2), watchos(5.0)); // NSNumber (double)
|
|
102
|
+
|
|
103
|
+
// The index of the now playing item in the application's playback queue.
|
|
104
|
+
// Note that the queue uses zero-based indexing, so the index of the first item
|
|
105
|
+
// would be 0 if the item should be displayed as "item 1 of 10".
|
|
106
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyPlaybackQueueIndex MP_API(ios(5.0), macos(10.12.2), watchos(5.0)); // NSNumber (NSUInteger)
|
|
107
|
+
|
|
108
|
+
// The total number of items in the application's playback queue.
|
|
109
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyPlaybackQueueCount MP_API(ios(5.0), macos(10.12.2), watchos(5.0)); // NSNumber (NSUInteger)
|
|
110
|
+
|
|
111
|
+
// The chapter currently being played. Note that this is zero-based.
|
|
112
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyChapterNumber MP_API(ios(5.0), macos(10.12.2), watchos(5.0)); // NSNumber (NSUInteger)
|
|
113
|
+
|
|
114
|
+
// The total number of chapters in the now playing item.
|
|
115
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyChapterCount MP_API(ios(5.0), macos(10.12.2), watchos(5.0)); // NSNumber (NSUInteger)
|
|
116
|
+
|
|
117
|
+
// A boolean denoting whether the now playing item is a live stream.
|
|
118
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyIsLiveStream MP_API(ios(10.0), macos(10.12.2), watchos(5.0)); // NSNumber (BOOL)
|
|
119
|
+
|
|
120
|
+
// A list of available language option groups in the now playing item
|
|
121
|
+
// Only one language option in a given group can be played at once.
|
|
122
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyAvailableLanguageOptions MP_API(ios(9.0), macos(10.12.2), watchos(5.0)); // NSArrayRef of MPNowPlayingInfoLanguageOptionGroup
|
|
123
|
+
|
|
124
|
+
// A list of currently active language options in the now playing item.
|
|
125
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyCurrentLanguageOptions MP_API(ios(9.0), macos(10.12.2), watchos(5.0)); // NSArray of MPNowPlayingInfoLanguageOption
|
|
126
|
+
|
|
127
|
+
// An identifier that represents the collection to which the now playing item belongs.
|
|
128
|
+
// This can refer to an artist, album, playlist, etc.
|
|
129
|
+
// This can be used to ask the now playing app to resume playback of the collection.
|
|
130
|
+
MP_EXTERN NSString * const MPNowPlayingInfoCollectionIdentifier MP_API(ios(9.3), macos(10.12.2), watchos(5.0)); // NSString
|
|
131
|
+
|
|
132
|
+
// An opaque identifier that uniquely represents the now playing item,
|
|
133
|
+
// even across app relaunches. This can be in any format and is only used to
|
|
134
|
+
// reference this item back to the now playing app.
|
|
135
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyExternalContentIdentifier MP_API(ios(10.0), macos(10.12.2), watchos(5.0)); // NSString
|
|
136
|
+
|
|
137
|
+
// An optional opaque identifier that uniquely represents the profile that the
|
|
138
|
+
// now playing item is being played from, even across app relauches.
|
|
139
|
+
// This can be in any format and is only used to reference this profile back to
|
|
140
|
+
// the now playing app.
|
|
141
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyExternalUserProfileIdentifier MP_API(ios(10.0), macos(10.12.2), watchos(5.0)); // NSString
|
|
142
|
+
|
|
143
|
+
// A unique string that identifies a service provider. If the now playing item
|
|
144
|
+
// belongs to a channel or subscription service, this key can be used to
|
|
145
|
+
// coordinate various types of now playing content from a particular service
|
|
146
|
+
// provider.
|
|
147
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyServiceIdentifier MP_API(ios(11.0), macos(10.13), watchos(5.0)); // NSString
|
|
148
|
+
|
|
149
|
+
// Represents the current playback progress of the now playing item.
|
|
150
|
+
// 0.0 = not watched/listened/viewed, 1.0 = fully watched/listened/viewed
|
|
151
|
+
// This value is different that ElapsedPlaybackTime and does not need to be exact
|
|
152
|
+
// as it is used as a high level indicator as to how far along the user is.
|
|
153
|
+
// For example, a movie may wish to set the now playing item as fully watched
|
|
154
|
+
// when the credits begin to roll.
|
|
155
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyPlaybackProgress MP_API(ios(10.0), macos(10.12.2), watchos(5.0)); // NSNumber (float)
|
|
156
|
+
|
|
157
|
+
// Indicates the media type of the now playing item
|
|
158
|
+
// This can be used to determine what kind of user interface the system displays.
|
|
159
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyMediaType MP_API(ios(10.0), macos(10.12.2), watchos(5.0)); // NSNumber (MPNowPlayingInfoMediaType)
|
|
160
|
+
|
|
161
|
+
// A URL pointing to the now playing item's underlying audio/video asset. This
|
|
162
|
+
// property is used by system UI when video thumbnails or audio waveform
|
|
163
|
+
// visualizations are applicable.
|
|
164
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyAssetURL MP_API(ios(10.3), macos(10.12.3), watchos(5.0)); // NSURL
|
|
165
|
+
|
|
166
|
+
// Represents the real-time date associated with the current elapsed playback time.
|
|
167
|
+
// The value of an AVPlayerItem’s currentDate property can be used to populate this property (see AVFoundation framework.)
|
|
168
|
+
// Note the current playback date will be automatically extrapolated from the previously
|
|
169
|
+
// provided current playback date, so updating this property frequently is not required (nor recommended.)
|
|
170
|
+
// For example, a sports broadcast can map an elapsed playback time (i.e 12 minutes and 30 seconds) to a real-time date (i.e "10:30:00 9/14/2017")
|
|
171
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyCurrentPlaybackDate MP_API(ios(11.1), macos(10.13.1), watchos(5.0)); // NSDate
|
|
172
|
+
|
|
173
|
+
// A list of ad breaks in the now playing item.
|
|
174
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyAdTimeRanges MP_API(ios(16.0), tvos(16.0), macos(13.0)); // NSArray of MPAdTimeRange
|
|
175
|
+
|
|
176
|
+
// Represents the credits start time (without ads) in seconds for the now playing item.
|
|
177
|
+
// A replacement for MPNowPlayingInfoPropertyPlaybackProgress.
|
|
178
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyCreditsStartTime MP_API(ios(16.0), tvos(16.0), macos(13.0)); // NSNumber (double)
|
|
179
|
+
|
|
180
|
+
// Represents the International Standard Recording Code (ISRC) for a song, if available.
|
|
181
|
+
// This will be used by system services that leverage now playing data, such as Music Haptics.
|
|
182
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyInternationalStandardRecordingCode MP_API(ios(18.0), tvos(18.0), macos(15.0)); // NSString
|
|
183
|
+
|
|
184
|
+
// A boolean denoting whether the now playing item should be excluded from content suggestions.
|
|
185
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyExcludeFromSuggestions MP_API(ios(18.0), tvos(18.0), macos(15.0)); // NSNumber (BOOL)
|
|
186
|
+
|
|
187
|
+
/// 1:1 (square) animated artwork for the current media item.
|
|
188
|
+
MP_EXTERN NSString * const MPNowPlayingInfoProperty1x1AnimatedArtwork MP_API(ios(19.0), tvos(19.0), macos(16.0), watchos(12.0), visionos(3.0)); // MPMediaItemAnimatedArtwork
|
|
189
|
+
|
|
190
|
+
/// 3:4 (tall) animated artwork for the current media item.
|
|
191
|
+
MP_EXTERN NSString * const MPNowPlayingInfoProperty3x4AnimatedArtwork MP_API(ios(19.0), tvos(19.0), macos(16.0), watchos(12.0), visionos(3.0)); // MPMediaItemAnimatedArtwork
|
|
192
|
+
|
|
193
|
+
// An array of MPAppEntityIdentifier containing the current now playing app entity identifiers for the application.
|
|
194
|
+
MP_EXTERN NSString * const MPNowPlayingInfoPropertyAppEntityIdentifiers MP_API(ios(27.0), macos(27.0), watchos(27.0), tvos(27.0)); // NSArray (MPAppEntityIdentifier)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MPNowPlayingInfoLanguageOption.h
|
|
3
|
+
// MobileMusicPlayer
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2015 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <MediaPlayer/MediaPlayerDefines.h>
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <MediaPlayer/AVFoundation+MPNowPlayingInfoLanguageOptionAdditions.h>
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
// MPNowPlayingInfoLanguageOption and MPNowPlayingInfoLanguageOptionGroup provide
|
|
15
|
+
// interfaces for setting information about language options (ie audio and subtitles)
|
|
16
|
+
// in the current now playing information.
|
|
17
|
+
//
|
|
18
|
+
// When using AVFoundation the categories in
|
|
19
|
+
// <MediaPlayer/AVFoundation+MPNowPlayingInfoLanguageOptionAdditions.h>
|
|
20
|
+
// can automatically create these classes from various AVFoundation types.
|
|
21
|
+
|
|
22
|
+
// Common values used to to populate MPNowPlayingInfoLanguageOption's
|
|
23
|
+
// characteristics property.
|
|
24
|
+
// See the AVMediaSelectionOption documentation about Media Characteristics for more details.
|
|
25
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicIsMainProgramContent MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
26
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicIsAuxiliaryContent MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
27
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicContainsOnlyForcedSubtitles MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
28
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicTranscribesSpokenDialog MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
29
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicDescribesMusicAndSound MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
30
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicEasyToRead MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
31
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicDescribesVideo MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
32
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicLanguageTranslation MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
33
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicDubbedTranslation MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
34
|
+
MP_EXTERN NSString * const MPLanguageOptionCharacteristicVoiceOverTranslation MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
35
|
+
|
|
36
|
+
typedef NS_ENUM(NSUInteger, MPNowPlayingInfoLanguageOptionType) {
|
|
37
|
+
MPNowPlayingInfoLanguageOptionTypeAudible,
|
|
38
|
+
MPNowPlayingInfoLanguageOptionTypeLegible,
|
|
39
|
+
} MP_API(ios(9.0), macos(10.12.2), watchos(5.0));
|
|
40
|
+
|
|
41
|
+
// -----------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
/// Represents a single language option option.
|
|
44
|
+
MP_API(ios(9.0), tvos(9.0), macos(10.12.2), watchos(5.0))
|
|
45
|
+
@interface MPNowPlayingInfoLanguageOption : NSObject
|
|
46
|
+
|
|
47
|
+
- (instancetype)initWithType:(MPNowPlayingInfoLanguageOptionType)languageOptionType
|
|
48
|
+
languageTag:(NSString *)languageTag
|
|
49
|
+
characteristics:(nullable NSArray<NSString *> *)languageOptionCharacteristics
|
|
50
|
+
displayName:(NSString *)displayName
|
|
51
|
+
identifier:(NSString *)identifier;
|
|
52
|
+
|
|
53
|
+
/// Represents a special case that is used to
|
|
54
|
+
/// represent the best legible language option based on system preferences.
|
|
55
|
+
/// See AVPlayerItem-selectMediaOptionAutomaticallyInMediaSelectionGroup
|
|
56
|
+
- (BOOL)isAutomaticLegibleLanguageOption;
|
|
57
|
+
|
|
58
|
+
/// Represents a special case that is used to
|
|
59
|
+
/// represent the best audible language option based on system preferences.
|
|
60
|
+
/// See AVPlayerItem-selectMediaOptionAutomaticallyInMediaSelectionGroup
|
|
61
|
+
- (BOOL)isAutomaticAudibleLanguageOption;
|
|
62
|
+
|
|
63
|
+
/// The type of language option.
|
|
64
|
+
@property (nonatomic, readonly) MPNowPlayingInfoLanguageOptionType languageOptionType;
|
|
65
|
+
|
|
66
|
+
/// The IETF BCP 47 language tag.
|
|
67
|
+
/// A nil languageTag reprsents that this option should be disabled.
|
|
68
|
+
/// A languageTag with the value of MPLangaugeOptionAutoLangaugeTag represents
|
|
69
|
+
/// that the best langauge based on the system preferences should be used.
|
|
70
|
+
@property (nonatomic, readonly, nullable) NSString *languageTag;
|
|
71
|
+
|
|
72
|
+
/// Characteristics describing the content of the language options.
|
|
73
|
+
/// See the LanguageOptionCharacteristics for the most commonly used values.
|
|
74
|
+
@property (nonatomic, readonly, nullable) NSArray<NSString *> *languageOptionCharacteristics;
|
|
75
|
+
|
|
76
|
+
/// A user presentable display name for this option.
|
|
77
|
+
@property (nonatomic, readonly, nullable) NSString *displayName;
|
|
78
|
+
|
|
79
|
+
/// A unique identifier representing this option.
|
|
80
|
+
@property (nonatomic, readonly, nullable) NSString *identifier;
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
@end
|
|
84
|
+
|
|
85
|
+
// -----------------------------------------------------------------------------
|
|
86
|
+
|
|
87
|
+
// Represents a mutually exclusive group of language options.
|
|
88
|
+
// Only one language option within a given group may be active at a time.
|
|
89
|
+
MP_API(ios(9.0), tvos(9.0), macos(10.12.2), watchos(5.0))
|
|
90
|
+
@interface MPNowPlayingInfoLanguageOptionGroup : NSObject
|
|
91
|
+
|
|
92
|
+
- (instancetype)initWithLanguageOptions:(NSArray<MPNowPlayingInfoLanguageOption *> *)languageOptions
|
|
93
|
+
defaultLanguageOption:(nullable MPNowPlayingInfoLanguageOption *)defaultLanguageOption
|
|
94
|
+
allowEmptySelection:(BOOL)allowEmptySelection;
|
|
95
|
+
|
|
96
|
+
/// The available language options within this group.
|
|
97
|
+
@property (nonatomic, readonly) NSArray<MPNowPlayingInfoLanguageOption *> *languageOptions;
|
|
98
|
+
|
|
99
|
+
/// The default language option, if any, within this group.
|
|
100
|
+
@property (nonatomic, readonly, nullable) MPNowPlayingInfoLanguageOption *defaultLanguageOption;
|
|
101
|
+
|
|
102
|
+
/// Indicates whether a selection in this group is required at all times.
|
|
103
|
+
@property (nonatomic, readonly) BOOL allowEmptySelection;
|
|
104
|
+
|
|
105
|
+
@end
|
|
106
|
+
|
|
107
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MPNowPlayingSession.h
|
|
3
|
+
// MediaPlayer
|
|
4
|
+
//
|
|
5
|
+
// Copyright © 2019 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <MediaPlayer/MediaPlayerDefines.h>
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <CoreMedia/CMTimeRange.h>
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
@class MPNowPlayingInfoCenter;
|
|
15
|
+
@class MPRemoteCommandCenter;
|
|
16
|
+
@class AVPlayer;
|
|
17
|
+
@protocol MPNowPlayingSessionDelegate;
|
|
18
|
+
|
|
19
|
+
MP_UNAVAILABLE_BEGIN(watchos, macos)
|
|
20
|
+
|
|
21
|
+
MP_API(ios(16.0), tvos(16.0))
|
|
22
|
+
@interface MPAdTimeRange : NSObject <NSCopying>
|
|
23
|
+
|
|
24
|
+
/// Represents a time range where an ad break exists in the current player item.
|
|
25
|
+
/// This value must be in bounds of the duration of the current player item.
|
|
26
|
+
@property (nonatomic, assign) CMTimeRange timeRange;
|
|
27
|
+
|
|
28
|
+
MP_INIT_UNAVAILABLE
|
|
29
|
+
|
|
30
|
+
- (instancetype)initWithTimeRange:(CMTimeRange)timeRange NS_SWIFT_NAME(init(_:));
|
|
31
|
+
|
|
32
|
+
@end
|
|
33
|
+
|
|
34
|
+
MP_API(tvos(14.0), ios(16.0))
|
|
35
|
+
@interface MPNowPlayingSession : NSObject
|
|
36
|
+
|
|
37
|
+
/// Creates a session associated with a given AVPlayer instance. This will assert if players is nil or empty.
|
|
38
|
+
- (instancetype)initWithPlayers:(NSArray<AVPlayer *> *)players;
|
|
39
|
+
|
|
40
|
+
MP_INIT_UNAVAILABLE
|
|
41
|
+
|
|
42
|
+
/// AVPlayer instances associated with this session.
|
|
43
|
+
@property (nonatomic, strong, readonly) NSArray<AVPlayer *> *players;
|
|
44
|
+
|
|
45
|
+
@property (nonatomic, weak, nullable) id<MPNowPlayingSessionDelegate> delegate;
|
|
46
|
+
|
|
47
|
+
/// When YES, now playing info will be automatically published, and nowPlayingInfoCenter must not be used.
|
|
48
|
+
/// Now playing info keys to be incorporated by automatic publishing can be set on the AVPlayerItem's nowPlayingInfo property.
|
|
49
|
+
@property (nonatomic, assign) BOOL automaticallyPublishesNowPlayingInfo MP_API(ios(16.0), tvos(16.0));
|
|
50
|
+
|
|
51
|
+
/// The now playing info center that is associated with this session.
|
|
52
|
+
@property (nonatomic, strong, readonly) MPNowPlayingInfoCenter *nowPlayingInfoCenter;
|
|
53
|
+
|
|
54
|
+
/// The remote command center that is associated with this session.
|
|
55
|
+
@property (nonatomic, strong, readonly) MPRemoteCommandCenter *remoteCommandCenter;
|
|
56
|
+
|
|
57
|
+
/// Returns a Boolean value indicating whether this session can become the App's active now playing session.
|
|
58
|
+
@property (nonatomic, readonly) BOOL canBecomeActive;
|
|
59
|
+
|
|
60
|
+
/// Returns a Boolean value indicating whether this session is the App's active now playing session.
|
|
61
|
+
@property (nonatomic, readonly, getter=isActive) BOOL active;
|
|
62
|
+
|
|
63
|
+
/// Asks the system to make this session the active now playing sessin for the App.
|
|
64
|
+
- (void)becomeActiveIfPossibleWithCompletion:(void (^ _Nullable)(BOOL isActive))completion;
|
|
65
|
+
|
|
66
|
+
/// Add AVPlayer instance to this session.
|
|
67
|
+
- (void)addPlayer:(AVPlayer *)player;
|
|
68
|
+
|
|
69
|
+
/// Remove AVPlayer instance from this session.
|
|
70
|
+
- (void)removePlayer:(AVPlayer *)player;
|
|
71
|
+
|
|
72
|
+
@end
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
MP_API(tvos(14.0), ios(16.0))
|
|
76
|
+
@protocol MPNowPlayingSessionDelegate <NSObject>
|
|
77
|
+
|
|
78
|
+
@optional
|
|
79
|
+
/// Tells the delegate that the session has changed its active status.
|
|
80
|
+
- (void)nowPlayingSessionDidChangeActive:(MPNowPlayingSession *)nowPlayingSession;
|
|
81
|
+
|
|
82
|
+
/// Tells the delegate that the session has changed its can become active status.
|
|
83
|
+
- (void)nowPlayingSessionDidChangeCanBecomeActive:(MPNowPlayingSession *)nowPlayingSession;
|
|
84
|
+
|
|
85
|
+
@end
|
|
86
|
+
|
|
87
|
+
MP_UNAVAILABLE_END
|
|
88
|
+
|
|
89
|
+
NS_ASSUME_NONNULL_END
|