1.9.0 • Published 3 years ago
clef-ui-sdk v1.9.0
Clef UI SDK
ClefDisc component and function lib for song playback control
npm i clef-ui-sdkClefDisc
Minimal example:
import { ClefDisc } from 'clef-ui-sdk';
const Foo = () => <ClefDisc assetID={ASSET_ID} />;Full example:
import { ClefDisc } from 'clef-ui-sdk';
const Foo = () => {
const handleImageReady = (image: string) => console.log(image);
return <ClefDisc assetID={ASSET_ID} isAnimate borderColor="#ffffff" onImageReady={handleImageReady} />;
}- assetID - asset identifier
- isAnimate - enable rotation (optional)
- borderColor - disc border color (optional, no border by default)
- colors - pass array of COLORS or get colors from asset if
nullorundefined(optional,nullby default) - size -
small-responsive: 28px - 34px,normal-responsive: 92px - 240px (normal-responsiveby default) - onImageReady - callback, if passed, returns the base64 png image in the
imageparameter (optional, not converted by default)
type Props = {
assetID: string;
isAnimate?: boolean;
borderColor?: string;
colors?: SongColor[] | null;
size?: 'small-responsive' | 'normal-responsive';
onImageReady?: (image: string) => void;
};SDK
Providing functions from SDK:
Function play_song_by_asset_id partially applied.
No first argument Tone
- get_song_name_by_asset_id
- set_volume
- play_song_by_asset_id
- stop
import { get_song_name_by_asset_id } from 'clef-ui-sdk';1.9.0
3 years ago
1.8.2
3 years ago
1.8.1
3 years ago
1.8.0
3 years ago
1.8.4
3 years ago
1.8.3
3 years ago
1.7.1
3 years ago
1.7.0
3 years ago
1.6.2
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.1
3 years ago
1.3.2
3 years ago
1.4.0
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago
1.1.0
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago