LogoLogo
  • Overview
  • Quickstart
  • <SyncstreamProvider />
  • <OneTap />
    • Spotify
    • Apple Music
    • Presave
      • Apple Music Presave
      • Spotify Presave
    • Custom CTA
  • Utilities
    • Resume
    • Pause
Powered by GitBook
On this page
  • Spotify Premium User
  • Spotify Free User

Was this helpful?

Export as PDF
  1. <OneTap />

Spotify

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

Spotify Premium User

Spotify Premium users can enjoy the Recoup Webplayer 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:album:1HOMjYmPvDpCNbb44JnFaa" 
        spotifyFreeAudioUrl={"https://boa-v2.vercel.app/audio/song.mp3"}
        spotifyStartIndex={18}
      />
    </SyncstreamProvider>
  );
}
import React from 'react';
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:album:1HOMjYmPvDpCNbb44JnFaa" 
         spotifyFreeAudioUrl={"https://boa-v2.vercel.app/audio/song.mp3"}
         spotifyStartIndex={18}
      />
    </SyncstreamProvider>
  );
}
Property
Description

spotifyDefaultLink

Optional.

  • Spotify URI of the context to play. Valid contexts are albums, artists & playlists.

  • A JSON array of the Spotify track URIs to play. For example: ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]

spotifyFreeAudioUrl

Optional. Audio for Spotify free users.

spotifyStartIndex

Optional. Track number to begin with from the selected media in spotifyDefaultLink. Only applicable if spotifyDefaultLink is an album or a playlist.

Spotify Free User

We provide a music player for users without a Spotify subscription as well. If you have 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"}
/>
Property
Description

spotifyFreeAudioUrl

Optional. music audio URL.

Previous<OneTap />NextApple Music

Last updated 6 months ago

Was this helpful?

Please refer to the to learn more about this.

Spotify documentation