diff --git a/.all-contributorsrc b/.all-contributorsrc index b431a63..809b8fd 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -121,10 +121,10 @@ ] }, { - "login": "hoang", + "login": "hoangvvo", "name": "Hoang", - "avatar_url": "https://avatars.githubusercontent.com/u/170571?v=4", - "profile": "https://github.com/hoang", + "avatar_url": "https://avatars.githubusercontent.com/u/40987398?v=4", + "profile": "https://github.com/hoangvvo", "contributions": [ "code" ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e69605..110b005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] + +### Refactor + +- feat: use react-native NativeEventEmitter (#189) + ### Fix - Update gradle to direct include aar files to fix [#194](https://github.com/cjam/react-native-spotify-remote/issues/194) + ## [0.3.11-6] - 2022-06-04 ### Fix + - Android null check to fix [#191](https://github.com/cjam/react-native-spotify-remote/issues/191) (Thanks @pretorh) ## [0.3.11-5] - 2022-02-10 @@ -30,15 +37,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - update `react-native-events` to `^1.0.21` (#174) ## [0.3.11-3] - 2021-12-19 + ### Fix + - Update react-native-events (Fix [#173](https://github.com/cjam/react-native-spotify-remote/issues/173)) - Fix PlayerRestrictions key name ([#172](https://github.com/cjam/react-native-spotify-remote/issues/172)) ## [0.3.11-2] - 2021-11-11 + ### Documentation + - Add note for Android 11 setup ### Chore + - Fix build scripts, add back the postpack script - update `.npmignore` diff --git a/README.md b/README.md index abaf52e..e93b769 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ npm install --save react-native-spotify-remote ## Linking -As of React Native `> 0.61`, auto linking should work for both iOS and Android. There shouldn't be any modifications necessary and it _Should_ work out of the box. The one caveat, is that `react-native-events` needs to be linked as it doesn't yet support auto linking. If you do run into issues or are using an older version of React Native, the following sections should help get you up and running. +As of React Native `> 0.61`, auto linking should work for both iOS and Android. There shouldn't be any modifications necessary and it _Should_ work out of the box. If you do run into issues or are using an older version of React Native, the following sections should help get you up and running. ### iOS @@ -86,7 +86,6 @@ As of React Native `> 0.61`, auto linking should work for both iOS and Android. By far the easiest way to integrate into your project. In your `ios/PodFile` add the following lines to your projects target: ```rb - pod 'RNEventEmitter', :path => "../node_modules/react-native-events" pod 'RNSpotifyRemote', :path => '../node_modules/react-native-spotify-remote' ``` @@ -139,15 +138,12 @@ Modifications are needed for the `AppDelegate.m`: If you need to link your project manually, here are some things you'll need to do. -> ### `react-native-events` does not support autolinking at this point and will need to be manually linked into your application - 1. Open up `android/app/src/main/java/[...]/MainApplication.java` - Add the following imports to the top of the file ``` import com.reactlibrary.RNSpotifyRemotePackage; -import com.lufinkey.react.eventemitter.RNEventEmitterPackage; ``` - Add to the list returned by `getPackages()` for example: @@ -158,7 +154,6 @@ import com.lufinkey.react.eventemitter.RNEventEmitterPackage; @SuppressWarnings("UnnecessaryLocalVariable") List packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: - packages.add(new RNEventEmitterPackage()); packages.add(new RNSpotifyRemotePackage()); return packages; } @@ -169,15 +164,11 @@ import com.lufinkey.react.eventemitter.RNEventEmitterPackage; ``` include ':react-native-spotify-remote' project(':react-native-spotify-remote').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-spotify-remote/android') - - include ':react-native-events' - project(':react-native-events').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-events/android') ``` 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: ``` implementation project(':react-native-spotify-remote') - implementation project(':react-native-events') ``` 4. As per the [Spotify Android SDK Docs](https://developer.spotify.com/documentation/android/guides/android-authentication/) Insert the following lines into `android/app/src/AndroidManifest.xml` @@ -270,7 +261,7 @@ Please do not open issues about getting the module to work unless you have tried Big thanks to [@lufinkey](https://github.com/lufinkey) and all of the great work that he has done in the [react-native-spotify](https://github.com/lufinkey/react-native-spotify) repo which was the original source of inspiration and some useful patterns for this package. -[![All Contributors](https://img.shields.io/badge/all_contributors-14-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-) @@ -292,7 +283,7 @@ Big thanks to [@lufinkey](https://github.com/lufinkey) and all of the great work
Reinhard HΓΆll

πŸ› πŸ’»
Gustavo GraΓ±a

πŸ› πŸ’»
Dylan

πŸ’» -
Hoang

πŸ’» +
Hoang

πŸ’»
Hendri Pretorius

πŸ› πŸ’» @@ -301,7 +292,6 @@ Big thanks to [@lufinkey](https://github.com/lufinkey) and all of the great work - ## Projects using this library -Checkout existing [Projects](./PROJECTS.md) that are using this library. \ No newline at end of file +Checkout existing [Projects](./PROJECTS.md) that are using this library. diff --git a/android/build.gradle b/android/build.gradle index 0e881df..fda54cb 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -69,7 +69,6 @@ dependencies { implementation (name: "spotify-auth-release-1.2.3", ext: "aar") implementation (name: "spotify-app-remote-release-0.7.2", ext: "aar") implementation "com.google.code.gson:gson:2.8.5" // needed by spotify-app-remote - implementation project(path: ':react-native-events') // From node_module //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules } diff --git a/android/src/main/java/com/reactlibrary/RNSpotifyRemoteAppModule.java b/android/src/main/java/com/reactlibrary/RNSpotifyRemoteAppModule.java index 92b7ec2..3e387e5 100644 --- a/android/src/main/java/com/reactlibrary/RNSpotifyRemoteAppModule.java +++ b/android/src/main/java/com/reactlibrary/RNSpotifyRemoteAppModule.java @@ -1,4 +1,3 @@ - package com.reactlibrary; import android.util.Log; @@ -13,7 +12,7 @@ import com.facebook.react.bridge.ReadableMap; import com.facebook.react.bridge.WritableMap; import com.facebook.react.module.annotations.ReactModule; -import com.lufinkey.react.eventemitter.RNEventEmitter; +import com.facebook.react.modules.core.DeviceEventManagerModule; import com.spotify.android.appremote.api.ConnectionParams; import com.spotify.android.appremote.api.Connector; import com.spotify.android.appremote.api.SpotifyAppRemote; @@ -21,17 +20,19 @@ import com.spotify.android.appremote.api.error.NotLoggedInException; import com.spotify.android.appremote.api.error.UserNotAuthorizedException; -import com.lufinkey.react.eventemitter.RNEventConformer; - import com.spotify.protocol.client.CallResult; import com.spotify.protocol.client.ErrorCallback; import com.spotify.protocol.types.ListItem; -import java.util.Stack; +import com.spotify.protocol.client.Subscription; +import com.spotify.protocol.types.PlayerContext; +import com.spotify.protocol.types.PlayerState; +import java.util.Stack; +import java.util.HashMap; @ReactModule(name = "RNSpotifyRemoteAppRemote") -public class RNSpotifyRemoteAppModule extends ReactContextBaseJavaModule implements RNEventConformer { +public class RNSpotifyRemoteAppModule extends ReactContextBaseJavaModule { private static final String LOG_TAG = "RNSpotifyAppRemote"; private final ReactApplicationContext reactContext; @@ -41,6 +42,16 @@ public class RNSpotifyRemoteAppModule extends ReactContextBaseJavaModule impleme private Connector.ConnectionListener mSpotifyRemoteConnectionListener; private Stack mConnectPromises = new Stack(); + private Subscription mPlayerContextSubscription; + private Subscription mPlayerStateSubscription; + + public static final String EventNamePlayerStateChanged = "playerStateChanged"; + public static final String EventNamePlayerContextChanged = "playerContextChanged"; + public static final String EventNameRemoteDisconnected = "remoteDisconnected"; + public static final String EventNameRemoteConnected = "remoteConnected"; + + private HashMap subscriptionHasListeners = new HashMap(); + public RNSpotifyRemoteAppModule(ReactApplicationContext reactContext) { super(reactContext); this.reactContext = reactContext; @@ -48,12 +59,12 @@ public RNSpotifyRemoteAppModule(ReactApplicationContext reactContext) { public void onConnected(SpotifyAppRemote spotifyAppRemote) { mSpotifyAppRemote = spotifyAppRemote; - handleOnConnect(); + handleEventSubscriptions(); while (!mConnectPromises.empty()) { Promise promise = mConnectPromises.pop(); promise.resolve(true); } - sendEvent("remoteConnected", null); + sendEvent(EventNameRemoteConnected, null); } public void onFailure(Throwable throwable) { @@ -66,52 +77,85 @@ public void onFailure(Throwable throwable) { } else if (throwable instanceof CouldNotFindSpotifyApp) { promise.reject(new Error("Spotify connection failed: could not find the Spotify app, it may need to be installed.")); } else { - promise.reject(throwable); + promise.reject(throwable); } } - sendEvent("remoteDisconnected", null); + sendEvent(EventNameRemoteDisconnected, null); } }; } - @Override - @ReactMethod - public void __registerAsJSEventEmitter(int moduleId) { - RNEventEmitter.registerEventEmitterModule(this.reactContext, moduleId, this); + private void sendEvent(String eventName, + Object params) { + reactContext + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) + .emit(eventName, params); } - @Override - public void onNativeEvent(String eventName, Object... args) { - // Called when an event for this module is emitted from native code + @ReactMethod + public void addListener(String eventName) { + // Set up any upstream listeners or background tasks as necessary } - @Override - public void onJSEvent(String eventName, Object... args) { - // Called when an event for this module is emitted from javascript + @ReactMethod + public void removeListeners(Integer count) { + // Remove upstream listeners, stop unnecessary background tasks } - @Override - public void onEvent(String eventName, Object... args) { - // Called when any event for this module is emitted + @ReactMethod + public void eventStartObserving(String eventName) { + // Will be called when the event first listener is added. + subscriptionHasListeners.put(eventName, true); + handleEventSubscriptions(); } - private void sendEvent(String eventMame, Object data) { - RNEventEmitter.emitEvent(this.reactContext, this, eventMame, data); + @ReactMethod + public void eventStopObserving(String eventName) { + // Will be called when the event last listener is removed. + subscriptionHasListeners.put(eventName, false); + handleEventSubscriptions(); } - - private void handleOnConnect() { - mSpotifyAppRemote.getPlayerApi() - .subscribeToPlayerContext() - .setEventCallback(playerContext -> { - ReadableMap map = Convert.toMap(playerContext); - sendEvent("playerContextChanged", map); - }); - mSpotifyAppRemote.getPlayerApi() - .subscribeToPlayerState() - .setEventCallback(playerState -> { - WritableMap map = Convert.toMap(playerState); - sendEvent("playerStateChanged", map); - }); + + private void handleEventSubscriptions() { + if (mSpotifyAppRemote == null) + return; + + Boolean hasContextListeners = subscriptionHasListeners.get(EventNamePlayerContextChanged); + Boolean hasPlayerStateListeners = subscriptionHasListeners.get(EventNamePlayerContextChanged); + + if (hasContextListeners != null && hasContextListeners) { + if (mPlayerContextSubscription != null && !mPlayerContextSubscription.isCanceled()) { + return; // already subscribed + } + mPlayerContextSubscription = mSpotifyAppRemote.getPlayerApi() + .subscribeToPlayerContext() + .setEventCallback(playerContext -> { + ReadableMap map = Convert.toMap(playerContext); + sendEvent(EventNamePlayerContextChanged, map); + }); + } else { + if (mPlayerContextSubscription != null && !mPlayerContextSubscription.isCanceled()) { + mPlayerContextSubscription.cancel(); + mPlayerContextSubscription = null; + } + } + + if (hasPlayerStateListeners != null && hasPlayerStateListeners) { + if (mPlayerStateSubscription != null && !mPlayerStateSubscription.isCanceled()) { + return; // already subscribed + } + mPlayerStateSubscription = mSpotifyAppRemote.getPlayerApi() + .subscribeToPlayerState() + .setEventCallback(playerContext -> { + ReadableMap map = Convert.toMap(playerContext); + sendEvent(EventNamePlayerStateChanged, map); + }); + } else { + if (mPlayerStateSubscription != null && !mPlayerStateSubscription.isCanceled()) { + mPlayerStateSubscription.cancel(); + mPlayerStateSubscription = null; + } + } } private void executeAppRemoteCall(Function> apiCall, CallResult.ResultCallback resultCallback, ErrorCallback errorCallback) { @@ -132,7 +176,7 @@ private void getPlayerStateInternal(CallResult.ResultCallback resul .setResultCallback(playerState -> { WritableMap map = Convert.toMap(playerState); WritableMap eventMap = Convert.toMap(playerState); - sendEvent("playerStateChanged", eventMap); + sendEvent(EventNamePlayerStateChanged, eventMap); resultCallback.onResult(map); }) .setErrorCallback(errorCallback); @@ -186,7 +230,7 @@ public void connect(String token, Promise promise) { public void disconnect(Promise promise) { if (mSpotifyAppRemote != null) { SpotifyAppRemote.disconnect(mSpotifyAppRemote); - sendEvent("remoteDisconnected", null); + sendEvent(EventNameRemoteDisconnected, null); } promise.resolve(null); } diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js index b19a719..e9eefaa 100644 --- a/docs/assets/js/search.js +++ b/docs/assets/js/search.js @@ -1 +1 @@ -window.searchData = {"kinds":{"4":"Enumeration","16":"Enumeration member","32":"Variable","256":"Interface","1024":"Property","2048":"Method","4194304":"Type alias"},"rows":[{"id":0,"kind":32,"name":"auth","url":"modules.html#auth","classes":"tsd-kind-variable"},{"id":1,"kind":32,"name":"remote","url":"modules.html#remote","classes":"tsd-kind-variable"},{"id":2,"kind":256,"name":"ApiConfig","url":"interfaces/apiconfig.html","classes":"tsd-kind-interface"},{"id":3,"kind":1024,"name":"clientID","url":"interfaces/apiconfig.html#clientid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":4,"kind":1024,"name":"redirectURL","url":"interfaces/apiconfig.html#redirecturl","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":5,"kind":1024,"name":"tokenSwapURL","url":"interfaces/apiconfig.html#tokenswapurl","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":6,"kind":1024,"name":"tokenRefreshURL","url":"interfaces/apiconfig.html#tokenrefreshurl","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":7,"kind":1024,"name":"playURI","url":"interfaces/apiconfig.html#playuri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":8,"kind":1024,"name":"scopes","url":"interfaces/apiconfig.html#scopes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":9,"kind":1024,"name":"showDialog","url":"interfaces/apiconfig.html#showdialog","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":10,"kind":1024,"name":"authType","url":"interfaces/apiconfig.html#authtype","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":11,"kind":4,"name":"ApiScope","url":"enums/apiscope.html","classes":"tsd-kind-enum"},{"id":12,"kind":16,"name":"PlaylistReadPrivateScope","url":"enums/apiscope.html#playlistreadprivatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":13,"kind":16,"name":"PlaylistReadCollaborativeScope","url":"enums/apiscope.html#playlistreadcollaborativescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":14,"kind":16,"name":"PlaylistModifyPublicScope","url":"enums/apiscope.html#playlistmodifypublicscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":15,"kind":16,"name":"PlaylistModifyPrivateScope","url":"enums/apiscope.html#playlistmodifyprivatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":16,"kind":16,"name":"UserFollowReadScope","url":"enums/apiscope.html#userfollowreadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":17,"kind":16,"name":"UserFollowModifyScope","url":"enums/apiscope.html#userfollowmodifyscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":18,"kind":16,"name":"UserLibraryReadScope","url":"enums/apiscope.html#userlibraryreadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":19,"kind":16,"name":"UserLibraryModifyScope","url":"enums/apiscope.html#userlibrarymodifyscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":20,"kind":16,"name":"UserReadBirthDateScope","url":"enums/apiscope.html#userreadbirthdatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":21,"kind":16,"name":"UserReadEmailScope","url":"enums/apiscope.html#userreademailscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":22,"kind":16,"name":"UserReadPrivateScope","url":"enums/apiscope.html#userreadprivatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":23,"kind":16,"name":"UserTopReadScope","url":"enums/apiscope.html#usertopreadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":24,"kind":16,"name":"UGCImageUploadScope","url":"enums/apiscope.html#ugcimageuploadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":25,"kind":16,"name":"StreamingScope","url":"enums/apiscope.html#streamingscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":26,"kind":16,"name":"AppRemoteControlScope","url":"enums/apiscope.html#appremotecontrolscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":27,"kind":16,"name":"UserReadPlaybackStateScope","url":"enums/apiscope.html#userreadplaybackstatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":28,"kind":16,"name":"UserReadPlaybackPosition","url":"enums/apiscope.html#userreadplaybackposition","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":29,"kind":16,"name":"UserModifyPlaybackStateScope","url":"enums/apiscope.html#usermodifyplaybackstatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":30,"kind":16,"name":"UserReadCurrentlyPlayingScope","url":"enums/apiscope.html#userreadcurrentlyplayingscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":31,"kind":16,"name":"UserReadRecentlyPlayedScope","url":"enums/apiscope.html#userreadrecentlyplayedscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":32,"kind":16,"name":"UserReadCurrentlyPlaying","url":"enums/apiscope.html#userreadcurrentlyplaying","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":33,"kind":4,"name":"RepeatMode","url":"enums/repeatmode.html","classes":"tsd-kind-enum"},{"id":34,"kind":16,"name":"Off","url":"enums/repeatmode.html#off","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RepeatMode"},{"id":35,"kind":16,"name":"Track","url":"enums/repeatmode.html#track","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RepeatMode"},{"id":36,"kind":16,"name":"Context","url":"enums/repeatmode.html#context","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RepeatMode"},{"id":37,"kind":256,"name":"PlayerState","url":"interfaces/playerstate.html","classes":"tsd-kind-interface"},{"id":38,"kind":1024,"name":"track","url":"interfaces/playerstate.html#track","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":39,"kind":1024,"name":"playbackPosition","url":"interfaces/playerstate.html#playbackposition","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":40,"kind":1024,"name":"playbackSpeed","url":"interfaces/playerstate.html#playbackspeed","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":41,"kind":1024,"name":"isPaused","url":"interfaces/playerstate.html#ispaused","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":42,"kind":1024,"name":"playbackRestrictions","url":"interfaces/playerstate.html#playbackrestrictions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":43,"kind":1024,"name":"playbackOptions","url":"interfaces/playerstate.html#playbackoptions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":44,"kind":256,"name":"PlayerContext","url":"interfaces/playercontext.html","classes":"tsd-kind-interface"},{"id":45,"kind":1024,"name":"title","url":"interfaces/playercontext.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerContext"},{"id":46,"kind":1024,"name":"uri","url":"interfaces/playercontext.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerContext"},{"id":47,"kind":256,"name":"Track","url":"interfaces/track.html","classes":"tsd-kind-interface"},{"id":48,"kind":1024,"name":"name","url":"interfaces/track.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":49,"kind":1024,"name":"uri","url":"interfaces/track.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":50,"kind":1024,"name":"duration","url":"interfaces/track.html#duration","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":51,"kind":1024,"name":"artist","url":"interfaces/track.html#artist","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":52,"kind":1024,"name":"album","url":"interfaces/track.html#album","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":53,"kind":1024,"name":"saved","url":"interfaces/track.html#saved","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":54,"kind":1024,"name":"episode","url":"interfaces/track.html#episode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":55,"kind":1024,"name":"podcast","url":"interfaces/track.html#podcast","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":56,"kind":256,"name":"Artist","url":"interfaces/artist.html","classes":"tsd-kind-interface"},{"id":57,"kind":1024,"name":"name","url":"interfaces/artist.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Artist"},{"id":58,"kind":1024,"name":"uri","url":"interfaces/artist.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Artist"},{"id":59,"kind":256,"name":"Album","url":"interfaces/album.html","classes":"tsd-kind-interface"},{"id":60,"kind":1024,"name":"name","url":"interfaces/album.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Album"},{"id":61,"kind":1024,"name":"uri","url":"interfaces/album.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Album"},{"id":62,"kind":4194304,"name":"ContentType","url":"modules.html#contenttype","classes":"tsd-kind-type-alias"},{"id":63,"kind":256,"name":"ContentItem","url":"interfaces/contentitem.html","classes":"tsd-kind-interface"},{"id":64,"kind":1024,"name":"title","url":"interfaces/contentitem.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":65,"kind":1024,"name":"subtitle","url":"interfaces/contentitem.html#subtitle","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":66,"kind":1024,"name":"id","url":"interfaces/contentitem.html#id","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":67,"kind":1024,"name":"uri","url":"interfaces/contentitem.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":68,"kind":1024,"name":"availableOffline","url":"interfaces/contentitem.html#availableoffline","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":69,"kind":1024,"name":"playable","url":"interfaces/contentitem.html#playable","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":70,"kind":1024,"name":"container","url":"interfaces/contentitem.html#container","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":71,"kind":1024,"name":"children","url":"interfaces/contentitem.html#children","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":72,"kind":256,"name":"CrossfadeState","url":"interfaces/crossfadestate.html","classes":"tsd-kind-interface"},{"id":73,"kind":1024,"name":"enabled","url":"interfaces/crossfadestate.html#enabled","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CrossfadeState"},{"id":74,"kind":1024,"name":"duration","url":"interfaces/crossfadestate.html#duration","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CrossfadeState"},{"id":75,"kind":256,"name":"SpotifySession","url":"interfaces/spotifysession.html","classes":"tsd-kind-interface"},{"id":76,"kind":1024,"name":"accessToken","url":"interfaces/spotifysession.html#accesstoken","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":77,"kind":1024,"name":"refreshToken","url":"interfaces/spotifysession.html#refreshtoken","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":78,"kind":1024,"name":"expirationDate","url":"interfaces/spotifysession.html#expirationdate","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":79,"kind":1024,"name":"scope","url":"interfaces/spotifysession.html#scope","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":80,"kind":1024,"name":"expired","url":"interfaces/spotifysession.html#expired","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":81,"kind":256,"name":"GetChildrenItemsOptions","url":"interfaces/getchildrenitemsoptions.html","classes":"tsd-kind-interface"},{"id":82,"kind":1024,"name":"perPage","url":"interfaces/getchildrenitemsoptions.html#perpage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GetChildrenItemsOptions"},{"id":83,"kind":1024,"name":"offset","url":"interfaces/getchildrenitemsoptions.html#offset","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GetChildrenItemsOptions"},{"id":84,"kind":256,"name":"PlaybackOptions","url":"interfaces/playbackoptions.html","classes":"tsd-kind-interface"},{"id":85,"kind":1024,"name":"isShuffling","url":"interfaces/playbackoptions.html#isshuffling","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackOptions"},{"id":86,"kind":1024,"name":"repeatMode","url":"interfaces/playbackoptions.html#repeatmode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackOptions"},{"id":87,"kind":256,"name":"PlaybackRestrictions","url":"interfaces/playbackrestrictions.html","classes":"tsd-kind-interface"},{"id":88,"kind":1024,"name":"canSkipNext","url":"interfaces/playbackrestrictions.html#canskipnext","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":89,"kind":1024,"name":"canSkipPrevious","url":"interfaces/playbackrestrictions.html#canskipprevious","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":90,"kind":1024,"name":"canRepeatTrack","url":"interfaces/playbackrestrictions.html#canrepeattrack","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":91,"kind":1024,"name":"canRepeatContext","url":"interfaces/playbackrestrictions.html#canrepeatcontext","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":92,"kind":1024,"name":"canToggleShuffle","url":"interfaces/playbackrestrictions.html#cantoggleshuffle","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":93,"kind":1024,"name":"canSeek","url":"interfaces/playbackrestrictions.html#canseek","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":94,"kind":256,"name":"RecommendedContentOptions","url":"interfaces/recommendedcontentoptions.html","classes":"tsd-kind-interface"},{"id":95,"kind":1024,"name":"type","url":"interfaces/recommendedcontentoptions.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecommendedContentOptions"},{"id":96,"kind":1024,"name":"flatten","url":"interfaces/recommendedcontentoptions.html#flatten","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecommendedContentOptions"},{"id":97,"kind":256,"name":"SpotifyAuth","url":"interfaces/spotifyauth.html","classes":"tsd-kind-interface"},{"id":98,"kind":2048,"name":"initialize","url":"interfaces/spotifyauth.html#initialize","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":99,"kind":2048,"name":"authorize","url":"interfaces/spotifyauth.html#authorize","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":100,"kind":2048,"name":"endSession","url":"interfaces/spotifyauth.html#endsession","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":101,"kind":2048,"name":"getSession","url":"interfaces/spotifyauth.html#getsession","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":102,"kind":256,"name":"SpotifyRemoteApi","url":"interfaces/spotifyremoteapi.html","classes":"tsd-kind-interface"},{"id":103,"kind":2048,"name":"isConnectedAsync","url":"interfaces/spotifyremoteapi.html#isconnectedasync","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":104,"kind":2048,"name":"connect","url":"interfaces/spotifyremoteapi.html#connect","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":105,"kind":2048,"name":"disconnect","url":"interfaces/spotifyremoteapi.html#disconnect","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":106,"kind":2048,"name":"playUri","url":"interfaces/spotifyremoteapi.html#playuri","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":107,"kind":2048,"name":"playItem","url":"interfaces/spotifyremoteapi.html#playitem","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":108,"kind":2048,"name":"playItemWithIndex","url":"interfaces/spotifyremoteapi.html#playitemwithindex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":109,"kind":2048,"name":"queueUri","url":"interfaces/spotifyremoteapi.html#queueuri","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":110,"kind":2048,"name":"seek","url":"interfaces/spotifyremoteapi.html#seek","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":111,"kind":2048,"name":"resume","url":"interfaces/spotifyremoteapi.html#resume","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":112,"kind":2048,"name":"pause","url":"interfaces/spotifyremoteapi.html#pause","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":113,"kind":2048,"name":"skipToNext","url":"interfaces/spotifyremoteapi.html#skiptonext","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":114,"kind":2048,"name":"skipToPrevious","url":"interfaces/spotifyremoteapi.html#skiptoprevious","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":115,"kind":2048,"name":"setShuffling","url":"interfaces/spotifyremoteapi.html#setshuffling","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":116,"kind":2048,"name":"setRepeatMode","url":"interfaces/spotifyremoteapi.html#setrepeatmode","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":117,"kind":2048,"name":"getPlayerState","url":"interfaces/spotifyremoteapi.html#getplayerstate","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":118,"kind":2048,"name":"getRootContentItems","url":"interfaces/spotifyremoteapi.html#getrootcontentitems","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":119,"kind":2048,"name":"getRecommendedContentItems","url":"interfaces/spotifyremoteapi.html#getrecommendedcontentitems","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":120,"kind":2048,"name":"getChildrenOfItem","url":"interfaces/spotifyremoteapi.html#getchildrenofitem","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":121,"kind":2048,"name":"getContentItemForUri","url":"interfaces/spotifyremoteapi.html#getcontentitemforuri","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":122,"kind":2048,"name":"getCrossfadeState","url":"interfaces/spotifyremoteapi.html#getcrossfadestate","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":123,"kind":2048,"name":"on","url":"interfaces/spotifyremoteapi.html#on","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":124,"kind":2048,"name":"addListener","url":"interfaces/spotifyremoteapi.html#addlistener","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":125,"kind":2048,"name":"once","url":"interfaces/spotifyremoteapi.html#once","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":126,"kind":2048,"name":"prependListener","url":"interfaces/spotifyremoteapi.html#prependlistener","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":127,"kind":2048,"name":"prependOnceListener","url":"interfaces/spotifyremoteapi.html#prependoncelistener","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":128,"kind":2048,"name":"removeListener","url":"interfaces/spotifyremoteapi.html#removelistener","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":129,"kind":2048,"name":"off","url":"interfaces/spotifyremoteapi.html#off","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":130,"kind":2048,"name":"removeAllListeners","url":"interfaces/spotifyremoteapi.html#removealllisteners","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":131,"kind":2048,"name":"setMaxListeners","url":"interfaces/spotifyremoteapi.html#setmaxlisteners","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":132,"kind":2048,"name":"getMaxListeners","url":"interfaces/spotifyremoteapi.html#getmaxlisteners","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":133,"kind":2048,"name":"listeners","url":"interfaces/spotifyremoteapi.html#listeners","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":134,"kind":2048,"name":"rawListeners","url":"interfaces/spotifyremoteapi.html#rawlisteners","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":135,"kind":2048,"name":"emit","url":"interfaces/spotifyremoteapi.html#emit","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":136,"kind":2048,"name":"eventNames","url":"interfaces/spotifyremoteapi.html#eventnames","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":137,"kind":2048,"name":"listenerCount","url":"interfaces/spotifyremoteapi.html#listenercount","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":138,"kind":2048,"name":"setPlaying","url":"interfaces/spotifyremoteapi.html#setplaying","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":139,"kind":256,"name":"SpotifyRemoteEvents","url":"interfaces/spotifyremoteevents.html","classes":"tsd-kind-interface"},{"id":140,"kind":1024,"name":"playerStateChanged","url":"interfaces/spotifyremoteevents.html#playerstatechanged","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"},{"id":141,"kind":1024,"name":"playerContextChanged","url":"interfaces/spotifyremoteevents.html#playercontextchanged","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"},{"id":142,"kind":1024,"name":"remoteDisconnected","url":"interfaces/spotifyremoteevents.html#remotedisconnected","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"},{"id":143,"kind":1024,"name":"remoteConnected","url":"interfaces/spotifyremoteevents.html#remoteconnected","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,45.713]],["parent/0",[]],["name/1",[1,45.713]],["parent/1",[]],["name/2",[2,27.254]],["parent/2",[]],["name/3",[3,45.713]],["parent/3",[2,2.548]],["name/4",[4,45.713]],["parent/4",[2,2.548]],["name/5",[5,45.713]],["parent/5",[2,2.548]],["name/6",[6,45.713]],["parent/6",[2,2.548]],["name/7",[7,40.604]],["parent/7",[2,2.548]],["name/8",[8,45.713]],["parent/8",[2,2.548]],["name/9",[9,45.713]],["parent/9",[2,2.548]],["name/10",[10,45.713]],["parent/10",[2,2.548]],["name/11",[11,18.632]],["parent/11",[]],["name/12",[12,45.713]],["parent/12",[11,1.742]],["name/13",[13,45.713]],["parent/13",[11,1.742]],["name/14",[14,45.713]],["parent/14",[11,1.742]],["name/15",[15,45.713]],["parent/15",[11,1.742]],["name/16",[16,45.713]],["parent/16",[11,1.742]],["name/17",[17,45.713]],["parent/17",[11,1.742]],["name/18",[18,45.713]],["parent/18",[11,1.742]],["name/19",[19,45.713]],["parent/19",[11,1.742]],["name/20",[20,45.713]],["parent/20",[11,1.742]],["name/21",[21,45.713]],["parent/21",[11,1.742]],["name/22",[22,45.713]],["parent/22",[11,1.742]],["name/23",[23,45.713]],["parent/23",[11,1.742]],["name/24",[24,45.713]],["parent/24",[11,1.742]],["name/25",[25,45.713]],["parent/25",[11,1.742]],["name/26",[26,45.713]],["parent/26",[11,1.742]],["name/27",[27,45.713]],["parent/27",[11,1.742]],["name/28",[28,45.713]],["parent/28",[11,1.742]],["name/29",[29,45.713]],["parent/29",[11,1.742]],["name/30",[30,45.713]],["parent/30",[11,1.742]],["name/31",[31,45.713]],["parent/31",[11,1.742]],["name/32",[32,45.713]],["parent/32",[11,1.742]],["name/33",[33,32.72]],["parent/33",[]],["name/34",[34,40.604]],["parent/34",[33,3.058]],["name/35",[35,25.344]],["parent/35",[33,3.058]],["name/36",[36,45.713]],["parent/36",[33,3.058]],["name/37",[37,29.618]],["parent/37",[]],["name/38",[35,25.344]],["parent/38",[37,2.768]],["name/39",[38,45.713]],["parent/39",[37,2.768]],["name/40",[39,45.713]],["parent/40",[37,2.768]],["name/41",[40,45.713]],["parent/41",[37,2.768]],["name/42",[41,28.367]],["parent/42",[37,2.768]],["name/43",[42,34.727]],["parent/43",[37,2.768]],["name/44",[43,37.24]],["parent/44",[]],["name/45",[44,40.604]],["parent/45",[43,3.481]],["name/46",[45,32.72]],["parent/46",[43,3.481]],["name/47",[35,25.344]],["parent/47",[]],["name/48",[46,37.24]],["parent/48",[35,2.369]],["name/49",[45,32.72]],["parent/49",[35,2.369]],["name/50",[47,40.604]],["parent/50",[35,2.369]],["name/51",[48,34.727]],["parent/51",[35,2.369]],["name/52",[49,34.727]],["parent/52",[35,2.369]],["name/53",[50,45.713]],["parent/53",[35,2.369]],["name/54",[51,45.713]],["parent/54",[35,2.369]],["name/55",[52,45.713]],["parent/55",[35,2.369]],["name/56",[48,34.727]],["parent/56",[]],["name/57",[46,37.24]],["parent/57",[48,3.246]],["name/58",[45,32.72]],["parent/58",[48,3.246]],["name/59",[49,34.727]],["parent/59",[]],["name/60",[46,37.24]],["parent/60",[49,3.246]],["name/61",[45,32.72]],["parent/61",[49,3.246]],["name/62",[53,45.713]],["parent/62",[]],["name/63",[54,27.254]],["parent/63",[]],["name/64",[44,40.604]],["parent/64",[54,2.548]],["name/65",[55,45.713]],["parent/65",[54,2.548]],["name/66",[56,45.713]],["parent/66",[54,2.548]],["name/67",[45,32.72]],["parent/67",[54,2.548]],["name/68",[57,45.713]],["parent/68",[54,2.548]],["name/69",[58,45.713]],["parent/69",[54,2.548]],["name/70",[59,45.713]],["parent/70",[54,2.548]],["name/71",[60,45.713]],["parent/71",[54,2.548]],["name/72",[61,37.24]],["parent/72",[]],["name/73",[62,45.713]],["parent/73",[61,3.481]],["name/74",[47,40.604]],["parent/74",[61,3.481]],["name/75",[63,31.049]],["parent/75",[]],["name/76",[64,45.713]],["parent/76",[63,2.902]],["name/77",[65,45.713]],["parent/77",[63,2.902]],["name/78",[66,45.713]],["parent/78",[63,2.902]],["name/79",[67,45.713]],["parent/79",[63,2.902]],["name/80",[68,45.713]],["parent/80",[63,2.902]],["name/81",[69,37.24]],["parent/81",[]],["name/82",[70,45.713]],["parent/82",[69,3.481]],["name/83",[71,45.713]],["parent/83",[69,3.481]],["name/84",[42,34.727]],["parent/84",[]],["name/85",[72,45.713]],["parent/85",[42,3.246]],["name/86",[33,32.72]],["parent/86",[42,3.246]],["name/87",[41,28.367]],["parent/87",[]],["name/88",[73,45.713]],["parent/88",[41,2.651]],["name/89",[74,45.713]],["parent/89",[41,2.651]],["name/90",[75,45.713]],["parent/90",[41,2.651]],["name/91",[76,45.713]],["parent/91",[41,2.651]],["name/92",[77,45.713]],["parent/92",[41,2.651]],["name/93",[78,45.713]],["parent/93",[41,2.651]],["name/94",[79,37.24]],["parent/94",[]],["name/95",[80,45.713]],["parent/95",[79,3.481]],["name/96",[81,45.713]],["parent/96",[79,3.481]],["name/97",[82,32.72]],["parent/97",[]],["name/98",[83,45.713]],["parent/98",[82,3.058]],["name/99",[84,45.713]],["parent/99",[82,3.058]],["name/100",[85,45.713]],["parent/100",[82,3.058]],["name/101",[86,45.713]],["parent/101",[82,3.058]],["name/102",[87,13.524]],["parent/102",[]],["name/103",[88,45.713]],["parent/103",[87,1.264]],["name/104",[89,45.713]],["parent/104",[87,1.264]],["name/105",[90,45.713]],["parent/105",[87,1.264]],["name/106",[7,40.604]],["parent/106",[87,1.264]],["name/107",[91,45.713]],["parent/107",[87,1.264]],["name/108",[92,45.713]],["parent/108",[87,1.264]],["name/109",[93,45.713]],["parent/109",[87,1.264]],["name/110",[94,45.713]],["parent/110",[87,1.264]],["name/111",[95,45.713]],["parent/111",[87,1.264]],["name/112",[96,45.713]],["parent/112",[87,1.264]],["name/113",[97,45.713]],["parent/113",[87,1.264]],["name/114",[98,45.713]],["parent/114",[87,1.264]],["name/115",[99,45.713]],["parent/115",[87,1.264]],["name/116",[100,45.713]],["parent/116",[87,1.264]],["name/117",[101,45.713]],["parent/117",[87,1.264]],["name/118",[102,45.713]],["parent/118",[87,1.264]],["name/119",[103,45.713]],["parent/119",[87,1.264]],["name/120",[104,45.713]],["parent/120",[87,1.264]],["name/121",[105,45.713]],["parent/121",[87,1.264]],["name/122",[106,45.713]],["parent/122",[87,1.264]],["name/123",[107,45.713]],["parent/123",[87,1.264]],["name/124",[108,45.713]],["parent/124",[87,1.264]],["name/125",[109,45.713]],["parent/125",[87,1.264]],["name/126",[110,45.713]],["parent/126",[87,1.264]],["name/127",[111,45.713]],["parent/127",[87,1.264]],["name/128",[112,45.713]],["parent/128",[87,1.264]],["name/129",[34,40.604]],["parent/129",[87,1.264]],["name/130",[113,45.713]],["parent/130",[87,1.264]],["name/131",[114,45.713]],["parent/131",[87,1.264]],["name/132",[115,45.713]],["parent/132",[87,1.264]],["name/133",[116,45.713]],["parent/133",[87,1.264]],["name/134",[117,45.713]],["parent/134",[87,1.264]],["name/135",[118,45.713]],["parent/135",[87,1.264]],["name/136",[119,45.713]],["parent/136",[87,1.264]],["name/137",[120,45.713]],["parent/137",[87,1.264]],["name/138",[121,45.713]],["parent/138",[87,1.264]],["name/139",[122,32.72]],["parent/139",[]],["name/140",[123,45.713]],["parent/140",[122,3.058]],["name/141",[124,45.713]],["parent/141",[122,3.058]],["name/142",[125,45.713]],["parent/142",[122,3.058]],["name/143",[126,45.713]],["parent/143",[122,3.058]]],"invertedIndex":[["accesstoken",{"_index":64,"name":{"76":{}},"parent":{}}],["addlistener",{"_index":108,"name":{"124":{}},"parent":{}}],["album",{"_index":49,"name":{"52":{},"59":{}},"parent":{"60":{},"61":{}}}],["apiconfig",{"_index":2,"name":{"2":{}},"parent":{"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"10":{}}}],["apiscope",{"_index":11,"name":{"11":{}},"parent":{"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{}}}],["appremotecontrolscope",{"_index":26,"name":{"26":{}},"parent":{}}],["artist",{"_index":48,"name":{"51":{},"56":{}},"parent":{"57":{},"58":{}}}],["auth",{"_index":0,"name":{"0":{}},"parent":{}}],["authorize",{"_index":84,"name":{"99":{}},"parent":{}}],["authtype",{"_index":10,"name":{"10":{}},"parent":{}}],["availableoffline",{"_index":57,"name":{"68":{}},"parent":{}}],["canrepeatcontext",{"_index":76,"name":{"91":{}},"parent":{}}],["canrepeattrack",{"_index":75,"name":{"90":{}},"parent":{}}],["canseek",{"_index":78,"name":{"93":{}},"parent":{}}],["canskipnext",{"_index":73,"name":{"88":{}},"parent":{}}],["canskipprevious",{"_index":74,"name":{"89":{}},"parent":{}}],["cantoggleshuffle",{"_index":77,"name":{"92":{}},"parent":{}}],["children",{"_index":60,"name":{"71":{}},"parent":{}}],["clientid",{"_index":3,"name":{"3":{}},"parent":{}}],["connect",{"_index":89,"name":{"104":{}},"parent":{}}],["container",{"_index":59,"name":{"70":{}},"parent":{}}],["contentitem",{"_index":54,"name":{"63":{}},"parent":{"64":{},"65":{},"66":{},"67":{},"68":{},"69":{},"70":{},"71":{}}}],["contenttype",{"_index":53,"name":{"62":{}},"parent":{}}],["context",{"_index":36,"name":{"36":{}},"parent":{}}],["crossfadestate",{"_index":61,"name":{"72":{}},"parent":{"73":{},"74":{}}}],["disconnect",{"_index":90,"name":{"105":{}},"parent":{}}],["duration",{"_index":47,"name":{"50":{},"74":{}},"parent":{}}],["emit",{"_index":118,"name":{"135":{}},"parent":{}}],["enabled",{"_index":62,"name":{"73":{}},"parent":{}}],["endsession",{"_index":85,"name":{"100":{}},"parent":{}}],["episode",{"_index":51,"name":{"54":{}},"parent":{}}],["eventnames",{"_index":119,"name":{"136":{}},"parent":{}}],["expirationdate",{"_index":66,"name":{"78":{}},"parent":{}}],["expired",{"_index":68,"name":{"80":{}},"parent":{}}],["flatten",{"_index":81,"name":{"96":{}},"parent":{}}],["getchildrenitemsoptions",{"_index":69,"name":{"81":{}},"parent":{"82":{},"83":{}}}],["getchildrenofitem",{"_index":104,"name":{"120":{}},"parent":{}}],["getcontentitemforuri",{"_index":105,"name":{"121":{}},"parent":{}}],["getcrossfadestate",{"_index":106,"name":{"122":{}},"parent":{}}],["getmaxlisteners",{"_index":115,"name":{"132":{}},"parent":{}}],["getplayerstate",{"_index":101,"name":{"117":{}},"parent":{}}],["getrecommendedcontentitems",{"_index":103,"name":{"119":{}},"parent":{}}],["getrootcontentitems",{"_index":102,"name":{"118":{}},"parent":{}}],["getsession",{"_index":86,"name":{"101":{}},"parent":{}}],["id",{"_index":56,"name":{"66":{}},"parent":{}}],["initialize",{"_index":83,"name":{"98":{}},"parent":{}}],["isconnectedasync",{"_index":88,"name":{"103":{}},"parent":{}}],["ispaused",{"_index":40,"name":{"41":{}},"parent":{}}],["isshuffling",{"_index":72,"name":{"85":{}},"parent":{}}],["listenercount",{"_index":120,"name":{"137":{}},"parent":{}}],["listeners",{"_index":116,"name":{"133":{}},"parent":{}}],["name",{"_index":46,"name":{"48":{},"57":{},"60":{}},"parent":{}}],["off",{"_index":34,"name":{"34":{},"129":{}},"parent":{}}],["offset",{"_index":71,"name":{"83":{}},"parent":{}}],["on",{"_index":107,"name":{"123":{}},"parent":{}}],["once",{"_index":109,"name":{"125":{}},"parent":{}}],["pause",{"_index":96,"name":{"112":{}},"parent":{}}],["perpage",{"_index":70,"name":{"82":{}},"parent":{}}],["playable",{"_index":58,"name":{"69":{}},"parent":{}}],["playbackoptions",{"_index":42,"name":{"43":{},"84":{}},"parent":{"85":{},"86":{}}}],["playbackposition",{"_index":38,"name":{"39":{}},"parent":{}}],["playbackrestrictions",{"_index":41,"name":{"42":{},"87":{}},"parent":{"88":{},"89":{},"90":{},"91":{},"92":{},"93":{}}}],["playbackspeed",{"_index":39,"name":{"40":{}},"parent":{}}],["playercontext",{"_index":43,"name":{"44":{}},"parent":{"45":{},"46":{}}}],["playercontextchanged",{"_index":124,"name":{"141":{}},"parent":{}}],["playerstate",{"_index":37,"name":{"37":{}},"parent":{"38":{},"39":{},"40":{},"41":{},"42":{},"43":{}}}],["playerstatechanged",{"_index":123,"name":{"140":{}},"parent":{}}],["playitem",{"_index":91,"name":{"107":{}},"parent":{}}],["playitemwithindex",{"_index":92,"name":{"108":{}},"parent":{}}],["playlistmodifyprivatescope",{"_index":15,"name":{"15":{}},"parent":{}}],["playlistmodifypublicscope",{"_index":14,"name":{"14":{}},"parent":{}}],["playlistreadcollaborativescope",{"_index":13,"name":{"13":{}},"parent":{}}],["playlistreadprivatescope",{"_index":12,"name":{"12":{}},"parent":{}}],["playuri",{"_index":7,"name":{"7":{},"106":{}},"parent":{}}],["podcast",{"_index":52,"name":{"55":{}},"parent":{}}],["prependlistener",{"_index":110,"name":{"126":{}},"parent":{}}],["prependoncelistener",{"_index":111,"name":{"127":{}},"parent":{}}],["queueuri",{"_index":93,"name":{"109":{}},"parent":{}}],["rawlisteners",{"_index":117,"name":{"134":{}},"parent":{}}],["recommendedcontentoptions",{"_index":79,"name":{"94":{}},"parent":{"95":{},"96":{}}}],["redirecturl",{"_index":4,"name":{"4":{}},"parent":{}}],["refreshtoken",{"_index":65,"name":{"77":{}},"parent":{}}],["remote",{"_index":1,"name":{"1":{}},"parent":{}}],["remoteconnected",{"_index":126,"name":{"143":{}},"parent":{}}],["remotedisconnected",{"_index":125,"name":{"142":{}},"parent":{}}],["removealllisteners",{"_index":113,"name":{"130":{}},"parent":{}}],["removelistener",{"_index":112,"name":{"128":{}},"parent":{}}],["repeatmode",{"_index":33,"name":{"33":{},"86":{}},"parent":{"34":{},"35":{},"36":{}}}],["resume",{"_index":95,"name":{"111":{}},"parent":{}}],["saved",{"_index":50,"name":{"53":{}},"parent":{}}],["scope",{"_index":67,"name":{"79":{}},"parent":{}}],["scopes",{"_index":8,"name":{"8":{}},"parent":{}}],["seek",{"_index":94,"name":{"110":{}},"parent":{}}],["setmaxlisteners",{"_index":114,"name":{"131":{}},"parent":{}}],["setplaying",{"_index":121,"name":{"138":{}},"parent":{}}],["setrepeatmode",{"_index":100,"name":{"116":{}},"parent":{}}],["setshuffling",{"_index":99,"name":{"115":{}},"parent":{}}],["showdialog",{"_index":9,"name":{"9":{}},"parent":{}}],["skiptonext",{"_index":97,"name":{"113":{}},"parent":{}}],["skiptoprevious",{"_index":98,"name":{"114":{}},"parent":{}}],["spotifyauth",{"_index":82,"name":{"97":{}},"parent":{"98":{},"99":{},"100":{},"101":{}}}],["spotifyremoteapi",{"_index":87,"name":{"102":{}},"parent":{"103":{},"104":{},"105":{},"106":{},"107":{},"108":{},"109":{},"110":{},"111":{},"112":{},"113":{},"114":{},"115":{},"116":{},"117":{},"118":{},"119":{},"120":{},"121":{},"122":{},"123":{},"124":{},"125":{},"126":{},"127":{},"128":{},"129":{},"130":{},"131":{},"132":{},"133":{},"134":{},"135":{},"136":{},"137":{},"138":{}}}],["spotifyremoteevents",{"_index":122,"name":{"139":{}},"parent":{"140":{},"141":{},"142":{},"143":{}}}],["spotifysession",{"_index":63,"name":{"75":{}},"parent":{"76":{},"77":{},"78":{},"79":{},"80":{}}}],["streamingscope",{"_index":25,"name":{"25":{}},"parent":{}}],["subtitle",{"_index":55,"name":{"65":{}},"parent":{}}],["title",{"_index":44,"name":{"45":{},"64":{}},"parent":{}}],["tokenrefreshurl",{"_index":6,"name":{"6":{}},"parent":{}}],["tokenswapurl",{"_index":5,"name":{"5":{}},"parent":{}}],["track",{"_index":35,"name":{"35":{},"38":{},"47":{}},"parent":{"48":{},"49":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{}}}],["type",{"_index":80,"name":{"95":{}},"parent":{}}],["ugcimageuploadscope",{"_index":24,"name":{"24":{}},"parent":{}}],["uri",{"_index":45,"name":{"46":{},"49":{},"58":{},"61":{},"67":{}},"parent":{}}],["userfollowmodifyscope",{"_index":17,"name":{"17":{}},"parent":{}}],["userfollowreadscope",{"_index":16,"name":{"16":{}},"parent":{}}],["userlibrarymodifyscope",{"_index":19,"name":{"19":{}},"parent":{}}],["userlibraryreadscope",{"_index":18,"name":{"18":{}},"parent":{}}],["usermodifyplaybackstatescope",{"_index":29,"name":{"29":{}},"parent":{}}],["userreadbirthdatescope",{"_index":20,"name":{"20":{}},"parent":{}}],["userreadcurrentlyplaying",{"_index":32,"name":{"32":{}},"parent":{}}],["userreadcurrentlyplayingscope",{"_index":30,"name":{"30":{}},"parent":{}}],["userreademailscope",{"_index":21,"name":{"21":{}},"parent":{}}],["userreadplaybackposition",{"_index":28,"name":{"28":{}},"parent":{}}],["userreadplaybackstatescope",{"_index":27,"name":{"27":{}},"parent":{}}],["userreadprivatescope",{"_index":22,"name":{"22":{}},"parent":{}}],["userreadrecentlyplayedscope",{"_index":31,"name":{"31":{}},"parent":{}}],["usertopreadscope",{"_index":23,"name":{"23":{}},"parent":{}}]],"pipeline":[]}} \ No newline at end of file +window.searchData = {"kinds":{"4":"Enumeration","16":"Enumeration member","32":"Variable","256":"Interface","1024":"Property","2048":"Method","4194304":"Type alias"},"rows":[{"id":0,"kind":32,"name":"auth","url":"modules.html#auth","classes":"tsd-kind-variable"},{"id":1,"kind":32,"name":"remote","url":"modules.html#remote","classes":"tsd-kind-variable"},{"id":2,"kind":256,"name":"ApiConfig","url":"interfaces/apiconfig.html","classes":"tsd-kind-interface"},{"id":3,"kind":1024,"name":"clientID","url":"interfaces/apiconfig.html#clientid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":4,"kind":1024,"name":"redirectURL","url":"interfaces/apiconfig.html#redirecturl","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":5,"kind":1024,"name":"tokenSwapURL","url":"interfaces/apiconfig.html#tokenswapurl","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":6,"kind":1024,"name":"tokenRefreshURL","url":"interfaces/apiconfig.html#tokenrefreshurl","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":7,"kind":1024,"name":"playURI","url":"interfaces/apiconfig.html#playuri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":8,"kind":1024,"name":"scopes","url":"interfaces/apiconfig.html#scopes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":9,"kind":1024,"name":"showDialog","url":"interfaces/apiconfig.html#showdialog","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":10,"kind":1024,"name":"authType","url":"interfaces/apiconfig.html#authtype","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ApiConfig"},{"id":11,"kind":4,"name":"ApiScope","url":"enums/apiscope.html","classes":"tsd-kind-enum"},{"id":12,"kind":16,"name":"PlaylistReadPrivateScope","url":"enums/apiscope.html#playlistreadprivatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":13,"kind":16,"name":"PlaylistReadCollaborativeScope","url":"enums/apiscope.html#playlistreadcollaborativescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":14,"kind":16,"name":"PlaylistModifyPublicScope","url":"enums/apiscope.html#playlistmodifypublicscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":15,"kind":16,"name":"PlaylistModifyPrivateScope","url":"enums/apiscope.html#playlistmodifyprivatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":16,"kind":16,"name":"UserFollowReadScope","url":"enums/apiscope.html#userfollowreadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":17,"kind":16,"name":"UserFollowModifyScope","url":"enums/apiscope.html#userfollowmodifyscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":18,"kind":16,"name":"UserLibraryReadScope","url":"enums/apiscope.html#userlibraryreadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":19,"kind":16,"name":"UserLibraryModifyScope","url":"enums/apiscope.html#userlibrarymodifyscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":20,"kind":16,"name":"UserReadBirthDateScope","url":"enums/apiscope.html#userreadbirthdatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":21,"kind":16,"name":"UserReadEmailScope","url":"enums/apiscope.html#userreademailscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":22,"kind":16,"name":"UserReadPrivateScope","url":"enums/apiscope.html#userreadprivatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":23,"kind":16,"name":"UserTopReadScope","url":"enums/apiscope.html#usertopreadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":24,"kind":16,"name":"UGCImageUploadScope","url":"enums/apiscope.html#ugcimageuploadscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":25,"kind":16,"name":"StreamingScope","url":"enums/apiscope.html#streamingscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":26,"kind":16,"name":"AppRemoteControlScope","url":"enums/apiscope.html#appremotecontrolscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":27,"kind":16,"name":"UserReadPlaybackStateScope","url":"enums/apiscope.html#userreadplaybackstatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":28,"kind":16,"name":"UserReadPlaybackPosition","url":"enums/apiscope.html#userreadplaybackposition","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":29,"kind":16,"name":"UserModifyPlaybackStateScope","url":"enums/apiscope.html#usermodifyplaybackstatescope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":30,"kind":16,"name":"UserReadCurrentlyPlayingScope","url":"enums/apiscope.html#userreadcurrentlyplayingscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":31,"kind":16,"name":"UserReadRecentlyPlayedScope","url":"enums/apiscope.html#userreadrecentlyplayedscope","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":32,"kind":16,"name":"UserReadCurrentlyPlaying","url":"enums/apiscope.html#userreadcurrentlyplaying","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ApiScope"},{"id":33,"kind":4,"name":"RepeatMode","url":"enums/repeatmode.html","classes":"tsd-kind-enum"},{"id":34,"kind":16,"name":"Off","url":"enums/repeatmode.html#off","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RepeatMode"},{"id":35,"kind":16,"name":"Track","url":"enums/repeatmode.html#track","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RepeatMode"},{"id":36,"kind":16,"name":"Context","url":"enums/repeatmode.html#context","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"RepeatMode"},{"id":37,"kind":256,"name":"PlayerState","url":"interfaces/playerstate.html","classes":"tsd-kind-interface"},{"id":38,"kind":1024,"name":"track","url":"interfaces/playerstate.html#track","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":39,"kind":1024,"name":"playbackPosition","url":"interfaces/playerstate.html#playbackposition","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":40,"kind":1024,"name":"playbackSpeed","url":"interfaces/playerstate.html#playbackspeed","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":41,"kind":1024,"name":"isPaused","url":"interfaces/playerstate.html#ispaused","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":42,"kind":1024,"name":"playbackRestrictions","url":"interfaces/playerstate.html#playbackrestrictions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":43,"kind":1024,"name":"playbackOptions","url":"interfaces/playerstate.html#playbackoptions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerState"},{"id":44,"kind":256,"name":"PlayerContext","url":"interfaces/playercontext.html","classes":"tsd-kind-interface"},{"id":45,"kind":1024,"name":"title","url":"interfaces/playercontext.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerContext"},{"id":46,"kind":1024,"name":"uri","url":"interfaces/playercontext.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlayerContext"},{"id":47,"kind":256,"name":"Track","url":"interfaces/track.html","classes":"tsd-kind-interface"},{"id":48,"kind":1024,"name":"name","url":"interfaces/track.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":49,"kind":1024,"name":"uri","url":"interfaces/track.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":50,"kind":1024,"name":"duration","url":"interfaces/track.html#duration","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":51,"kind":1024,"name":"artist","url":"interfaces/track.html#artist","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":52,"kind":1024,"name":"album","url":"interfaces/track.html#album","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":53,"kind":1024,"name":"saved","url":"interfaces/track.html#saved","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":54,"kind":1024,"name":"episode","url":"interfaces/track.html#episode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":55,"kind":1024,"name":"podcast","url":"interfaces/track.html#podcast","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Track"},{"id":56,"kind":256,"name":"Artist","url":"interfaces/artist.html","classes":"tsd-kind-interface"},{"id":57,"kind":1024,"name":"name","url":"interfaces/artist.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Artist"},{"id":58,"kind":1024,"name":"uri","url":"interfaces/artist.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Artist"},{"id":59,"kind":256,"name":"Album","url":"interfaces/album.html","classes":"tsd-kind-interface"},{"id":60,"kind":1024,"name":"name","url":"interfaces/album.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Album"},{"id":61,"kind":1024,"name":"uri","url":"interfaces/album.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Album"},{"id":62,"kind":4194304,"name":"ContentType","url":"modules.html#contenttype","classes":"tsd-kind-type-alias"},{"id":63,"kind":256,"name":"ContentItem","url":"interfaces/contentitem.html","classes":"tsd-kind-interface"},{"id":64,"kind":1024,"name":"title","url":"interfaces/contentitem.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":65,"kind":1024,"name":"subtitle","url":"interfaces/contentitem.html#subtitle","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":66,"kind":1024,"name":"id","url":"interfaces/contentitem.html#id","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":67,"kind":1024,"name":"uri","url":"interfaces/contentitem.html#uri","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":68,"kind":1024,"name":"availableOffline","url":"interfaces/contentitem.html#availableoffline","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":69,"kind":1024,"name":"playable","url":"interfaces/contentitem.html#playable","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":70,"kind":1024,"name":"container","url":"interfaces/contentitem.html#container","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":71,"kind":1024,"name":"children","url":"interfaces/contentitem.html#children","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ContentItem"},{"id":72,"kind":256,"name":"CrossfadeState","url":"interfaces/crossfadestate.html","classes":"tsd-kind-interface"},{"id":73,"kind":1024,"name":"enabled","url":"interfaces/crossfadestate.html#enabled","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CrossfadeState"},{"id":74,"kind":1024,"name":"duration","url":"interfaces/crossfadestate.html#duration","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"CrossfadeState"},{"id":75,"kind":256,"name":"SpotifySession","url":"interfaces/spotifysession.html","classes":"tsd-kind-interface"},{"id":76,"kind":1024,"name":"accessToken","url":"interfaces/spotifysession.html#accesstoken","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":77,"kind":1024,"name":"refreshToken","url":"interfaces/spotifysession.html#refreshtoken","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":78,"kind":1024,"name":"expirationDate","url":"interfaces/spotifysession.html#expirationdate","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":79,"kind":1024,"name":"scope","url":"interfaces/spotifysession.html#scope","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":80,"kind":1024,"name":"expired","url":"interfaces/spotifysession.html#expired","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifySession"},{"id":81,"kind":256,"name":"GetChildrenItemsOptions","url":"interfaces/getchildrenitemsoptions.html","classes":"tsd-kind-interface"},{"id":82,"kind":1024,"name":"perPage","url":"interfaces/getchildrenitemsoptions.html#perpage","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GetChildrenItemsOptions"},{"id":83,"kind":1024,"name":"offset","url":"interfaces/getchildrenitemsoptions.html#offset","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"GetChildrenItemsOptions"},{"id":84,"kind":256,"name":"PlaybackOptions","url":"interfaces/playbackoptions.html","classes":"tsd-kind-interface"},{"id":85,"kind":1024,"name":"isShuffling","url":"interfaces/playbackoptions.html#isshuffling","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackOptions"},{"id":86,"kind":1024,"name":"repeatMode","url":"interfaces/playbackoptions.html#repeatmode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackOptions"},{"id":87,"kind":256,"name":"PlaybackRestrictions","url":"interfaces/playbackrestrictions.html","classes":"tsd-kind-interface"},{"id":88,"kind":1024,"name":"canSkipNext","url":"interfaces/playbackrestrictions.html#canskipnext","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":89,"kind":1024,"name":"canSkipPrevious","url":"interfaces/playbackrestrictions.html#canskipprevious","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":90,"kind":1024,"name":"canRepeatTrack","url":"interfaces/playbackrestrictions.html#canrepeattrack","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":91,"kind":1024,"name":"canRepeatContext","url":"interfaces/playbackrestrictions.html#canrepeatcontext","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":92,"kind":1024,"name":"canToggleShuffle","url":"interfaces/playbackrestrictions.html#cantoggleshuffle","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":93,"kind":1024,"name":"canSeek","url":"interfaces/playbackrestrictions.html#canseek","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PlaybackRestrictions"},{"id":94,"kind":256,"name":"RecommendedContentOptions","url":"interfaces/recommendedcontentoptions.html","classes":"tsd-kind-interface"},{"id":95,"kind":1024,"name":"type","url":"interfaces/recommendedcontentoptions.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecommendedContentOptions"},{"id":96,"kind":1024,"name":"flatten","url":"interfaces/recommendedcontentoptions.html#flatten","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"RecommendedContentOptions"},{"id":97,"kind":256,"name":"SpotifyAuth","url":"interfaces/spotifyauth.html","classes":"tsd-kind-interface"},{"id":98,"kind":2048,"name":"initialize","url":"interfaces/spotifyauth.html#initialize","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":99,"kind":2048,"name":"authorize","url":"interfaces/spotifyauth.html#authorize","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":100,"kind":2048,"name":"endSession","url":"interfaces/spotifyauth.html#endsession","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":101,"kind":2048,"name":"getSession","url":"interfaces/spotifyauth.html#getsession","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyAuth"},{"id":102,"kind":256,"name":"SpotifyRemoteApi","url":"interfaces/spotifyremoteapi.html","classes":"tsd-kind-interface"},{"id":103,"kind":2048,"name":"isConnectedAsync","url":"interfaces/spotifyremoteapi.html#isconnectedasync","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":104,"kind":2048,"name":"connect","url":"interfaces/spotifyremoteapi.html#connect","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":105,"kind":2048,"name":"disconnect","url":"interfaces/spotifyremoteapi.html#disconnect","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":106,"kind":2048,"name":"playUri","url":"interfaces/spotifyremoteapi.html#playuri","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":107,"kind":2048,"name":"playItem","url":"interfaces/spotifyremoteapi.html#playitem","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":108,"kind":2048,"name":"playItemWithIndex","url":"interfaces/spotifyremoteapi.html#playitemwithindex","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":109,"kind":2048,"name":"queueUri","url":"interfaces/spotifyremoteapi.html#queueuri","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":110,"kind":2048,"name":"seek","url":"interfaces/spotifyremoteapi.html#seek","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":111,"kind":2048,"name":"resume","url":"interfaces/spotifyremoteapi.html#resume","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":112,"kind":2048,"name":"pause","url":"interfaces/spotifyremoteapi.html#pause","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":113,"kind":2048,"name":"skipToNext","url":"interfaces/spotifyremoteapi.html#skiptonext","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":114,"kind":2048,"name":"skipToPrevious","url":"interfaces/spotifyremoteapi.html#skiptoprevious","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":115,"kind":2048,"name":"setShuffling","url":"interfaces/spotifyremoteapi.html#setshuffling","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":116,"kind":2048,"name":"setRepeatMode","url":"interfaces/spotifyremoteapi.html#setrepeatmode","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":117,"kind":2048,"name":"getPlayerState","url":"interfaces/spotifyremoteapi.html#getplayerstate","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":118,"kind":2048,"name":"getRootContentItems","url":"interfaces/spotifyremoteapi.html#getrootcontentitems","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":119,"kind":2048,"name":"getRecommendedContentItems","url":"interfaces/spotifyremoteapi.html#getrecommendedcontentitems","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":120,"kind":2048,"name":"getChildrenOfItem","url":"interfaces/spotifyremoteapi.html#getchildrenofitem","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":121,"kind":2048,"name":"getContentItemForUri","url":"interfaces/spotifyremoteapi.html#getcontentitemforuri","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":122,"kind":2048,"name":"getCrossfadeState","url":"interfaces/spotifyremoteapi.html#getcrossfadestate","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":123,"kind":2048,"name":"addListener","url":"interfaces/spotifyremoteapi.html#addlistener","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":124,"kind":2048,"name":"removeListener","url":"interfaces/spotifyremoteapi.html#removelistener","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":125,"kind":2048,"name":"removeAllListeners","url":"interfaces/spotifyremoteapi.html#removealllisteners","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":126,"kind":2048,"name":"emit","url":"interfaces/spotifyremoteapi.html#emit","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":127,"kind":2048,"name":"eventNames","url":"interfaces/spotifyremoteapi.html#eventnames","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":128,"kind":2048,"name":"listenerCount","url":"interfaces/spotifyremoteapi.html#listenercount","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":129,"kind":2048,"name":"on","url":"interfaces/spotifyremoteapi.html#on","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":130,"kind":2048,"name":"off","url":"interfaces/spotifyremoteapi.html#off","classes":"tsd-kind-method tsd-parent-kind-interface tsd-has-type-parameter","parent":"SpotifyRemoteApi"},{"id":131,"kind":2048,"name":"setPlaying","url":"interfaces/spotifyremoteapi.html#setplaying","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"SpotifyRemoteApi"},{"id":132,"kind":256,"name":"SpotifyRemoteEvents","url":"interfaces/spotifyremoteevents.html","classes":"tsd-kind-interface"},{"id":133,"kind":1024,"name":"playerStateChanged","url":"interfaces/spotifyremoteevents.html#playerstatechanged","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"},{"id":134,"kind":1024,"name":"playerContextChanged","url":"interfaces/spotifyremoteevents.html#playercontextchanged","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"},{"id":135,"kind":1024,"name":"remoteDisconnected","url":"interfaces/spotifyremoteevents.html#remotedisconnected","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"},{"id":136,"kind":1024,"name":"remoteConnected","url":"interfaces/spotifyremoteevents.html#remoteconnected","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"SpotifyRemoteEvents"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,45.218]],["parent/0",[]],["name/1",[1,45.218]],["parent/1",[]],["name/2",[2,26.76]],["parent/2",[]],["name/3",[3,45.218]],["parent/3",[2,2.491]],["name/4",[4,45.218]],["parent/4",[2,2.491]],["name/5",[5,45.218]],["parent/5",[2,2.491]],["name/6",[6,45.218]],["parent/6",[2,2.491]],["name/7",[7,40.11]],["parent/7",[2,2.491]],["name/8",[8,45.218]],["parent/8",[2,2.491]],["name/9",[9,45.218]],["parent/9",[2,2.491]],["name/10",[10,45.218]],["parent/10",[2,2.491]],["name/11",[11,18.137]],["parent/11",[]],["name/12",[12,45.218]],["parent/12",[11,1.689]],["name/13",[13,45.218]],["parent/13",[11,1.689]],["name/14",[14,45.218]],["parent/14",[11,1.689]],["name/15",[15,45.218]],["parent/15",[11,1.689]],["name/16",[16,45.218]],["parent/16",[11,1.689]],["name/17",[17,45.218]],["parent/17",[11,1.689]],["name/18",[18,45.218]],["parent/18",[11,1.689]],["name/19",[19,45.218]],["parent/19",[11,1.689]],["name/20",[20,45.218]],["parent/20",[11,1.689]],["name/21",[21,45.218]],["parent/21",[11,1.689]],["name/22",[22,45.218]],["parent/22",[11,1.689]],["name/23",[23,45.218]],["parent/23",[11,1.689]],["name/24",[24,45.218]],["parent/24",[11,1.689]],["name/25",[25,45.218]],["parent/25",[11,1.689]],["name/26",[26,45.218]],["parent/26",[11,1.689]],["name/27",[27,45.218]],["parent/27",[11,1.689]],["name/28",[28,45.218]],["parent/28",[11,1.689]],["name/29",[29,45.218]],["parent/29",[11,1.689]],["name/30",[30,45.218]],["parent/30",[11,1.689]],["name/31",[31,45.218]],["parent/31",[11,1.689]],["name/32",[32,45.218]],["parent/32",[11,1.689]],["name/33",[33,32.225]],["parent/33",[]],["name/34",[34,40.11]],["parent/34",[33,3]],["name/35",[35,24.849]],["parent/35",[33,3]],["name/36",[36,45.218]],["parent/36",[33,3]],["name/37",[37,29.124]],["parent/37",[]],["name/38",[35,24.849]],["parent/38",[37,2.712]],["name/39",[38,45.218]],["parent/39",[37,2.712]],["name/40",[39,45.218]],["parent/40",[37,2.712]],["name/41",[40,45.218]],["parent/41",[37,2.712]],["name/42",[41,27.872]],["parent/42",[37,2.712]],["name/43",[42,34.232]],["parent/43",[37,2.712]],["name/44",[43,36.745]],["parent/44",[]],["name/45",[44,40.11]],["parent/45",[43,3.421]],["name/46",[45,32.225]],["parent/46",[43,3.421]],["name/47",[35,24.849]],["parent/47",[]],["name/48",[46,36.745]],["parent/48",[35,2.314]],["name/49",[45,32.225]],["parent/49",[35,2.314]],["name/50",[47,40.11]],["parent/50",[35,2.314]],["name/51",[48,34.232]],["parent/51",[35,2.314]],["name/52",[49,34.232]],["parent/52",[35,2.314]],["name/53",[50,45.218]],["parent/53",[35,2.314]],["name/54",[51,45.218]],["parent/54",[35,2.314]],["name/55",[52,45.218]],["parent/55",[35,2.314]],["name/56",[48,34.232]],["parent/56",[]],["name/57",[46,36.745]],["parent/57",[48,3.187]],["name/58",[45,32.225]],["parent/58",[48,3.187]],["name/59",[49,34.232]],["parent/59",[]],["name/60",[46,36.745]],["parent/60",[49,3.187]],["name/61",[45,32.225]],["parent/61",[49,3.187]],["name/62",[53,45.218]],["parent/62",[]],["name/63",[54,26.76]],["parent/63",[]],["name/64",[44,40.11]],["parent/64",[54,2.491]],["name/65",[55,45.218]],["parent/65",[54,2.491]],["name/66",[56,45.218]],["parent/66",[54,2.491]],["name/67",[45,32.225]],["parent/67",[54,2.491]],["name/68",[57,45.218]],["parent/68",[54,2.491]],["name/69",[58,45.218]],["parent/69",[54,2.491]],["name/70",[59,45.218]],["parent/70",[54,2.491]],["name/71",[60,45.218]],["parent/71",[54,2.491]],["name/72",[61,36.745]],["parent/72",[]],["name/73",[62,45.218]],["parent/73",[61,3.421]],["name/74",[47,40.11]],["parent/74",[61,3.421]],["name/75",[63,30.555]],["parent/75",[]],["name/76",[64,45.218]],["parent/76",[63,2.845]],["name/77",[65,45.218]],["parent/77",[63,2.845]],["name/78",[66,45.218]],["parent/78",[63,2.845]],["name/79",[67,45.218]],["parent/79",[63,2.845]],["name/80",[68,45.218]],["parent/80",[63,2.845]],["name/81",[69,36.745]],["parent/81",[]],["name/82",[70,45.218]],["parent/82",[69,3.421]],["name/83",[71,45.218]],["parent/83",[69,3.421]],["name/84",[42,34.232]],["parent/84",[]],["name/85",[72,45.218]],["parent/85",[42,3.187]],["name/86",[33,32.225]],["parent/86",[42,3.187]],["name/87",[41,27.872]],["parent/87",[]],["name/88",[73,45.218]],["parent/88",[41,2.595]],["name/89",[74,45.218]],["parent/89",[41,2.595]],["name/90",[75,45.218]],["parent/90",[41,2.595]],["name/91",[76,45.218]],["parent/91",[41,2.595]],["name/92",[77,45.218]],["parent/92",[41,2.595]],["name/93",[78,45.218]],["parent/93",[41,2.595]],["name/94",[79,36.745]],["parent/94",[]],["name/95",[80,45.218]],["parent/95",[79,3.421]],["name/96",[81,45.218]],["parent/96",[79,3.421]],["name/97",[82,32.225]],["parent/97",[]],["name/98",[83,45.218]],["parent/98",[82,3]],["name/99",[84,45.218]],["parent/99",[82,3]],["name/100",[85,45.218]],["parent/100",[82,3]],["name/101",[86,45.218]],["parent/101",[82,3]],["name/102",[87,15.095]],["parent/102",[]],["name/103",[88,45.218]],["parent/103",[87,1.405]],["name/104",[89,45.218]],["parent/104",[87,1.405]],["name/105",[90,45.218]],["parent/105",[87,1.405]],["name/106",[7,40.11]],["parent/106",[87,1.405]],["name/107",[91,45.218]],["parent/107",[87,1.405]],["name/108",[92,45.218]],["parent/108",[87,1.405]],["name/109",[93,45.218]],["parent/109",[87,1.405]],["name/110",[94,45.218]],["parent/110",[87,1.405]],["name/111",[95,45.218]],["parent/111",[87,1.405]],["name/112",[96,45.218]],["parent/112",[87,1.405]],["name/113",[97,45.218]],["parent/113",[87,1.405]],["name/114",[98,45.218]],["parent/114",[87,1.405]],["name/115",[99,45.218]],["parent/115",[87,1.405]],["name/116",[100,45.218]],["parent/116",[87,1.405]],["name/117",[101,45.218]],["parent/117",[87,1.405]],["name/118",[102,45.218]],["parent/118",[87,1.405]],["name/119",[103,45.218]],["parent/119",[87,1.405]],["name/120",[104,45.218]],["parent/120",[87,1.405]],["name/121",[105,45.218]],["parent/121",[87,1.405]],["name/122",[106,45.218]],["parent/122",[87,1.405]],["name/123",[107,45.218]],["parent/123",[87,1.405]],["name/124",[108,45.218]],["parent/124",[87,1.405]],["name/125",[109,45.218]],["parent/125",[87,1.405]],["name/126",[110,45.218]],["parent/126",[87,1.405]],["name/127",[111,45.218]],["parent/127",[87,1.405]],["name/128",[112,45.218]],["parent/128",[87,1.405]],["name/129",[113,45.218]],["parent/129",[87,1.405]],["name/130",[34,40.11]],["parent/130",[87,1.405]],["name/131",[114,45.218]],["parent/131",[87,1.405]],["name/132",[115,32.225]],["parent/132",[]],["name/133",[116,45.218]],["parent/133",[115,3]],["name/134",[117,45.218]],["parent/134",[115,3]],["name/135",[118,45.218]],["parent/135",[115,3]],["name/136",[119,45.218]],["parent/136",[115,3]]],"invertedIndex":[["accesstoken",{"_index":64,"name":{"76":{}},"parent":{}}],["addlistener",{"_index":107,"name":{"123":{}},"parent":{}}],["album",{"_index":49,"name":{"52":{},"59":{}},"parent":{"60":{},"61":{}}}],["apiconfig",{"_index":2,"name":{"2":{}},"parent":{"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{},"10":{}}}],["apiscope",{"_index":11,"name":{"11":{}},"parent":{"12":{},"13":{},"14":{},"15":{},"16":{},"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{}}}],["appremotecontrolscope",{"_index":26,"name":{"26":{}},"parent":{}}],["artist",{"_index":48,"name":{"51":{},"56":{}},"parent":{"57":{},"58":{}}}],["auth",{"_index":0,"name":{"0":{}},"parent":{}}],["authorize",{"_index":84,"name":{"99":{}},"parent":{}}],["authtype",{"_index":10,"name":{"10":{}},"parent":{}}],["availableoffline",{"_index":57,"name":{"68":{}},"parent":{}}],["canrepeatcontext",{"_index":76,"name":{"91":{}},"parent":{}}],["canrepeattrack",{"_index":75,"name":{"90":{}},"parent":{}}],["canseek",{"_index":78,"name":{"93":{}},"parent":{}}],["canskipnext",{"_index":73,"name":{"88":{}},"parent":{}}],["canskipprevious",{"_index":74,"name":{"89":{}},"parent":{}}],["cantoggleshuffle",{"_index":77,"name":{"92":{}},"parent":{}}],["children",{"_index":60,"name":{"71":{}},"parent":{}}],["clientid",{"_index":3,"name":{"3":{}},"parent":{}}],["connect",{"_index":89,"name":{"104":{}},"parent":{}}],["container",{"_index":59,"name":{"70":{}},"parent":{}}],["contentitem",{"_index":54,"name":{"63":{}},"parent":{"64":{},"65":{},"66":{},"67":{},"68":{},"69":{},"70":{},"71":{}}}],["contenttype",{"_index":53,"name":{"62":{}},"parent":{}}],["context",{"_index":36,"name":{"36":{}},"parent":{}}],["crossfadestate",{"_index":61,"name":{"72":{}},"parent":{"73":{},"74":{}}}],["disconnect",{"_index":90,"name":{"105":{}},"parent":{}}],["duration",{"_index":47,"name":{"50":{},"74":{}},"parent":{}}],["emit",{"_index":110,"name":{"126":{}},"parent":{}}],["enabled",{"_index":62,"name":{"73":{}},"parent":{}}],["endsession",{"_index":85,"name":{"100":{}},"parent":{}}],["episode",{"_index":51,"name":{"54":{}},"parent":{}}],["eventnames",{"_index":111,"name":{"127":{}},"parent":{}}],["expirationdate",{"_index":66,"name":{"78":{}},"parent":{}}],["expired",{"_index":68,"name":{"80":{}},"parent":{}}],["flatten",{"_index":81,"name":{"96":{}},"parent":{}}],["getchildrenitemsoptions",{"_index":69,"name":{"81":{}},"parent":{"82":{},"83":{}}}],["getchildrenofitem",{"_index":104,"name":{"120":{}},"parent":{}}],["getcontentitemforuri",{"_index":105,"name":{"121":{}},"parent":{}}],["getcrossfadestate",{"_index":106,"name":{"122":{}},"parent":{}}],["getplayerstate",{"_index":101,"name":{"117":{}},"parent":{}}],["getrecommendedcontentitems",{"_index":103,"name":{"119":{}},"parent":{}}],["getrootcontentitems",{"_index":102,"name":{"118":{}},"parent":{}}],["getsession",{"_index":86,"name":{"101":{}},"parent":{}}],["id",{"_index":56,"name":{"66":{}},"parent":{}}],["initialize",{"_index":83,"name":{"98":{}},"parent":{}}],["isconnectedasync",{"_index":88,"name":{"103":{}},"parent":{}}],["ispaused",{"_index":40,"name":{"41":{}},"parent":{}}],["isshuffling",{"_index":72,"name":{"85":{}},"parent":{}}],["listenercount",{"_index":112,"name":{"128":{}},"parent":{}}],["name",{"_index":46,"name":{"48":{},"57":{},"60":{}},"parent":{}}],["off",{"_index":34,"name":{"34":{},"130":{}},"parent":{}}],["offset",{"_index":71,"name":{"83":{}},"parent":{}}],["on",{"_index":113,"name":{"129":{}},"parent":{}}],["pause",{"_index":96,"name":{"112":{}},"parent":{}}],["perpage",{"_index":70,"name":{"82":{}},"parent":{}}],["playable",{"_index":58,"name":{"69":{}},"parent":{}}],["playbackoptions",{"_index":42,"name":{"43":{},"84":{}},"parent":{"85":{},"86":{}}}],["playbackposition",{"_index":38,"name":{"39":{}},"parent":{}}],["playbackrestrictions",{"_index":41,"name":{"42":{},"87":{}},"parent":{"88":{},"89":{},"90":{},"91":{},"92":{},"93":{}}}],["playbackspeed",{"_index":39,"name":{"40":{}},"parent":{}}],["playercontext",{"_index":43,"name":{"44":{}},"parent":{"45":{},"46":{}}}],["playercontextchanged",{"_index":117,"name":{"134":{}},"parent":{}}],["playerstate",{"_index":37,"name":{"37":{}},"parent":{"38":{},"39":{},"40":{},"41":{},"42":{},"43":{}}}],["playerstatechanged",{"_index":116,"name":{"133":{}},"parent":{}}],["playitem",{"_index":91,"name":{"107":{}},"parent":{}}],["playitemwithindex",{"_index":92,"name":{"108":{}},"parent":{}}],["playlistmodifyprivatescope",{"_index":15,"name":{"15":{}},"parent":{}}],["playlistmodifypublicscope",{"_index":14,"name":{"14":{}},"parent":{}}],["playlistreadcollaborativescope",{"_index":13,"name":{"13":{}},"parent":{}}],["playlistreadprivatescope",{"_index":12,"name":{"12":{}},"parent":{}}],["playuri",{"_index":7,"name":{"7":{},"106":{}},"parent":{}}],["podcast",{"_index":52,"name":{"55":{}},"parent":{}}],["queueuri",{"_index":93,"name":{"109":{}},"parent":{}}],["recommendedcontentoptions",{"_index":79,"name":{"94":{}},"parent":{"95":{},"96":{}}}],["redirecturl",{"_index":4,"name":{"4":{}},"parent":{}}],["refreshtoken",{"_index":65,"name":{"77":{}},"parent":{}}],["remote",{"_index":1,"name":{"1":{}},"parent":{}}],["remoteconnected",{"_index":119,"name":{"136":{}},"parent":{}}],["remotedisconnected",{"_index":118,"name":{"135":{}},"parent":{}}],["removealllisteners",{"_index":109,"name":{"125":{}},"parent":{}}],["removelistener",{"_index":108,"name":{"124":{}},"parent":{}}],["repeatmode",{"_index":33,"name":{"33":{},"86":{}},"parent":{"34":{},"35":{},"36":{}}}],["resume",{"_index":95,"name":{"111":{}},"parent":{}}],["saved",{"_index":50,"name":{"53":{}},"parent":{}}],["scope",{"_index":67,"name":{"79":{}},"parent":{}}],["scopes",{"_index":8,"name":{"8":{}},"parent":{}}],["seek",{"_index":94,"name":{"110":{}},"parent":{}}],["setplaying",{"_index":114,"name":{"131":{}},"parent":{}}],["setrepeatmode",{"_index":100,"name":{"116":{}},"parent":{}}],["setshuffling",{"_index":99,"name":{"115":{}},"parent":{}}],["showdialog",{"_index":9,"name":{"9":{}},"parent":{}}],["skiptonext",{"_index":97,"name":{"113":{}},"parent":{}}],["skiptoprevious",{"_index":98,"name":{"114":{}},"parent":{}}],["spotifyauth",{"_index":82,"name":{"97":{}},"parent":{"98":{},"99":{},"100":{},"101":{}}}],["spotifyremoteapi",{"_index":87,"name":{"102":{}},"parent":{"103":{},"104":{},"105":{},"106":{},"107":{},"108":{},"109":{},"110":{},"111":{},"112":{},"113":{},"114":{},"115":{},"116":{},"117":{},"118":{},"119":{},"120":{},"121":{},"122":{},"123":{},"124":{},"125":{},"126":{},"127":{},"128":{},"129":{},"130":{},"131":{}}}],["spotifyremoteevents",{"_index":115,"name":{"132":{}},"parent":{"133":{},"134":{},"135":{},"136":{}}}],["spotifysession",{"_index":63,"name":{"75":{}},"parent":{"76":{},"77":{},"78":{},"79":{},"80":{}}}],["streamingscope",{"_index":25,"name":{"25":{}},"parent":{}}],["subtitle",{"_index":55,"name":{"65":{}},"parent":{}}],["title",{"_index":44,"name":{"45":{},"64":{}},"parent":{}}],["tokenrefreshurl",{"_index":6,"name":{"6":{}},"parent":{}}],["tokenswapurl",{"_index":5,"name":{"5":{}},"parent":{}}],["track",{"_index":35,"name":{"35":{},"38":{},"47":{}},"parent":{"48":{},"49":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{}}}],["type",{"_index":80,"name":{"95":{}},"parent":{}}],["ugcimageuploadscope",{"_index":24,"name":{"24":{}},"parent":{}}],["uri",{"_index":45,"name":{"46":{},"49":{},"58":{},"61":{},"67":{}},"parent":{}}],["userfollowmodifyscope",{"_index":17,"name":{"17":{}},"parent":{}}],["userfollowreadscope",{"_index":16,"name":{"16":{}},"parent":{}}],["userlibrarymodifyscope",{"_index":19,"name":{"19":{}},"parent":{}}],["userlibraryreadscope",{"_index":18,"name":{"18":{}},"parent":{}}],["usermodifyplaybackstatescope",{"_index":29,"name":{"29":{}},"parent":{}}],["userreadbirthdatescope",{"_index":20,"name":{"20":{}},"parent":{}}],["userreadcurrentlyplaying",{"_index":32,"name":{"32":{}},"parent":{}}],["userreadcurrentlyplayingscope",{"_index":30,"name":{"30":{}},"parent":{}}],["userreademailscope",{"_index":21,"name":{"21":{}},"parent":{}}],["userreadplaybackposition",{"_index":28,"name":{"28":{}},"parent":{}}],["userreadplaybackstatescope",{"_index":27,"name":{"27":{}},"parent":{}}],["userreadprivatescope",{"_index":22,"name":{"22":{}},"parent":{}}],["userreadrecentlyplayedscope",{"_index":31,"name":{"31":{}},"parent":{}}],["usertopreadscope",{"_index":23,"name":{"23":{}},"parent":{}}]],"pipeline":[]}} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 6da4f4e..65ad4b3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2975,7 +2975,7 @@

Install

Linking

-

As of React Native > 0.61, auto linking should work for both iOS and Android. There shouldn't be any modifications necessary and it Should work out of the box. The one caveat, is that react-native-events needs to be linked as it doesn't yet support auto linking. If you do run into issues or are using an older version of React Native, the following sections should help get you up and running.

+

As of React Native > 0.61, auto linking should work for both iOS and Android. There shouldn't be any modifications necessary and it Should work out of the box. If you do run into issues or are using an older version of React Native, the following sections should help get you up and running.

iOS

@@ -2986,8 +2986,7 @@

iOS

Cocoapods (Recommended)

By far the easiest way to integrate into your project. In your ios/PodFile add the following lines to your projects target:

-
    pod 'RNEventEmitter', :path => "../node_modules/react-native-events"
-    pod 'RNSpotifyRemote', :path => '../node_modules/react-native-spotify-remote'
+			
    pod 'RNSpotifyRemote', :path => '../node_modules/react-native-spotify-remote'
 

See the Example App PodFile for a full example.

I have only tested this against RN > 0.60 in the example app. So if you have issues with a RN version < 0.60 that might be a place to start troubleshooting.

@@ -3034,11 +3033,6 @@

iOS

Android

If you need to link your project manually, here are some things you'll need to do.

-
- -

react-native-events does not support autolinking at this point and will need to be manually linked into your application

-
-
  1. Open up android/app/src/main/java/[...]/MainApplication.java
@@ -3046,7 +3040,6 @@

react-native-events does not support autolinking at this point
  • Add the following imports to the top of the file
  • import com.reactlibrary.RNSpotifyRemotePackage;
    -import com.lufinkey.react.eventemitter.RNEventEmitterPackage;
     
    @@ -2998,7 +2970,7 @@

    connect

  • @@ -3031,7 +3003,7 @@

    disconnect

  • @@ -3052,13 +3024,13 @@

    Returns Promise

    emit

    -

    Returns boolean

    +

    Returns void

  • -
    +

    eventNames

    -
      -
    • eventNames<K>(): K[]
    • +
        +
      • eventNames(): ("playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected")[]
      • -

        Type parameters

        -
          -
        • -

          K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"

          -
        • -
        -

        Returns K[]

        +

        Returns ("playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected")[]

    @@ -3113,7 +3079,7 @@

    getChildrenOfItem

  • @@ -3149,7 +3115,7 @@

    getContentItemForUri

  • @@ -3182,7 +3148,7 @@

    getCrossfadeState

  • @@ -3199,23 +3165,6 @@

    Returns Promise

  • -
    - -

    getMaxListeners

    -
      -
    • getMaxListeners(): number
    • -
    - -

    getPlayerState

    @@ -3226,7 +3175,7 @@

    getPlayerState

  • @@ -3253,7 +3202,7 @@

    getRecommendedContentItems

  • @@ -3286,7 +3235,7 @@

    getRootContentItems

  • @@ -3319,7 +3268,7 @@

    isConnectedAsync

  • @@ -3346,7 +3295,7 @@

    listenerCount

  • Type parameters

    @@ -3365,66 +3314,26 @@

    Returns number

  • -
    - -

    listeners

    - - -

    off

    @@ -3466,15 +3375,22 @@

    Returns

    on

    - -
    - -

    once

    - -
    @@ -3572,7 +3438,7 @@

    pause

  • @@ -3599,7 +3465,7 @@

    playItem

  • @@ -3632,7 +3498,7 @@

    playItemWithIndex

  • @@ -3674,7 +3540,7 @@

    playUri

  • @@ -3698,106 +3564,6 @@

    Returns Promise -
    - -

    prependListener

    - - -
    -
    - -

    prependOnceListener

    - - -

    queueUri

    @@ -3808,7 +3574,7 @@

    queueUri

  • @@ -3832,64 +3598,17 @@

    Returns Promise

  • -
    - -

    rawListeners

    - - -

    removeAllListeners

      -
    • removeAllListeners<K>(event?: K): SpotifyRemoteApi
    • +
    • removeAllListeners<K>(event?: K): void
    -

    Returns SpotifyRemoteApi

    +

    Returns void

  • @@ -3912,7 +3631,7 @@

    Returns

    removeListener

    +
    +
    +
    deprecated
    +

    Use remove on the EventSubscription from addListener.

    +
    +
    +

    Type parameters

    • @@ -3954,7 +3680,7 @@

      Returns void

    -

    Returns SpotifyRemoteApi

    +

    Returns void

    @@ -3968,7 +3694,7 @@

    resume

  • @@ -3995,7 +3721,7 @@

    seek

  • @@ -4021,29 +3747,6 @@

    Returns Promise -
    - -

    setMaxListeners

    - - -

    setPlaying

    @@ -4054,7 +3757,7 @@

    setPlaying

  • @@ -4087,7 +3790,7 @@

    setRepeatMode

  • @@ -4120,7 +3823,7 @@

    setShuffling

  • @@ -4153,7 +3856,7 @@

    skipToNext

  • @@ -4180,7 +3883,7 @@

    skipToPrevious

  • diff --git a/docs/interfaces/spotifyremoteevents.html b/docs/interfaces/spotifyremoteevents.html index d00bb8d..2a1032e 100644 --- a/docs/interfaces/spotifyremoteevents.html +++ b/docs/interfaces/spotifyremoteevents.html @@ -2805,7 +2805,7 @@

    playerContextChanged

    playerContextChanged: PlayerContext
    @@ -2825,7 +2825,7 @@

    playerStateChanged

    playerStateChanged: PlayerState
    @@ -2845,7 +2845,7 @@

    remoteConnected

    remoteConnected: void
    @@ -2865,7 +2865,7 @@

    remoteDisconnected

    remoteDisconnected: void
    diff --git a/docs/modules.html b/docs/modules.html index 035173f..17b74c1 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -2975,7 +2975,7 @@

    Install

    Linking

    -

    As of React Native > 0.61, auto linking should work for both iOS and Android. There shouldn't be any modifications necessary and it Should work out of the box. The one caveat, is that react-native-events needs to be linked as it doesn't yet support auto linking. If you do run into issues or are using an older version of React Native, the following sections should help get you up and running.

    +

    As of React Native > 0.61, auto linking should work for both iOS and Android. There shouldn't be any modifications necessary and it Should work out of the box. If you do run into issues or are using an older version of React Native, the following sections should help get you up and running.

    iOS

    @@ -2986,8 +2986,7 @@

    iOS

    Cocoapods (Recommended)

    By far the easiest way to integrate into your project. In your ios/PodFile add the following lines to your projects target:

    -
        pod 'RNEventEmitter', :path => "../node_modules/react-native-events"
    -    pod 'RNSpotifyRemote', :path => '../node_modules/react-native-spotify-remote'
    +			
        pod 'RNSpotifyRemote', :path => '../node_modules/react-native-spotify-remote'
     

    See the Example App PodFile for a full example.

    I have only tested this against RN > 0.60 in the example app. So if you have issues with a RN version < 0.60 that might be a place to start troubleshooting.

    @@ -3034,11 +3033,6 @@

    iOS

    Android

    If you need to link your project manually, here are some things you'll need to do.

    -
    - -

    react-native-events does not support autolinking at this point and will need to be manually linked into your application

    -
    -
    1. Open up android/app/src/main/java/[...]/MainApplication.java
    @@ -3046,7 +3040,6 @@

    react-native-events does not support autolinking at this point
  • Add the following imports to the top of the file
  • import com.reactlibrary.RNSpotifyRemotePackage;
    -import com.lufinkey.react.eventemitter.RNEventEmitterPackage;
     
    • Add to the list returned by getPackages() for example:
    • @@ -3056,7 +3049,6 @@

      react-native-events does not support autolinking at this point @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: - packages.add(new RNEventEmitterPackage()); packages.add(new RNSpotifyRemotePackage()); return packages; } @@ -3065,14 +3057,10 @@

      react-native-events does not support autolinking at this point
    • Append the following lines to android/settings.gradle:

      include ':react-native-spotify-remote'
       project(':react-native-spotify-remote').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-spotify-remote/android')
      -
      -include ':react-native-events'
      -project(':react-native-events').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-events/android')
       
    • Insert the following lines inside the dependencies block in android/app/build.gradle:

      implementation project(':react-native-spotify-remote')
      -implementation project(':react-native-events')
       
    • As per the Spotify Android SDK Docs Insert the following lines into android/app/src/AndroidManifest.xml

      @@ -3183,7 +3171,7 @@

      Contributors


      Reinhard HΓΆll

      πŸ› πŸ’»
      Gustavo GraΓ±a

      πŸ› πŸ’»
      Dylan

      πŸ’» -
      Hoang

      πŸ’» +
      Hoang

      πŸ’»
      Hendri Pretorius

      πŸ› πŸ’» diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 3461f16..255dff9 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -190,7 +190,6 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation project(':react-native-spotify-remote') - implementation project(':react-native-events') implementation "com.facebook.react:react-native:+" // From node_modules implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" diff --git a/example/android/app/src/main/java/com/example/MainApplication.java b/example/android/app/src/main/java/com/example/MainApplication.java index 787f487..467c1d1 100644 --- a/example/android/app/src/main/java/com/example/MainApplication.java +++ b/example/android/app/src/main/java/com/example/MainApplication.java @@ -7,7 +7,6 @@ import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; -import com.lufinkey.react.eventemitter.RNEventEmitterPackage; import com.reactlibrary.RNSpotifyRemotePackage; import java.lang.reflect.InvocationTargetException; @@ -29,9 +28,6 @@ protected List getPackages() { // To allow for easier development, add manually. // Not necessary in the wild as it will be autolinked packages.add(new RNSpotifyRemotePackage()); - - // Packages that cannot be autolinked yet can be added manually here: - packages.add(new RNEventEmitterPackage()); return packages; } diff --git a/example/android/settings.gradle b/example/android/settings.gradle index ffd7b2d..5087191 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -3,9 +3,6 @@ rootProject.name = 'Spotify Remote SDK Example' include ':react-native-spotify-remote' project(':react-native-spotify-remote').projectDir = new File(rootProject.projectDir, '../../android') -include ':react-native-events' -project(':react-native-events').projectDir = new File(rootProject.projectDir, '../../node_modules/react-native-events/android') - apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' diff --git a/example/ios/Podfile b/example/ios/Podfile index 4f84ffa..19b174d 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -12,8 +12,6 @@ target 'example' do # Want to install the pod from the source directory so we can change it while developing pod 'RNSpotifyRemote', :path => "../../" - # RNEventEmitter doesn't seem to support the auto detection, manually specifying instead - pod 'RNEventEmitter', :path => "#{root_node_modules_path}/react-native-events" # Enables Flipper. # diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 4b5a88a..abfcb2f 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -307,8 +307,6 @@ PODS: - React-Core (= 0.63.4) - React-cxxreact (= 0.63.4) - React-jsi (= 0.63.4) - - RNEventEmitter (1.0.15): - - React - RNSpotifyRemote (0.3.10): - React-Core - Yoga (1.14.0) @@ -363,7 +361,6 @@ DEPENDENCIES: - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - - RNEventEmitter (from `../../node_modules/react-native-events`) - RNSpotifyRemote (from `../../`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) @@ -435,8 +432,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/Vibration" ReactCommon: :path: "../node_modules/react-native/ReactCommon" - RNEventEmitter: - :path: "../../node_modules/react-native-events" RNSpotifyRemote: :path: "../../" Yoga: @@ -480,7 +475,6 @@ SPEC CHECKSUMS: React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b - RNEventEmitter: db22b54ae7d9be0bd5725613f79a51e2bc364a93 RNSpotifyRemote: d99bc5dc5b59df472c51b3f8e6231259de26830a Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/ios/RNSpotifyRemote.xcodeproj/project.pbxproj b/ios/RNSpotifyRemote.xcodeproj/project.pbxproj index e6900bb..29eba35 100644 --- a/ios/RNSpotifyRemote.xcodeproj/project.pbxproj +++ b/ios/RNSpotifyRemote.xcodeproj/project.pbxproj @@ -288,7 +288,6 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../../../React/**", "$(SRCROOT)/../../react-native/React/**", - "$(SRCROOT)/../../react-native-events/ios", "$(PROJECT_DIR)/external/SpotifySDK/SpotifyiOS.framework/Headers", ); LIBRARY_SEARCH_PATHS = ( @@ -313,7 +312,6 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../../../React/**", "$(SRCROOT)/../../react-native/React/**", - "$(SRCROOT)/../../react-native-events/ios", "$(PROJECT_DIR)/external/SpotifySDK/SpotifyiOS.framework/Headers", ); LIBRARY_SEARCH_PATHS = ( diff --git a/ios/RNSpotifyRemoteAppRemote.h b/ios/RNSpotifyRemoteAppRemote.h index e828225..bb5e4e5 100644 --- a/ios/RNSpotifyRemoteAppRemote.h +++ b/ios/RNSpotifyRemoteAppRemote.h @@ -1,17 +1,7 @@ -#import -#if __has_include("RCTBridgeModule.h") -#import "RCTBridgeModule.h" -#else #import -#endif +#import -#if __has_include("RNEventEmitter.h") -#import "RNEventEmitter.h" -#else -#import -#endif - -@interface RNSpotifyRemoteAppRemote : NSObject +@interface RNSpotifyRemoteAppRemote : RCTEventEmitter //// isInitialized //-(id)isInitialized; @@ -47,6 +37,8 @@ -(void)getChildrenOfItem:(NSDictionary*)item resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject; -(void)getContentItemForUri:(NSString *)uri resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject; - +// Internal events API +-(void)eventStartObserving:(NSString *)eventType; +-(void)eventStopObserving:(NSString *)eventType; @end diff --git a/ios/RNSpotifyRemoteAppRemote.m b/ios/RNSpotifyRemoteAppRemote.m index d4104ae..b82508a 100644 --- a/ios/RNSpotifyRemoteAppRemote.m +++ b/ios/RNSpotifyRemoteAppRemote.m @@ -48,6 +48,10 @@ -(NSDictionary*)constantsToExport{ }; } +- (NSArray *)supportedEvents { + return @[EventNamePlayerStateChanged, EventNamePlayerContextChanged, EventNameRemoteDisconnected, EventNameRemoteConnected]; +} + #pragma mark Singleton Methods -(id)init @@ -453,32 +457,32 @@ -(void)resetEventSubscriptions{ }]; } -#pragma mark - RNEventConformer Implementation +// Will be called when this module's first listener is added. +-(void)startObserving { + // Set up any upstream listeners or background tasks as necessary +} -RCT_EXPORT_METHOD(__registerAsJSEventEmitter:(int)moduleId) +// Will be called when this module's last listener is removed, or on dealloc. +-(void)stopObserving { + // Remove upstream listeners, stop unnecessary background tasks +} + +RCT_EXPORT_METHOD(eventStartObserving:(NSString *)eventType) { - [RNEventEmitter registerEventEmitterModule:self withID:moduleId bridge:_bridge]; + [_eventSubscriptions setValue:@YES forKey:eventType]; + [self handleEventSubscriptions]; } --(void)sendEvent:(NSString*)event args:(NSArray*)args +RCT_EXPORT_METHOD(eventStopObserving:(NSString *)eventType) { - [RNEventEmitter emitEvent:event withParams:args module:self bridge:_bridge]; + [_eventSubscriptions setValue:@NO forKey:eventType]; + [self handleEventSubscriptions]; } --(void)onJSEvent:(NSString*)eventName params:(NSArray*)params{ - if([eventName isEqualToString:@"eventSubscribed"]){ - NSString * eventType = params[0]; - if(eventType != nil){ - [_eventSubscriptions setValue:@YES forKey:eventType]; - } - [self handleEventSubscriptions]; - }else if([eventName isEqualToString:@"eventUnsubscribed"]){ - NSString * eventType = params[0]; - if(eventType != nil){ - [_eventSubscriptions setValue:@NO forKey:eventType]; - } - [self handleEventSubscriptions]; - } + +-(void)sendEvent:(NSString*)event args:(NSArray*)args +{ + [self sendEventWithName:@event body:@args]; } @end diff --git a/package.json b/package.json index 83e614e..8f52abf 100644 --- a/package.json +++ b/package.json @@ -54,16 +54,12 @@ "peerDependencies": { "react-native": ">=0.60" }, - "dependencies": { - "react-native-events": "^1.0.21" - }, + "dependencies": {}, "devDependencies": { "@release-it/keep-a-changelog": "^2.2.2", - "@types/events": "^1.2.0", - "@types/react-native": "^0.57.0", + "@types/react-native": "^0.60.0", "all-contributors-cli": "^6.14.2", "concurrently": "^5.0.2", - "jetifier": "^1.6.5", "release-it": "^14.6.1", "typedoc": "^0.20.24", "typescript": "^4.1.3" diff --git a/src/SpotifyRemote.ts b/src/SpotifyRemote.ts index 20c2f2d..ca8b080 100644 --- a/src/SpotifyRemote.ts +++ b/src/SpotifyRemote.ts @@ -1,14 +1,13 @@ -import { NativeModules, Platform } from 'react-native'; -import RNEvents from 'react-native-events'; -import TypedEventEmitter from './TypedEventEmitter'; -import RepeatMode from './RepeatMode'; -import PlayerState from './PlayerState'; -import PlayerContext from './PlayerContext'; +import { EmitterSubscription, NativeEventEmitter, NativeModules, Platform } from 'react-native'; import ContentItem from './ContentItem'; -import CrossfadeState from './CrossfadeState'; -import RecommendedContentOptions from './RecommendedContentOptions'; import ContentType from './ContentType'; +import CrossfadeState from './CrossfadeState'; import GetChildrenItemsOptions, { DEFAULT_GET_CHILDREN_OPTIONS } from './GetChildrenItemsOptions'; +import PlayerContext from './PlayerContext'; +import PlayerState from './PlayerState'; +import RecommendedContentOptions from './RecommendedContentOptions'; +import RepeatMode from './RepeatMode'; +import TypedEventEmitter from './TypedEventEmitter'; /** * Events supported by the [[SpotifyRemoteApi]] @@ -253,20 +252,101 @@ export interface SpotifyRemoteApi extends TypedEventEmitter getCrossfadeState(): Promise; } -/** - * @ignore - */ -const SpotifyRemote = NativeModules.RNSpotifyRemoteAppRemote as SpotifyRemoteApi; -RNEvents.register(SpotifyRemote); -RNEvents.conform(SpotifyRemote); - -// Example of Javascript only api method -SpotifyRemote.setPlaying = (playing: boolean) => { - // todo: Will want to likely check the state of playing somewhere? - // Perhaps this can be done in native land so that we don't need to - // worry about it here - return playing ? SpotifyRemote.resume() : SpotifyRemote.pause(); -} +const nativeModule = NativeModules.RNSpotifyRemoteAppRemote; + +const nativeEventEmitter = new NativeEventEmitter(nativeModule); +const eventListeners: Record< + keyof SpotifyRemoteEvents, + Set +> = { + playerContextChanged: new Set(), + playerStateChanged: new Set(), + remoteConnected: new Set(), + remoteDisconnected: new Set(), +}; + +const SpotifyRemote: SpotifyRemoteApi = { + // Native APIs + connect: nativeModule.connect.bind(nativeModule), + disconnect: nativeModule.disconnect.bind(nativeModule), + getChildrenOfItem: nativeModule.getChildrenOfItem.bind(nativeModule), + getContentItemForUri: nativeModule.getContentItemForUri.bind(nativeModule), + getCrossfadeState: nativeModule.getCrossfadeState.bind(nativeModule), + getPlayerState: nativeModule.getPlayerState.bind(nativeModule), + getRecommendedContentItems: + nativeModule.getRecommendedContentItems.bind(nativeModule), + getRootContentItems: nativeModule.getRootContentItems.bind(nativeModule), + isConnectedAsync: nativeModule.isConnectedAsync.bind(nativeModule), + pause: nativeModule.pause.bind(nativeModule), + playItem: nativeModule.playItem.bind(nativeModule), + playItemWithIndex: nativeModule.playItemWithIndex.bind(nativeModule), + playUri: nativeModule.playUri.bind(nativeModule), + queueUri: nativeModule.queueUri.bind(nativeModule), + resume: nativeModule.resume.bind(nativeModule), + seek: nativeModule.seek.bind(nativeModule), + setRepeatMode: nativeModule.setRepeatMode.bind(nativeModule), + setShuffling: nativeModule.setShuffling.bind(nativeModule), + skipToNext: nativeModule.skipToNext.bind(nativeModule), + skipToPrevious: nativeModule.skipToPrevious.bind(nativeModule), + setPlaying(playing: boolean) { + // todo: Will want to likely check the state of playing somewhere? + // Perhaps this can be done in native land so that we don't need to + // worry about it here + return playing ? this.resume() : this.pause(); + }, + // Listeners + addListener(eventType, listener) { + const sub = nativeEventEmitter.addListener(eventType, listener); + if (this.listenerCount(eventType) === 0) { + nativeModule.eventStartObserving(eventType); + } + eventListeners[eventType].add(sub); + const _remove = sub.remove; + // rewrite sub.remove so we can add stopObserving API + sub.remove = () => { + _remove.call(sub); + eventListeners[eventType].delete(sub); + if (this.listenerCount(eventType) === 0) { + nativeModule.eventStopObserving(eventType); + } + }; + return sub; + }, + removeListener(eventType, listener) { + eventListeners[eventType].forEach((eventListener) => { + if (eventListener.listener === listener) eventListener.remove(); + }); + }, + removeAllListeners(eventType) { + const eventsToRemove = eventType ? [eventType] : this.eventNames(); + for (const eventToRemove of eventsToRemove) { + eventListeners[eventToRemove].forEach((eventListener) => { + eventListener.remove(); + }); + } + }, + emit(eventType, ...args) { + return nativeEventEmitter.emit(eventType, ...args); + }, + listenerCount(eventType) { + return eventListeners[eventType].size; + }, + on(...args) { + return this.addListener(...args); + }, + off(...args) { + return this.removeListener(...args); + }, + eventNames() { + return [ + 'playerContextChanged', + 'playerStateChanged', + 'remoteConnected', + 'remoteDisconnected', + ]; + }, +}; + // Augment the android module to warn on unimplemented methods @@ -301,48 +381,4 @@ if (Platform.OS === "ios") { } } - - -/** - * @ignore - * The events produced by the eventEmitter implementation around - * when new event listeners are added and removed - */ -const metaEvents = { - newListener: 'newListener', - removeListener: 'removeListener' -}; - - -/** -* @ignore -* Want to ignore the metaEvents when sending our subscription events -*/ -const ignoredEvents = Object.keys(metaEvents); - -/** - * @ignore - * The following allows us to lazily subscribe to events instead of having a single - * subscription all the time regardless which is less efficient -*/ -(SpotifyRemote as any).on(metaEvents.newListener, (type: string) => { - if (ignoredEvents.indexOf(type) === -1) { - const listenerCount = SpotifyRemote.listenerCount(type as any); - // If this is the first listener, send an eventSubscribed event - if (listenerCount == 0) { - RNEvents.emitNativeEvent(SpotifyRemote, "eventSubscribed", type); - } - } -}).on(metaEvents.removeListener, (type: string) => { - if (ignoredEvents.indexOf(type) === -1) { - const listenerCount = SpotifyRemote.listenerCount(type as any); - if (listenerCount == 0) { - RNEvents.emitNativeEvent(SpotifyRemote, "eventUnsubscribed", type); - } - } -}); - -/** - * @ignore - */ export default SpotifyRemote; diff --git a/src/TypedEventEmitter.ts b/src/TypedEventEmitter.ts index 57c9ef8..1ececec 100644 --- a/src/TypedEventEmitter.ts +++ b/src/TypedEventEmitter.ts @@ -1,26 +1,29 @@ +import { EmitterSubscription } from "react-native"; + /** * An EventEmitter that supports events given by the interface in {T} * Where each Key represents the eventName and the type represents the payload - * This interface is based on the implementation here: https://github.com/Gozala/events/blob/master/events.js * * @export * @interface TypedEventEmitter * @template T */ export default interface TypedEventEmitter { - on(name: K, listener: (v: T[K]) => void): this; - addListener(event: K, listener: (v: T[K]) => void): this; - once(event: K, listener: (v: T[K]) => void): this; - prependListener(event: K, listener: (v: T[K]) => void): this; - prependOnceListener(event: K, listener: (v: T[K]) => void): this; - removeListener(event: K, listener: (v: T[K]) => void): this; - off(event: K, listener: (v: T[K]) => void): this; - removeAllListeners(event?: K): this; - setMaxListeners(n: number): this; - getMaxListeners(): number; - listeners(event: K): (v: T[K]) => void[]; - rawListeners(event: K): (v: T[K]) => void[]; - emit(event: K, args: T[K]): boolean; - eventNames(): Array; + addListener(event: K, listener: (v: T[K]) => void): EmitterSubscription; + /** + * @deprecated Use `remove` on the EventSubscription from `addListener`. + */ + removeListener(event: K, listener: (v: T[K]) => void): void; + removeAllListeners(event?: K): void; + emit(event: K, args: T[K]): void; + eventNames(): Array; listenerCount(type: K): number; + /** + * @deprecated Use `addListener` instead. + */ + on(name: K, listener: (v: T[K]) => void): EmitterSubscription; + /** + * @deprecated Use `remove` on the EventSubscription from `addListener`. + */ + off(event: K, listener: (v: T[K]) => void): void; } \ No newline at end of file diff --git a/src/libs/react-native-events.d.ts b/src/libs/react-native-events.d.ts deleted file mode 100644 index 088d254..0000000 --- a/src/libs/react-native-events.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// This file just describes the shape of the react-native-events module -// as it doesn't have any types -declare module 'react-native-events'{ - interface RNEventsStatic{ - register(module:any):void; - conform(module:any):void; - emitNativeEvent(nativeModule:any,eventName:string,...args:any[]):void; - } - - const static :RNEventsStatic; - export default static; -} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 7b6d8e6..de250a9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { "compilerOptions": { /* Basic Options */ - "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ + "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ "lib": [ - "es5" + "ES2017" ], /* Specify library files to be included in the compilation: */ "jsx": "react", "skipLibCheck": true, @@ -22,7 +22,6 @@ "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ /* Source Map Options */ "sourceRoot": "./src", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - "experimentalDecorators": true /* Enables experimental support for ES7 decorators. */ }, "include": [ "src/**/*" diff --git a/yarn.lock b/yarn.lock index d6fe120..342252c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -203,11 +203,6 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/events@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" - integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== - "@types/http-cache-semantics@*": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" @@ -235,10 +230,10 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.0.tgz#4c48fed958d6dcf9487195a0ef6456d5f6e0163a" integrity sha512-eItQyV43bj4rR3JPV0Skpl1SncRCdziTEK9/v8VwXmV6d/qOUO8/EuWeHBbCZcsfSHfzI5UyMJLCSXtxxznyZg== -"@types/react-native@^0.57.0": - version "0.57.38" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.57.38.tgz#2ff6ed1a7cc207afbfd87bf496513d96931d1446" - integrity sha512-bmY2ad/vQgP0HMT7Q7EQzirDBt5ibp+kBHclTnY7/i5MrdqE1oY+3b9NkDg3ohXlumr7p5stAG6I55nhfeUV6Q== +"@types/react-native@^0.60.0": + version "0.60.31" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.31.tgz#a7af12197f884ad8dd22cda2df9862ed72973ded" + integrity sha512-Y0Q+nv50KHnLL+jM0UH68gQQv7Wt6v2KuNepiHKwK1DoWGVd1oYun/GJCnvUje+/V8pMQQWW6QuBvHZz1pV7tQ== dependencies: "@types/prop-types" "*" "@types/react" "*" @@ -866,11 +861,6 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -events@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - execa@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" @@ -1511,11 +1501,6 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -jetifier@^1.6.5: - version "1.6.5" - resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.5.tgz#ea87324a4230bef20a9651178ecab978ee54a8cb" - integrity sha512-T7yzBSu9PR+DqjYt+I0KVO1XTb1QhAfHnXV5Nd3xpbXM6Xg4e3vP60Q4qkNU8Fh6PHC2PivPUNN3rY7G2MxcDQ== - js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -2137,13 +2122,6 @@ rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-native-events@^1.0.20: - version "1.0.20" - resolved "https://registry.yarnpkg.com/react-native-events/-/react-native-events-1.0.20.tgz#e5eeb39b016f9663304991b4dd681395d964e4de" - integrity sha512-HzH+5FqzybUW48AZZYFQdvgrAqn9RyILKIPnCj6SjJIwUYnrP0lQ5c3pWcVdC1ZP1j7BPUDaUyHmatcOqOegJw== - dependencies: - events "^3.0.0" - read-pkg@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237"