Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin on which app is dependent is broken #38

Closed
coopsatwork opened this issue Nov 26, 2019 · 4 comments
Closed

Plugin on which app is dependent is broken #38

coopsatwork opened this issue Nov 26, 2019 · 4 comments
Assignees
Labels
0.0.2 bug Something isn't working

Comments

@coopsatwork
Copy link
Contributor

cordova-spotify is the Cordova plugin we use in order to stream audio from the Spotify SDK.
The plugin is dependent upon the Spotify native SDKs, which spotify have now removed, breaking the plugin.
With the SDK removed, we can't now rebuild our app, so it is effectively broken, although distributed versions currently installed are still working. I doubt this will be for much longer.
Spotify have now introduced a new 'connect' api, which enforces the owner of the account to specify devices which are allowed to use it. This additional authorisation must be incorporated into the app somehow.
We have already introduced OAuth2 sign-in, in addressing Issue 24 so will now attempt to use the web playback API as a fix to this issue, too.

@coopsatwork coopsatwork self-assigned this Nov 26, 2019
@coopsatwork coopsatwork added the bug Something isn't working label Nov 26, 2019
@coopsatwork
Copy link
Contributor Author

Progress:

We have shown that it's possible to play tracks on the Spotify App, using an Ionic/Cordova app as a 'remote control'. See here.

In this way, we're not reliant on the repair of the cordova-spotify plugin.

There are several implications we need to evaluate before proceeding:

Does this work for phones without a WiFi connection (that is, connected via mobile data)?

Can we work the Connection API into the Login workflow of the Gaddum App?
The Connection API relies on obtaining the spotify ID of the device holding the Spotify app instance to be controlled. We use the Connection API to list the devices. If there is more than one device, the user needs to select it.

There are alternatives:

  1. Obtain the missing binaries for the defunct Spotify SDK, and host them privately ourselves, so we can continue to build. This will mean forking the cordova-spotify plugin, so we can modify it.
  2. Fork the cordova-spotify plugin, so we can modify it to use the new versions of the SDK.

Both have their problems and while 2 is most desirable, we don't have the resources at present to tackle it.

@coopsatwork
Copy link
Contributor Author

Update:

Scenario: 2 phones:
Phone1 has Gaddum App + Spotify App
Phone2 has Spotify App

Both instances of the Spotfiy App are logged in to the same account.
Gaddum app is logged in to same account.

Gaddum App: Play: Lily Allen: Somewhere only we know

Gaddum App shows streaming and playback of track.
Phone1: Spotify App is actually playing track.
Phone2: Spotify App is showing 'You are listening on Nexus 5' with options: 'Continue' or 'Listen on this phone'.
Pressing 'Continue': Phone 1 is playing track. Phone 2 shows streaming video content.
Pressing 'Listen on this Phone': Phone 2 is playing track. Phone 1 shows streaming video content.

So, although you can have multiple instances of the Spotify App logged in to one Spotify account you may only stream to one of them.

Using the Gaddum app in this way allows you to choose tracks and stream them to different devices.

The Spotify App can be put into 'offline' mode, and will be able to play cached songs which were previously listened to.

However, this means it's unreachable by the Gaddum App.

More here

Although this is likely to be a great solution for our end users, the implications are very bad indeed for testing and development.

Any development teams who have been using a single test account between multiple testers and developers will now have the problem that developer's test apps will be interrupted whenever another developer is testing.

The Gaddum App will also need to be sensitive to control being taken away, and to gracefully handle it. We don't want the app to try and update to the newly selected track (on the different app instance) simply to recognise that the track has stopped playing, and then to abort whatever playlist is currently being selected.

I think development teams can live with this, but separate development teams would need seperate accounts.

@coopsatwork
Copy link
Contributor Author

We have obtained the plugins necessary to be able to keep building the app.

The plan is that we will offer 2 Spotify musicProviders: spotify 'classic', employing the legacy SDKs and spotify 'connect' which will use the web API. Both these features are doable with the resources that we have. Eventually, the 'classic' will be removed.

@coopsatwork
Copy link
Contributor Author

ccbda35

fixed in 0.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.0.2 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant