Skip to main content
Logo Appt Light

Success Criterion 1.2.3 - Level A

Audio Description or Media Alternative (Prerecorded)

Ensure a transcript or audio description is provided for videos where you can't hear what is displayed. The content can then be read in case of a transcript, or heard in case of audio description.

Impact

  • A transcript is useful for anyone who has trouble understanding video frames.

  • People who are blind can hear what can be seen in videos through an additional audio track.

Check

“Is a transcript or audio description available for all videos?”

This can be tested visually, no assistive technologies are needed.

Solution

Add transcript

On Android, you can use a TextView to display written text. Don't forget to put it in a ScrollView, to make the text scrollable.

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Appt transcript" />
</ScrollView>

Add audio description

As of Android 4.1, the MediaPlayer has support for multiple audio tracks. Use the selectTrack method to select the correct audio track.

The code example belows shows a basic implementation of selecting an audio description track embedded inside a video.

val player = MediaPlayer.create(this, R.raw.video)
try {
    player.trackInfo.forEachIndexed { index, trackInfo ->
        if (trackInfo.trackType == TrackInfo.MEDIA_TRACK_TYPE_AUDIO) {
            player.selectTrack(index)
            return@forEachIndexed
        }
    }
    player.start()
} catch (e: Exception) {
    e.printStackTrace()
}

Resources

Feedback?

Let us know!