Post

Replies

Boosts

Views

Activity

Reply to How to set volume with MusicKit Web?
Okay, it appears this isn't that hard after all, but it's confusing, so I'll document some things here for future readers. music.volume = 0.5 works. Not sure why I didn't try that, except that the docs were confusing. The "playbackVolumeDidChange" listener event does not include the actual volume that the volume has changed to, so it's kinda worthless, unless your'e using the web component maybe. What I've done is maintain volume in state and update state when I set music.volume. This allows me to update a slider value and the actual volume in the music instance with some flexibility. It would still be nice to know how to get web components working, so I'll leave this unanswered.
Topic: Media Technologies SubTopic: Audio Tags:
Jan ’25
Reply to How to set volume with MusicKit Web?
Okay, it appears this isn't that hard after all, but it's confusing, so I'll document some things here for future readers. music.volume = 0.5 works. Not sure why I didn't try that, except that the docs were confusing. The "playbackVolumeDidChange" listener event does not include the actual volume that the volume has changed to, so it's kinda worthless, unless your'e using the web component maybe. What I've done is maintain volume in state and update state when I set music.volume. This allows me to update a slider value and the actual volume in the music instance with some flexibility. It would still be nice to know how to get web components working, so I'll leave this unanswered.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to MusicKit Web Playback States
I could be wrong, but I think that the numbers might actually be the order of these here, if they were an array. Would be nice if those docs were updated.
Topic: Media Technologies SubTopic: Audio Tags:
Replies
Boosts
Views
Activity
Feb ’25