Custom Simple Audio Player

The Custom Simple Audio Player offers a simple way to play one or more audio assets on an item with some optional customization features.

Using the custom simple audio player in your items is accomplished by specifying the player in the class attribute inside the <class> markup. Specify the names and locations of the audio resource files in the same way as with standard audio and video manipulatives – using the <object> tag as shown below.

The Custom Simple Audio Player can be customized for a number of purposes both at the item and at the asset level.

Item Level Parameters appear as class level features (class="abbi-audio-custom") and thus are behaviors applied to all audio assets on the item. When set to true:

  • data-prohibit-pause prevents the student from pausing playback. Once playback is initiated, the play button does not switch to Pause. Instead it disables until playback completes.
  • data-prohibit-progress-drag prevents the student from manually manipulating the audio player progress bar; the student can see the audio progress bar move during playback, but has no ability to interact with the control.
  • data-auto-navigate automatically navigates to the next item in the test when the final audio asset for the item finishes playing. This feature is intended for use only with web content (non-item) test content.

Interaction (asset) Level Parameters appear as object level features and are behaviors specified for a specific audio asset in the item. When set to true (or provided with the indicated strings):

  • data-auto-play will automatically begin playback of the audio asset without user input. Auto play of the first file of an item only happens the first time the file is played in the item. Thereafter, first files (data-order="1") flagged as auto play will have to be manually played. This prevents creating a playback loop that won't stop. Auto play will be honored when configured on the second and subsequent audio files of an item. Auto play triggers the same way on subsequent visits to the item.
  • data-max-plays allows content creators to enforce how many times the student can play an audio asset. The field is numeric indicating the number of completed plays allowed. For example:
    • A value of 0, missing, or blank indicates unlimited plays. Any other numeric value indicates the file can be played that many times.
    • The audio asset will not play after the number of replays reaches the value set in the data-max-plays parameter.
    • Partial plays are not counted; the audio file must be played to completion to count as a replay.
    • The PNP allowReplay setting overrides the data-max plays setting for a student.
  • data-ignore-for-pnp-replay works in combination with the PNP accommodation allowReplay to allow content authors to indicate specific item audio assets that cannot be replayed even when the PNP indicates otherwise. If data-ignore-for-pnp-replay is true for an audio asset, it overrides the PNP allowReplay setting preventing replay of the audio asset. This parameter applies only in the presence of the PNP accommodation allowReplay; it is not a stand-alone parameter.
  • data-order specifies the order of operations for playing audio assets. Each asset in the item is given a unique data-order sequence number and when playback begins, the assets will automatically play back in the provided data-order sequence, lowest value to highest. Audio assets need not be listed in sequential order in the item payload, but will still play in ascending numeric sequential order.

The custom simple audio player does not have a settings menu.

Get Responses:[ Click Get Responses ]
<?xml version="1.0" encoding="UTF-8" standalone="no"?><assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" adaptive="false" identifier="custom-audio-player-assets-multiple" timeDependent="false" title="custom-audio-player-assets-multiple" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/imsqti_v2p1.xsd">
    <itemBody>
        <div class="abbi-audio-custom">
            <div class="custom-audio-player" data-prohibit-progress-drag="true">
                <object data="assets/number42.mp3" data-auto-play="false" data-max-plays="2" data-order="2" type="audio/mp3"/>
                <object data="assets/instructions.mp3" data-auto-play="true" data-order="1" type="audio/mp3"/>
                <object data="assets/Track3.mp3" data-order="3" type="audio/mp3"/>
            </div>
        </div>
    </itemBody>
</assessmentItem>