Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 35x 78x | import {
autoPlay as runAutoPlay,
manualPlay as runManualPlay,
type PlayerOptions,
type PlayerSummary,
} from '../index.ts';
import type { BeMusicJSON } from '@be-music/chart-source';
import { createNodeAudioSession, loadNodeAudioSampleDurations } from '@be-music/player-node-audio';
export function autoPlay(json: BeMusicJSON, options: PlayerOptions = {}): Promise<PlayerSummary> {
return runAutoPlay(json, {
createAudioSession: createNodeAudioSession,
loadAudioSampleDurations: loadNodeAudioSampleDurations,
...options,
});
}
export function manualPlay(json: BeMusicJSON, options: PlayerOptions = {}): Promise<PlayerSummary> {
return runManualPlay(json, {
createAudioSession: createNodeAudioSession,
loadAudioSampleDurations: loadNodeAudioSampleDurations,
...options,
});
}
|