@wwdrew/expo-spotify-sdk 0.3.1 → 0.4.0
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 +36 -3
- package/build/ExpoSpotifySDK.types.d.ts +0 -1
- package/build/ExpoSpotifySDK.types.d.ts.map +1 -1
- package/build/ExpoSpotifySDK.types.js.map +1 -1
- package/external/android/SpotifySDK/auth-lib/spotify-auth-release-2.1.0.aar +0 -0
- package/ios/ExpoSpotifySDKModule.swift +1 -3
- package/ios/ExpoSpotifySessionManager.swift +3 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/Info.plist +9 -5
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemote.h +14 -10
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +3 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SPTSessionManager.h +3 -13
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +2 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/Modules/module.modulemap +1 -1
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/PrivacyInfo.xcprivacy +14 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h +14 -10
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +3 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +3 -13
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +2 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap +1 -1
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/PrivacyInfo.xcprivacy +14 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_x86_64-simulator/SpotifyiOS.framework/_CodeSignature/CodeResources +20 -133
- package/package.json +4 -3
- package/plugin/build/android/withSpotifyAndroidAppBuildGradle.js +18 -2
- package/plugin/build/index.js +2 -2
- package/plugin/build/ios/{withSpotifyConfigIOS.d.ts → withSpotifyConfigValues.d.ts} +1 -1
- package/plugin/build/ios/{withSpotifyConfigIOS.js → withSpotifyConfigValues.js} +3 -3
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemote.h +0 -240
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +0 -18
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +0 -18
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +0 -36
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +0 -65
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +0 -75
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +0 -43
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +0 -18
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +0 -25
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +0 -16
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +0 -19
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +0 -32
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +0 -32
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +0 -262
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +0 -40
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +0 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +0 -47
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +0 -103
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +0 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTConfiguration.h +0 -63
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTError.h +0 -33
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTLogin.h +0 -10
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTMacros.h +0 -89
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTScope.h +0 -68
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTSession.h +0 -32
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SPTSessionManager.h +0 -140
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +0 -30
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Headers/SpotifyiOS.h +0 -7
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/Modules/module.modulemap +0 -6
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_armv7/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemote.h +0 -240
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteAlbum.h +0 -18
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteArtist.h +0 -18
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCommon.h +0 -36
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteConnectionParams.h +0 -65
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentAPI.h +0 -75
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteContentItem.h +0 -43
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteCrossfadeState.h +0 -18
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageAPI.h +0 -25
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteImageRepresentable.h +0 -16
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteLibraryState.h +0 -19
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackOptions.h +0 -32
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlaybackRestrictions.h +0 -32
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerAPI.h +0 -262
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePlayerState.h +0 -40
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemotePodcastPlaybackSpeed.h +0 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteTrack.h +0 -47
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserAPI.h +0 -103
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTAppRemoteUserCapabilities.h +0 -15
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTConfiguration.h +0 -63
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTError.h +0 -33
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTLogin.h +0 -10
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTMacros.h +0 -89
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTScope.h +0 -68
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSession.h +0 -32
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SPTSessionManager.h +0 -140
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyAppRemote.h +0 -30
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Headers/SpotifyiOS.h +0 -7
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Info.plist +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/Modules/module.modulemap +0 -6
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/SpotifyiOS +0 -0
- package/ios/SpotifySDK/SpotifyiOS.xcframework/ios-arm64_i386_x86_64-simulator/SpotifyiOS.framework/_CodeSignature/CodeResources +0 -537
- package/plugin/build/android/withSpotifyConfigAndroid.d.ts +0 -3
- package/plugin/build/android/withSpotifyConfigAndroid.js +0 -16
- package/plugin/build/withSpotifyConfig.d.ts +0 -3
- package/plugin/build/withSpotifyConfig.js +0 -11
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
#import "SPTAppRemoteCommon.h"
|
|
3
|
-
|
|
4
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
-
|
|
6
|
-
/// A type representing different lists of content.
|
|
7
|
-
typedef NSString * const SPTAppRemoteContentType;
|
|
8
|
-
|
|
9
|
-
extern NSString * const SPTAppRemoteContentTypeDefault;
|
|
10
|
-
extern NSString * const SPTAppRemoteContentTypeNavigation;
|
|
11
|
-
extern NSString * const SPTAppRemoteContentTypeFitness;
|
|
12
|
-
|
|
13
|
-
@protocol SPTAppRemoteContentItem;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* The `SPTAppRemoteContentAPI` is used to access content from the Spotify application.
|
|
17
|
-
*/
|
|
18
|
-
@protocol SPTAppRemoteContentAPI <NSObject>
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Fetches the root level of content items for the current user.
|
|
22
|
-
*
|
|
23
|
-
* @note The content returned is based on the users' home feeds, and as such may vary
|
|
24
|
-
* between different users. If the user has no network connection or Spotify is
|
|
25
|
-
* forced offline, this method will return the user's offline content, if any.
|
|
26
|
-
*
|
|
27
|
-
* Deprecated. Use fetchRecommendedContentItemsForType:flattenContainers:callback: instead.
|
|
28
|
-
*
|
|
29
|
-
* @param contentType A type that is used to retrieve content for a specific use-case.
|
|
30
|
-
* @param callback The callback to be called once the request is completed.
|
|
31
|
-
*/
|
|
32
|
-
- (void)fetchRootContentItemsForType:(SPTAppRemoteContentType)contentType
|
|
33
|
-
callback:(nullable SPTAppRemoteCallback)callback DEPRECATED_MSG_ATTRIBUTE("Deprecated. Use fetchRecommendedContentItemsForType:flattenContainers:callback: instead.");
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Fetches the children items for the provided content item.
|
|
37
|
-
*
|
|
38
|
-
* @note The `isContainer` property of the `SPTAppRemoteContentItem`
|
|
39
|
-
* indicates whether or not the item has any children.
|
|
40
|
-
*
|
|
41
|
-
* @param contentItem The content item to fetch the children for.
|
|
42
|
-
* @param callback The callback to be called once the request is completed.
|
|
43
|
-
*/
|
|
44
|
-
- (void)fetchChildrenOfContentItem:(id<SPTAppRemoteContentItem>)contentItem
|
|
45
|
-
callback:(nullable SPTAppRemoteCallback)callback;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Fetches a list of recommended playlists for the current user.
|
|
49
|
-
*
|
|
50
|
-
* @note The playlists returned are a mix of the user's recently played feed
|
|
51
|
-
* as well as personal recommendations, and as such may vary between users. If the
|
|
52
|
-
* user is offline, this method will only return the content that is available offline, if any.
|
|
53
|
-
* @note This method is only supported by Spotify clients running version 8.4.75 and above
|
|
54
|
-
* and will fail with an `SPTAppRemoteWAMPClientNotSupportedError` otherwise.
|
|
55
|
-
*
|
|
56
|
-
* @param contentType A type that is used to retrieve content for a specific use-case.
|
|
57
|
-
* @param flattenContainers Whether or not the recommendations should be flattened into a single list or remain
|
|
58
|
-
* separated in containers.
|
|
59
|
-
* @param callback The callback to be called once the request is completed.
|
|
60
|
-
*/
|
|
61
|
-
- (void)fetchRecommendedContentItemsForType:(SPTAppRemoteContentType)contentType
|
|
62
|
-
flattenContainers:(BOOL)flattenContainers
|
|
63
|
-
callback:(nullable SPTAppRemoteCallback)callback;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
Fetches the content item for the provided URI.
|
|
67
|
-
|
|
68
|
-
@param URI A Spotify URI as string
|
|
69
|
-
@param callback The callback to be called once the request is completed.
|
|
70
|
-
*/
|
|
71
|
-
- (void)fetchContentItemForURI:(NSString *)URI callback:(nullable SPTAppRemoteCallback)callback;
|
|
72
|
-
|
|
73
|
-
@end
|
|
74
|
-
|
|
75
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
#import "SPTAppRemoteImageRepresentable.h"
|
|
3
|
-
|
|
4
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The `SPTAppRemoteContentItem` protocol represents a track or a collection of tracks. Use the `isContainer` instance method
|
|
8
|
-
* to determine if the content item is a collection of tracks for which to grab children from.
|
|
9
|
-
*/
|
|
10
|
-
@protocol SPTAppRemoteContentItem <NSObject, SPTAppRemoteImageRepresentable>
|
|
11
|
-
|
|
12
|
-
/// The primary title of the item.
|
|
13
|
-
@property (nonatomic, copy, readonly, nullable) NSString *title;
|
|
14
|
-
|
|
15
|
-
/// The secondary title of the item.
|
|
16
|
-
@property (nonatomic, copy, readonly, nullable) NSString *subtitle;
|
|
17
|
-
|
|
18
|
-
/// The unique identifier of the item.
|
|
19
|
-
@property (nonatomic, copy, readonly) NSString *identifier;
|
|
20
|
-
|
|
21
|
-
/// The playback URI of this item.
|
|
22
|
-
@property (nonatomic, copy, readonly) NSString *URI;
|
|
23
|
-
|
|
24
|
-
/// `YES` if the item is available offline, or if it has any child that is available offline, otherwise `NO`.
|
|
25
|
-
@property (nonatomic, assign, readonly, getter=isAvailableOffline) BOOL availableOffline;
|
|
26
|
-
|
|
27
|
-
/// Returns `YES` if the item is directly playable, otherwise `NO`.
|
|
28
|
-
@property (nonatomic, assign, readonly, getter=isPlayable) BOOL playable;
|
|
29
|
-
|
|
30
|
-
/// Returns `YES` if the item is expected to contain children, otherwise `NO`.
|
|
31
|
-
@property (nonatomic, assign, readonly, getter=isContainer) BOOL container;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
A list of the content item's children.
|
|
35
|
-
|
|
36
|
-
@note This is not populated for all container items as some of them are fetched
|
|
37
|
-
lazily with the `fetchChildrenOfContentItem:callback:` method.
|
|
38
|
-
*/
|
|
39
|
-
@property (nonatomic, strong, readonly, nullable) NSArray<id<SPTAppRemoteContentItem>> *children;
|
|
40
|
-
|
|
41
|
-
@end
|
|
42
|
-
|
|
43
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The `SPTAppRemoteCrossfadeState` represents the state of crossfade.
|
|
7
|
-
*/
|
|
8
|
-
@protocol SPTAppRemoteCrossfadeState <NSObject>
|
|
9
|
-
|
|
10
|
-
/// The on/off state of crossfade.
|
|
11
|
-
@property (nonatomic, readonly, getter=isEnabled) BOOL enabled;
|
|
12
|
-
|
|
13
|
-
/// The duration of crossfade in milliseconds. The value is meaningless if crossfade is not enabled.
|
|
14
|
-
@property (nonatomic, readonly) NSInteger duration;
|
|
15
|
-
|
|
16
|
-
@end
|
|
17
|
-
|
|
18
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#import <UIKit/UIKit.h>
|
|
2
|
-
|
|
3
|
-
#import "SPTAppRemoteCommon.h"
|
|
4
|
-
#import "SPTAppRemoteImageRepresentable.h"
|
|
5
|
-
|
|
6
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* API for fetching image data from the Spotify app
|
|
10
|
-
*/
|
|
11
|
-
@protocol SPTAppRemoteImageAPI <NSObject>
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Fetch an image with the given ID from the Spotify app.
|
|
15
|
-
*
|
|
16
|
-
* @param imageRepresentable The item containing the ID of the image to fetch.
|
|
17
|
-
* @param imageSize The size of the image to fetch.
|
|
18
|
-
* @param callback On success `result` will be an instance of `UIImage`
|
|
19
|
-
* On error `result` will be nil and error set
|
|
20
|
-
*/
|
|
21
|
-
- (void)fetchImageForItem:(id<SPTAppRemoteImageRepresentable>)imageRepresentable withSize:(CGSize)imageSize callback:(nullable SPTAppRemoteCallback)callback;
|
|
22
|
-
|
|
23
|
-
@end
|
|
24
|
-
|
|
25
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The `SPTImageRepresentable` protocol represents an object that may contain an image.
|
|
7
|
-
* If something conforms to this protocol you can pass it to `SPTAppRemoteImageAPI` fetchImageForItem: method.
|
|
8
|
-
*/
|
|
9
|
-
@protocol SPTAppRemoteImageRepresentable <NSObject>
|
|
10
|
-
|
|
11
|
-
/// The identifier of the image of the entity.
|
|
12
|
-
@property (nonatomic, strong, readonly) NSString *imageIdentifier;
|
|
13
|
-
|
|
14
|
-
@end
|
|
15
|
-
|
|
16
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The `SPTAppRemoteLibraryState` represents a the state of an album or track in a users Spotify library.
|
|
7
|
-
*/
|
|
8
|
-
@protocol SPTAppRemoteLibraryState <NSObject>
|
|
9
|
-
|
|
10
|
-
/// The uri of the track or album
|
|
11
|
-
@property (nonatomic, strong, readonly) NSString *uri;
|
|
12
|
-
/// `YES` album or track was added to the user's library, otherwise `NO`.
|
|
13
|
-
@property (nonatomic, assign, readonly) BOOL isAdded;
|
|
14
|
-
/// `YES` album or track can be added to the user's library, otherwise `NO`.
|
|
15
|
-
@property (nonatomic, assign, readonly) BOOL canAdd;
|
|
16
|
-
|
|
17
|
-
@end
|
|
18
|
-
|
|
19
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
-
|
|
5
|
-
/// The available repeat modes.
|
|
6
|
-
typedef NS_ENUM(NSUInteger, SPTAppRemotePlaybackOptionsRepeatMode) {
|
|
7
|
-
/// Repeat is off.
|
|
8
|
-
SPTAppRemotePlaybackOptionsRepeatModeOff = 0,
|
|
9
|
-
|
|
10
|
-
/// Repeats the current track.
|
|
11
|
-
SPTAppRemotePlaybackOptionsRepeatModeTrack = 1,
|
|
12
|
-
|
|
13
|
-
/// Repeats the current context.
|
|
14
|
-
SPTAppRemotePlaybackOptionsRepeatModeContext = 2,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* The `SPTAppRemotePlaybackOptions` describes a set of options used for the current playback.
|
|
19
|
-
*
|
|
20
|
-
* @discussion Use these to determine UI states.
|
|
21
|
-
*/
|
|
22
|
-
@protocol SPTAppRemotePlaybackOptions <NSObject>
|
|
23
|
-
|
|
24
|
-
/// `YES` if shuffle is enabled, otherwise `NO`.
|
|
25
|
-
@property (nonatomic, readonly) BOOL isShuffling;
|
|
26
|
-
|
|
27
|
-
/// The current repeat mode in effect.
|
|
28
|
-
@property (nonatomic, readonly) SPTAppRemotePlaybackOptionsRepeatMode repeatMode;
|
|
29
|
-
|
|
30
|
-
@end
|
|
31
|
-
|
|
32
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The `SPTAppRemotePlaybackRestrictions` describes a set of restrictions for playback in the Spotify client.
|
|
7
|
-
*
|
|
8
|
-
* @discussion Use these to determine whether to enable or disable certain actions in the UI.
|
|
9
|
-
*/
|
|
10
|
-
@protocol SPTAppRemotePlaybackRestrictions <NSObject>
|
|
11
|
-
|
|
12
|
-
/// `YES` if the user can skip to the next track, otherwise `NO`.
|
|
13
|
-
@property (nonatomic, readonly) BOOL canSkipNext;
|
|
14
|
-
|
|
15
|
-
/// `YES` if the user can skip to the previous track, otherwise `NO`.
|
|
16
|
-
@property (nonatomic, readonly) BOOL canSkipPrevious;
|
|
17
|
-
|
|
18
|
-
/// `YES` if the user can repeat the current track, otherwise `NO`.
|
|
19
|
-
@property (nonatomic, readonly) BOOL canRepeatTrack;
|
|
20
|
-
|
|
21
|
-
/// `YES` if the user can repeat the current context, otherwise `NO`.
|
|
22
|
-
@property (nonatomic, readonly) BOOL canRepeatContext;
|
|
23
|
-
|
|
24
|
-
/// `YES` if the user can toggle shuffle, otherwise `NO`.
|
|
25
|
-
@property (nonatomic, readonly) BOOL canToggleShuffle;
|
|
26
|
-
|
|
27
|
-
/// `YES` if the user can seek to specific positions, otherwise `NO`.
|
|
28
|
-
@property (nonatomic, readonly) BOOL canSeek;
|
|
29
|
-
|
|
30
|
-
@end
|
|
31
|
-
|
|
32
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
#import "SPTAppRemoteCommon.h"
|
|
4
|
-
#import "SPTAppRemotePlaybackOptions.h"
|
|
5
|
-
|
|
6
|
-
@protocol SPTAppRemotePlayerState, SPTAppRemoteContentItem, SPTAppRemotePodcastPlaybackSpeed;
|
|
7
|
-
|
|
8
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* The `SPTAppRemotePlayerStateDelegate` is used to get notifications from the Spotify app when the player state is changed.
|
|
12
|
-
*/
|
|
13
|
-
@protocol SPTAppRemotePlayerStateDelegate <NSObject>
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Called when the player state has been updated.
|
|
17
|
-
*
|
|
18
|
-
* @param playerState The new player state.
|
|
19
|
-
*/
|
|
20
|
-
- (void)playerStateDidChange:(id<SPTAppRemotePlayerState>)playerState;
|
|
21
|
-
|
|
22
|
-
@end
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The `SPTAppRemotePlayerAPI` is used to interact with and control the Spotify player.
|
|
26
|
-
*/
|
|
27
|
-
@protocol SPTAppRemotePlayerAPI <NSObject>
|
|
28
|
-
|
|
29
|
-
/// The delegate receiving player state updates
|
|
30
|
-
@property (nonatomic, weak) id<SPTAppRemotePlayerStateDelegate> delegate;
|
|
31
|
-
|
|
32
|
-
#pragma mark Player Control
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Asks the Spotify player to play the entity with the given identifier.
|
|
36
|
-
*
|
|
37
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
38
|
-
* the track begins to play.
|
|
39
|
-
*
|
|
40
|
-
* @param entityIdentifier The unique identifier of the entity to play.
|
|
41
|
-
* @param callback On success `result` will be `YES`.
|
|
42
|
-
* On error `result` will be `nil` and `error` set
|
|
43
|
-
*/
|
|
44
|
-
- (void)play:(NSString *)entityIdentifier callback:(nullable SPTAppRemoteCallback)callback;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Asks the Spotify player to play the entity with the given identifier.
|
|
48
|
-
*
|
|
49
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
50
|
-
* the track begins to play.
|
|
51
|
-
*
|
|
52
|
-
* @param trackUri The track URI to play.
|
|
53
|
-
* @param asRadio `YES` to start radio for track URI.
|
|
54
|
-
* @param callback On success `result` will be `YES`.
|
|
55
|
-
* On error `result` will be `nil` and `error` set
|
|
56
|
-
*/
|
|
57
|
-
- (void)play:(NSString *)trackUri asRadio:(BOOL)asRadio callback:(SPTAppRemoteCallback)callback;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Asks the Spotify player to play the provided content item.
|
|
61
|
-
*
|
|
62
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
63
|
-
* the track begins to play.
|
|
64
|
-
* @note The `playable` property of the `SPTAppRemoteContentItem` indicates whether or not a content item is
|
|
65
|
-
* playable.
|
|
66
|
-
*
|
|
67
|
-
* @param contentItem The content item to play.
|
|
68
|
-
* @param callback On success `result` will be `YES`.
|
|
69
|
-
* On error `result` will be `nil` and error set
|
|
70
|
-
*/
|
|
71
|
-
- (void)playItem:(id<SPTAppRemoteContentItem>)contentItem callback:(nullable SPTAppRemoteCallback)callback;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Asks the Spotify player to play the provided content item starting at the specified index.
|
|
75
|
-
*
|
|
76
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
77
|
-
* the track begins to play.
|
|
78
|
-
* @note The `playable` property of the `SPTAppRemoteContentItem` indicates whether or not a content item is
|
|
79
|
-
* playable.
|
|
80
|
-
* @note Sending an `index` parameter that is out of bounds is undefined.
|
|
81
|
-
*
|
|
82
|
-
* @param contentItem The content item to play.
|
|
83
|
-
* @param index The index of the track to skip to if applicable.
|
|
84
|
-
* @param callback On success `result` will be `YES`.
|
|
85
|
-
* On error `result` will be `nil` and error set
|
|
86
|
-
*/
|
|
87
|
-
- (void)playItem:(id<SPTAppRemoteContentItem>)contentItem skipToTrackIndex:(NSInteger) index callback:(nullable SPTAppRemoteCallback)callback;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Asks the Spotify player to resume playback.
|
|
91
|
-
*
|
|
92
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
93
|
-
* the playback resumes.
|
|
94
|
-
*
|
|
95
|
-
* @param callback On success `result` will be `YES`.
|
|
96
|
-
* On error `result` will be nil and error set
|
|
97
|
-
*/
|
|
98
|
-
- (void)resume:(nullable SPTAppRemoteCallback)callback;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Asks the Spotify player to pause playback.
|
|
102
|
-
*
|
|
103
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
104
|
-
* the playback pauses.
|
|
105
|
-
*
|
|
106
|
-
* @param callback On success `result` will be `YES`.
|
|
107
|
-
* On error `result` will be `nil` and error set
|
|
108
|
-
*/
|
|
109
|
-
- (void)pause:(nullable SPTAppRemoteCallback)callback;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Asks the Spotify player to skip to the next track.
|
|
113
|
-
*
|
|
114
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
115
|
-
* the track changes.
|
|
116
|
-
*
|
|
117
|
-
* @param callback On success `result` will be `YES`.
|
|
118
|
-
* On error `result` will be `nil` and error set
|
|
119
|
-
*/
|
|
120
|
-
- (void)skipToNext:(nullable SPTAppRemoteCallback)callback;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Asks the Spotify player to skip to the previous track.
|
|
124
|
-
*
|
|
125
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
126
|
-
* the track changes.
|
|
127
|
-
*
|
|
128
|
-
* @param callback On success `result` will be `YES`.
|
|
129
|
-
* On error `result` will be `nil` and `error` set
|
|
130
|
-
*/
|
|
131
|
-
- (void)skipToPrevious:(nullable SPTAppRemoteCallback)callback;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Asks the Spotify player to seek to the specified position.
|
|
135
|
-
*
|
|
136
|
-
* @param position The position to seek to in milliseconds.
|
|
137
|
-
* @param callback On success `result` will be `YES`.
|
|
138
|
-
* On error `result` will be `nil` and `error` set
|
|
139
|
-
*/
|
|
140
|
-
- (void)seekToPosition:(NSInteger)position callback:(nullable SPTAppRemoteCallback)callback;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Asks the Spotify player to seek forward 15 seconds.
|
|
144
|
-
* Note: You should only use this method if isEpisode = YES for the currently playing track
|
|
145
|
-
*
|
|
146
|
-
* @param callback On success `result` will be `YES`.
|
|
147
|
-
* On error `result` will be `nil` and `error` set
|
|
148
|
-
*/
|
|
149
|
-
- (void)seekForward15Seconds:(nullable SPTAppRemoteCallback)callback;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Asks the Spotify player to seek backward 15 seconds.
|
|
153
|
-
* Note: You should only use this method if isEpisode = YES for the currently playing track
|
|
154
|
-
*
|
|
155
|
-
* @param callback On success `result` will be `YES`.
|
|
156
|
-
* On error `result` will be `nil` and `error` set
|
|
157
|
-
*/
|
|
158
|
-
- (void)seekBackward15Seconds:(nullable SPTAppRemoteCallback)callback;
|
|
159
|
-
|
|
160
|
-
#pragma mark Playback Options
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Asks the Spotify player to set shuffle mode.
|
|
164
|
-
*
|
|
165
|
-
* @param shuffle `YES` to enable shuffle, `NO` to disable.
|
|
166
|
-
* @param callback On success `result` will be `YES`.
|
|
167
|
-
* On error `result` will be `nil` and `error` will be set.
|
|
168
|
-
*/
|
|
169
|
-
- (void)setShuffle:(BOOL)shuffle callback:(nullable SPTAppRemoteCallback)callback;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Asks the Spotify player to set the repeat mode.
|
|
173
|
-
*
|
|
174
|
-
* @param repeatMode The repeat mode to set.
|
|
175
|
-
* @param callback On success `result` will be `YES`.
|
|
176
|
-
* On error `result` will be `nil` and `error` will be set.
|
|
177
|
-
*/
|
|
178
|
-
- (void)setRepeatMode:(SPTAppRemotePlaybackOptionsRepeatMode)repeatMode callback:(nullable SPTAppRemoteCallback)callback;
|
|
179
|
-
|
|
180
|
-
#pragma mark Player State
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Asks the Spotify player for the current player state.
|
|
184
|
-
*
|
|
185
|
-
* @param callback On success `result` will be an instance of `id<SPTAppRemotePlayerState>`
|
|
186
|
-
* On error `result` will be nil and error set
|
|
187
|
-
*/
|
|
188
|
-
- (void)getPlayerState:(nullable SPTAppRemoteCallback)callback;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Subscribes to player state changes from the Spotify app.
|
|
192
|
-
*
|
|
193
|
-
* @note Implement `SPTAppRemotePlayerStateDelegate` and set yourself as delegate in order to be notified when the
|
|
194
|
-
* the player state changes.
|
|
195
|
-
*
|
|
196
|
-
* @param callback On success `result` will be an instance of `id<SPTAppRemotePlayerState>`
|
|
197
|
-
* On error `result` will be nil and error set
|
|
198
|
-
*/
|
|
199
|
-
- (void)subscribeToPlayerState:(nullable SPTAppRemoteCallback)callback;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Stops subscribing to player state changes from the Spotify app.
|
|
203
|
-
*
|
|
204
|
-
* @param callback On success `result` will be `YES`
|
|
205
|
-
* On error `result` will be `nil` and error set
|
|
206
|
-
*/
|
|
207
|
-
- (void)unsubscribeToPlayerState:(nullable SPTAppRemoteCallback)callback;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Adds a track to the user's currently playing queue
|
|
211
|
-
*
|
|
212
|
-
* @param trackUri The track URI to add to the queue
|
|
213
|
-
* @param callback On success `result` will be `YES`
|
|
214
|
-
* On error `result` will be `nil` and error set
|
|
215
|
-
*/
|
|
216
|
-
- (void)enqueueTrackUri:(NSString*)trackUri callback:(nullable SPTAppRemoteCallback)callback;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Asks the Spotify player for available podcast playback speeds
|
|
220
|
-
*
|
|
221
|
-
* @param callback On success `result` will be an `NSArray` of `SPTAppRemotePodcastPlaybackSpeed` objects
|
|
222
|
-
* On error `result` will be `nil` and `error` set
|
|
223
|
-
*/
|
|
224
|
-
- (void)getAvailablePodcastPlaybackSpeeds:(nullable SPTAppRemoteCallback)callback;
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Asks the Spotify player for the current podcast playback speed
|
|
228
|
-
*
|
|
229
|
-
* @note Podcast playback speed is seperate from other contents' playback speed. This value is only used for podcasts
|
|
230
|
-
*
|
|
231
|
-
* @param callback On success `result` will be a `SPTAppRemotePodcastPlaybackSpeed`
|
|
232
|
-
* On error `result` will be `nil` and `error` set
|
|
233
|
-
*/
|
|
234
|
-
- (void)getCurrentPodcastPlaybackSpeed:(nullable SPTAppRemoteCallback)callback;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Set the current podcast playback speed
|
|
238
|
-
*
|
|
239
|
-
* @note This playback speed will only affect podcasts and not other types of media. If you set this
|
|
240
|
-
* when a podcast is not playing this will be the default value when a podcast does begin to play. For this reason
|
|
241
|
-
* you may get a successful callback when setting this even when a podcast is not playing and the current playback
|
|
242
|
-
* speed does not change.
|
|
243
|
-
*
|
|
244
|
-
* @note You should use `getAvailablePodcastPlaybackSpeeds:` to get a list of valid speeds to pass to this method
|
|
245
|
-
*
|
|
246
|
-
* @param speed The `SPTAppRemotePodcastPlaybackSpeed` to set as the current podcast playback speed
|
|
247
|
-
* @param callback On success `result` will be `YES`.
|
|
248
|
-
* On error `result` will be `nil` and `error` set
|
|
249
|
-
*/
|
|
250
|
-
- (void)setPodcastPlaybackSpeed:(nonnull id<SPTAppRemotePodcastPlaybackSpeed>)speed callback:(nullable SPTAppRemoteCallback)callback;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Asks the Spotify player for the current crossfade state.
|
|
254
|
-
*
|
|
255
|
-
* @param callback On success `result` will be an instance of `id<SPTAppRemoteCrossfadeState>`
|
|
256
|
-
* On error `result` will be nil and error set
|
|
257
|
-
*/
|
|
258
|
-
- (void)getCrossfadeState:(nullable SPTAppRemoteCallback)callback;
|
|
259
|
-
|
|
260
|
-
@end
|
|
261
|
-
|
|
262
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
@protocol SPTAppRemoteTrack;
|
|
4
|
-
@protocol SPTAppRemotePlaybackOptions;
|
|
5
|
-
@protocol SPTAppRemotePlaybackRestrictions;
|
|
6
|
-
|
|
7
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The `SPTAppRemotePlayerState` represents the state within the Spotify player.
|
|
11
|
-
*/
|
|
12
|
-
@protocol SPTAppRemotePlayerState <NSObject>
|
|
13
|
-
|
|
14
|
-
/// The track being played in the Spotify player.
|
|
15
|
-
@property (nonatomic, readonly) id<SPTAppRemoteTrack> track;
|
|
16
|
-
|
|
17
|
-
/// The position of the playback in the Spotify player.
|
|
18
|
-
@property (nonatomic, readonly) NSInteger playbackPosition;
|
|
19
|
-
|
|
20
|
-
/// The speed of the playback in the Spotify player.
|
|
21
|
-
@property (nonatomic, readonly) float playbackSpeed;
|
|
22
|
-
|
|
23
|
-
/// `YES` if the Spotify player is paused, otherwise `NO`.
|
|
24
|
-
@property (nonatomic, readonly, getter=isPaused) BOOL paused;
|
|
25
|
-
|
|
26
|
-
/// The playback restrictions currently in effect.
|
|
27
|
-
@property (nonatomic, readonly) id<SPTAppRemotePlaybackRestrictions> playbackRestrictions;
|
|
28
|
-
|
|
29
|
-
/// The playback options currently in effect.
|
|
30
|
-
@property (nonatomic, readonly) id<SPTAppRemotePlaybackOptions> playbackOptions;
|
|
31
|
-
|
|
32
|
-
/// The title of the currently playing context (e.g. the name of the playlist).
|
|
33
|
-
@property (nonatomic, readonly) NSString *contextTitle;
|
|
34
|
-
|
|
35
|
-
/// The URI of the currently playing context (e.g. the URI of the playlist).
|
|
36
|
-
@property (nonatomic, readonly) NSURL *contextURI;
|
|
37
|
-
|
|
38
|
-
@end
|
|
39
|
-
|
|
40
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The `SPTAppRemotePodcastPlaybackSpeed` represents playback speed(s) for podcasts
|
|
7
|
-
*/
|
|
8
|
-
@protocol SPTAppRemotePodcastPlaybackSpeed <NSObject>
|
|
9
|
-
|
|
10
|
-
/// The speed multiplier representing this podcast speed. 0.5 = half speed, 2 = twice as fast, 1 = normal playback
|
|
11
|
-
@property (nonatomic, strong, readonly) NSNumber *value;
|
|
12
|
-
|
|
13
|
-
@end
|
|
14
|
-
|
|
15
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
#import "SPTAppRemoteImageRepresentable.h"
|
|
2
|
-
|
|
3
|
-
@protocol SPTAppRemoteAlbum;
|
|
4
|
-
@protocol SPTAppRemoteArtist;
|
|
5
|
-
|
|
6
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The `SPTAppRemoteTrack` represents a track.
|
|
10
|
-
*/
|
|
11
|
-
@protocol SPTAppRemoteTrack <NSObject, SPTAppRemoteImageRepresentable>
|
|
12
|
-
|
|
13
|
-
/// The name of the track.
|
|
14
|
-
@property (nonatomic, copy, readonly) NSString *name;
|
|
15
|
-
|
|
16
|
-
/// The URI of the track.
|
|
17
|
-
@property (nonatomic, copy, readonly) NSString *URI;
|
|
18
|
-
|
|
19
|
-
/// The duration of the track in miliseconds.
|
|
20
|
-
@property (nonatomic, assign, readonly) NSUInteger duration;
|
|
21
|
-
|
|
22
|
-
/// The artist of the track.
|
|
23
|
-
@property (nonatomic, strong, readonly) id<SPTAppRemoteArtist> artist;
|
|
24
|
-
|
|
25
|
-
/// The album of the track.
|
|
26
|
-
@property (nonatomic, strong, readonly) id<SPTAppRemoteAlbum> album;
|
|
27
|
-
|
|
28
|
-
/// `YES` if the user has saved the track, otherwise `NO`.
|
|
29
|
-
@property (nonatomic, assign, readonly, getter=isSaved) BOOL saved;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* `YES` if the track is a podcast, video, or other audio episode, otherwise `NO`.
|
|
33
|
-
* If the track is an episode and `SPTAppRemotePlaybackRestrictions` `canSeek` is `YES` you should show
|
|
34
|
-
* 15 second skip buttons in your UI.
|
|
35
|
-
*/
|
|
36
|
-
@property (nonatomic, assign, readonly, getter=isEpisode) BOOL episode;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* `YES` if the track is a podcast, otherwise `NO`.
|
|
40
|
-
* If the track is a podcast and `SPTAppRemotePlaybackRestrictions` `canSeek` is `YES` you should show
|
|
41
|
-
* 15 second skip buttons in your UI as well as a podcast speed control to change playback speed.
|
|
42
|
-
*/
|
|
43
|
-
@property (nonatomic, assign, readonly, getter=isPodcast) BOOL podcast;
|
|
44
|
-
|
|
45
|
-
@end
|
|
46
|
-
|
|
47
|
-
NS_ASSUME_NONNULL_END
|