Skip to main content
Version: 4.x

vime-video

Enables loading, playing and controlling videos via the HTML5 <video> 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#

<vime-player controls>
<vime-video poster="/media/poster.png">
<source data-src="/media/video.mp4" type="video/mp4" />
<track
default
kind="subtitles"
src="/media/subs/en.vtt"
srclang="en"
label="English"
/>
<track
kind="captions"
src="/media/caps/es.vtt"
srclang="es"
label="Spanish"
/>
</vime-video>
<!-- ... -->
</vime-player>

Properties#

PropertyAttributeDescriptionTypeDefault
autoPiPauto-pipEXPERIMENTAL: Whether the browser should automatically toggle picture-in-picture mode as the user switches back and forth between this document and another document or application.boolean ∣ undefinedundefined
controlsListcontrols-listDetermines what controls to show on the media element whenever the browser shows its own set of controls (e.g. when the controls attribute is specified).string ∣ undefinedundefined
crossOrigincross-originWhether to use CORS to fetch the related image. See MDN for more information."" ∣ "anonymous" ∣ "use-credentials" ∣ undefinedundefined
disablePiPdisable-pipEXPERIMENTAL: Prevents the browser from suggesting a picture-in-picture context menu or to request picture-in-picture automatically in some cases.boolean ∣ undefinedundefined
disableRemotePlaybackdisable-remote-playbackEXPERIMENTAL: 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
mediaTitlemedia-titleThe title of the current media.string ∣ undefinedundefined
posterposterA URL for an image to be shown while the video is downloading. If this attribute isn't specified, nothing is displayed until the first frame is available, then the first frame is shown as the poster frame.string ∣ undefinedundefined
preloadpreloadProvides 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#

Used by#

Depends on#

Graph#

graph TD;
vime-video --> vime-file
vime-dash --> vime-video
vime-hls --> vime-video
vime-playground --> vime-video
style vime-video fill:#f9f,stroke:#333,stroke-width:4px

Built with StencilJS