The documentation states that setting this property to true
makes the player only play previews, even when authorization is available.
I am using it like this:
async function playPreview(songId) {
const music = window.MusicKit.getInstance();
music.previewOnly = true;
await music.setQueue({song: songId, startPlaying: true});
}
This still makes the entire song play.
I have cross-checked that I am indeed loading MusicKit v3 (MusicKit.version
returns '3.2226.3-prerelease').
Is the documentation wrong here, or am I missing something?