Adding MusicKit Features Using HTML
Add a music player, Apple Music content, and media controls to your web content using declarative markup elements.
After configuring and authorizing MusicKit JS in your web content, you can add elements of the player to your webpage's user interface using declarative HTML markup.
Add Media Playback Controls
Add these buttons for playback controls for the media player. This markup is analogous to
skipToPreviousItem in a MusicKit instance.
Add a Media Playback Queue
Add these buttons to set a playback queue for a playlist or album. This markup is analagous to
setQueue in a MusicKit instance.
To set a queue using an album identifier in the Apple Music API:
To set a queue using a playlist identifier in the Apple Music API:
Add a Now Playing Item
Add this information to display the currently playing media item. This information defaults to
information in a
MusicKit.MediaItem attributes are valid arguments.
Add Current Playback Information
Add this information to display the current playback time and the length of the current media item. These values are analagous to
currentPlaybackProgress in a
Add Media Library Items
Add these buttons to allow your user to include the indicated media item from the Apple Music catalog to their library. This markup is analagous to
addToLibrary in a