Spotify

The <OneTap /> component provides Spotify services for Premium & Free subscribers.

Spotify Premium User

Spotify Premium users can enjoy the Spotify Web Player with their Spotify account after signing in.

'use client';

import { OneTap, SyncstreamProvider } from "@syncstreamai/syncstream";
import "@syncstreamai/syncstream/dist/index.css";

export default function App() {
  return (
    <SyncstreamProvider
      clientId="EXAMPLE_CLIENT_ID"
      signInRequired
    >
      <OneTap 
        spotifyDefaultLink="spotify:artist:2hlmm7s2ICUX0LVIhVFlZQ" 
        spotifyFreeAudioUrl={"https://boa-v2.vercel.app/audio/song.mp3"}
      />
    </SyncstreamProvider>
  );
}

Please refer to the Spotify documentation to learn more about this.

Spotify Free User

We provide a music player for users without a Spotify subscription as well. If you have are non-premium users, you can pass in a custom audio file to play.

Example:

<OneTap 
    contextUri="spotify:artist:0TnOYISbd1XYRBk9myaseg" 
    spotifyFreeAudioUrl={"https://boa-v2.vercel.app/audio/song.mp3"}
/>

User Experience

  1. Once you install the SDK and add <OneTap />, you can see a popup for Spotify Signin.

  2. In order to sign in, please click Sign In to Continue button

  3. Once signed in successfully, you are redirected to back to the artist's website.

  1. Clicking on the web player here text converts the popup into a web player, initiating music playback.

Last updated