Skip to content
FrameworkStyle

simple-hls-audio-only

Audio-only HLS element that plays the audio rendition of an HLS stream

Audio-only HLS element that plays just the audio rendition of an HLS stream — even when the source is a mixed audio/video manifest. Useful for audio podcast players, background audio, and bandwidth-constrained contexts where downloading video data would be wasted. For full audio/video HLS playback, see SimpleHlsVideo.

Examples

Basic Usage

<simple-hls-audio-only
    class="simple-hls-audio-only"
    src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM.m3u8"
    controls
></simple-hls-audio-only>

API Reference

Attributes

Forwards these standard media attributes to the internal <audio>. See the MDN media element reference: autopictureinpictureautoplaycontrolscontrolslistcrossorigindisablepictureinpicturedisableremoteplaybackloadingloopmutedplaysinlineposterpreloadsrc

These Video.js-specific attributes configure media behavior:

AttributeTypeDefaultDetails
stream-typeMediaStreamType | NonNullable<Target["streamType"]>

Properties

PropertyTypeDefaultDetails
configMediaConfig
liveEdgeStartnumber
streamTypeMediaStreamType | NonNullable<Target["streamType"]>
targetLiveWindownumber

Also exposes these properties from the native media API. See HTMLAudioElement for details: autoplaybufferedcontrolscrossOrigincurrentSrccurrentTimedefaultMuteddefaultPlaybackRatedisableRemotePlaybackdurationendederrorloopmutedpausedplaybackRateplayedpreloadreadyStateremoteseekableseekingsrctextTrackstitlevolume

Methods

Supports these media methods. See HTMLAudioElement for details: addTextTrackcanPlayTypeloadpauseplay

Events

Re-dispatches these standard media events from the internal media element: abortaddtrackcanplaycanplaythroughchangedurationchangeemptiedendederrorloadeddataloadedmetadataloadstartpauseplayplayingprogressratechangeremovetrackseekedseekingstalledsuspendtimeupdatevolumechangewaiting

This element emits no events beyond the standard media events above.