Skip to main content
Version: 5.x

vm-audio

Enables loading, playing and controlling audio via the HTML5 <audio> element.

You don't interact with this component for passing player properties, controlling playback, listening to player events and so on, that is all done through the vime-player component.

Usage#

<vm-player controls>
<vm-audio>
<source data-src="/media/audio.mp3" type="audio/mp3" />
<!-- <source> and <track> elements are placed here. -->
</vm-audio>
<!-- ... -->
</vm-player>

Properties#

PropertyDescriptionTypeDefault
crossOriginWhether to use CORS to fetch the related image. See MDN for more information."" ∣ "anonymous" ∣ "use-credentials" ∣ undefinedundefined
disableRemotePlaybackEXPERIMENTAL: Whether to disable the capability of remote playback in devices that are attached using wired (HDMI, DVI, etc.) and wireless technologies (Miracast, Chromecast, DLNA, AirPlay, etc).boolean ∣ undefinedundefined
mediaTitleThe title of the current media.string ∣ undefinedundefined
preloadProvides a hint to the browser about what the author thinks will lead to the best user experience with regards to what content is loaded before the video is played. See MDN for more information."" ∣ "auto" ∣ "metadata" ∣ "none" ∣ undefined'metadata'

Slots#

SlotDescription
Pass <source> and <track> elements to the underlying HTML5 media player.

Dependencies#

Depends on#