pause
pause
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 { pause } = useSyncstream()
return (
<button
type="button"
onClick={pause}
>
Pause
</button>
)
}
Last updated