resume

resume play / resume music playback from the authenticated provider.

Example

'use client';

import { OneTap, SyncstreamProvider, useSyncstream } 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" />
    </SyncstreamProvider>
  );
}

export default Example() {
  const { resume } = useSyncstream()
  
  return (
    <button
      type="button"
      onClick={resume}
    >
      Resume
    </button>
  )
}

Last updated