function usePlayRichContent
usePlayRichContent(): UsePlayRichContentResult

Returns a function that plays a link's preview in its provider's embed. When the deployment sets GERBEUR_BANDCAMP_PLAYER=native, a Bandcamp page is resolved into its mp3 streams instead and played as a queue, which autoplays and plays an album through. If that fails (offline, a preorder, Bandcamp changing its markup), the embed plays, and a page without one (an artist's root, a /music index) plays nothing.

Return Type

Usage

import { usePlayRichContent } from "src/hooks/player/usePlayRichContent.ts";