Zum Hauptinhalt springenSeitenleiste
Auf dieser Seite

Video Player

<pc-video-player>Seit  1.0.0-alpha.5Experimentell

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Video players present visual media and provide controls for playback.

Edit

Demos

Poster

Use the poster attribute to add a poster (thumbnail) to the video, which shows before the video is played.

Edit

Autoplay

Use the autoplay attribute to start the video automatically.

Edit

Muted

Use the muted attribute to silence the video by default.

Edit

Loop

Use the loop attribute to make the video loop to the start again once it reaches the end.

Edit

No controls

Use the no-controls attribute to hide the video player controls.

Edit

Subtitles and captions

To add subtitles or captions, put a <track> element inside the default slot to import your WebVTT file.

Captions (which include dialogue alongside sound descriptions and speaker identifiers) should use kind="captions". Standard subtitles (which contain dialogue only) should use kind="subtitles".

Edit

Eigenschaften

NameBeschreibungReflektiertStandard
srcThe source of the video.
Typ: string
""
posterThe placeholder image of the video if it hasn’t loaded yet.
Typ: string
""
autoplayAutomatically plays the video without user interaction (i.e., pressing the play button).
Typ: boolean
false
mutedMutes the video by default.
Typ: boolean
false
loopLoops the video by default.
Typ: boolean
false
preloadDetermines how much of the video is loaded before the user interacts with it.
Typ: "none" | "metadata" | "auto"
"metadata"
noControls
no-controls
Hides the video player controls.
Typ: boolean
false
dataTitle
data-title
Provides a custom title to the video.
Typ: string
""
updateCompleteEin schreibgeschütztes Promise, das erfüllt ist, sobald die Komponente fertig aktualisiert wurde.

Erfahre mehr über Attribute und Eigenschaften.

Slots

NameBeschreibung
(Standard)The video player’s media sources and subtitle/caption tracks.

Erfahre mehr über die Benutzung von Slots.

Methoden

NameBeschreibungArgumente
play()Plays the video.
pause()Pauses the video.
toggle()Toggles the state of the video between play and pause.

Erfahre mehr über Methoden.

Events

NameBeschreibungEvent‐Detail
pc-playEmitted when the video is played.
pc-pauseEmitted when the video is paused.

Erfahre mehr über Events.

Parts

NameBeschreibung
frameThe video player’s frame.
initial-overlayThe video player’s initial overlay before the video starts.
initial-playThe initial overlay’s play button.
initial-play-baseThe initial play button’s base part.
initial-play-labelThe initial play button’s label part.
initial-play-iconThe initial play button’s <pc-icon> element.
initial-play-icon-svgThe <pc-icon> element’s svg part of the initial play button.
titleThe video player’s title.
videoThe video player’s internal <video> element.
captions-containerThe video player’s caption container.
caption-cueThe video player’s caption cue.
caption-line-containerThe video player’s caption cue line’s container.
caption-lineThe video player’s caption cue line.
progress-barThe video player’s progress bar container.
progress-wrapperThe progress bar’s progress wrapper.
progress-bufferThe progress wrapper’s buffer element.
progress-sliderThe progress wrapper’s slider.
progress-slider-sliderThe progress slider’s slider part.
progress-slider-trackThe progress slider’s track part.
progress-slider-indicatorThe progress slider’s indicator part.
progress-slider-thumbThe progress slider’s thumb part.
progress-slider-tooltipThe progress slider’s tooltip part.
progress-slider-tooltip-tooltipThe tooltip’s tooltip part of the progress slider.
progress-slider-tooltip-contentThe tooltip’s content part of the progress slider.
progress-slider-tooltip-arrowThe tooltip’s arrow part of the progress slider.
controlsThe video player’s controls.
playThe video player’s play button.
play-baseThe play button’s base part.
play-labelThe play button’s label part.
play-iconThe play button’s <pc-icon> element.
play-icon-svgThe <pc-icon> element’s svg part of the play button.
mute-containerThe container for the video player’s mute button and volume slider.
muteThe video player’s mute button.
mute-baseThe mute button’s base part.
mute-labelThe mute button’s label part.
mute-iconThe mute button’s <pc-icon> element.
volume-sliderThe volume slider.
volume-slider-sliderThe volume slider’s slider part.
volume-slider-trackThe volume slider’s track part.
volume-slider-indicatorThe volume slider’s indicator part.
volume-slider-thumbThe volume slider’s thumb part.
volume-slider-tooltipThe volume slider’s tooltip part.
volume-slider-tooltip-tooltipThe tooltip’s tooltip part of the volume slider.
volume-slider-tooltip-contentThe tooltip’s content part of the volume slider.
volume-slider-tooltip-arrowThe tooltip’s arrow part of the volume slider.
time-containerThe video player’s time container.
controls-groupThe video player’s controls group.
captionsThe video player’s captions button.
captions-baseThe captions button’s base part.
captions-labelThe captions button’s label part.
captions-iconThe captions button’s <pc-icon> element.
captions-icon-svgThe <pc-icon> element’s svg part of the captions button.
settings-menuThe video player’s settings menu.
settings-menu-baseThe settings menu’s base part.
settings-menu-menuThe settings menu’s menu part.
settings-buttonThe settings menu’s trigger button.
settings-button-baseThe settings button’s base part.
settings-button-labelThe settings button’s label part.
settings-button-iconThe settings button’s <pc-icon> element.
settings-button-icon-svgThe <pc-icon> element’s svg part of the settings button.
settings-menu-itemThe video player’s settings menu items.
settings-menu-item-checkmarkThe settings items’ checkmark part.
settings-menu-item-checkmark-svgThe settings items’ checkmark-svg part.
settings-menu-item-iconThe settings items’ icon part.
settings-menu-item-labelThe settings items’ label part.
settings-menu-item-detailsThe settings items’ details part.
settings-menu-item-submenu-iconThe settings items’ submenu-icon part.
settings-menu-item-submenu-icon-svgThe settings items’ submenu-icon-svg part.
settings-menu-item-submenuThe settings items’ submenu part.
settings-menu-dividerThe settings menu’s divider.
picture-in-pictureThe video player’s Picture in Picture button.
picture-in-picture-baseThe Picture in Picture button’s base part.
picture-in-picture-labelThe Picture in Picture button’s label part.
picture-in-picture-iconThe Picture in Picture button’s <pc-icon> element.
picture-in-picture-icon-svgThe <pc-icon> element’s svg part of the Picture in Picture button.
full-screenThe video player’s full screen button.
full-screen-baseThe full screen button’s base part.
full-screen-labelThe full screen button’s label part.
full-screen-iconThe full screen button’s <pc-icon> element.
full-screen-icon-svgThe <pc-icon> element’s svg part of the full screen button.

Erfahre mehr über das Anpassen von CSS‐Parts.

Importieren

Wenn du den Auto‐Loader oder den Standard‐Loader nutzt, kannst du diesen Abschnitt überspringen. Falls du dich für „Cherry‐Picking“ entschieden hast, kannst du die folgenden Snippets verwenden, um diese Komponente zu importieren.

CDN (Skript‐Tag)CDN (Import)npm (Import)

Um diese Komponente manuell vom CDN zu importieren, kannst du dieses Code‐Snippet kopieren und es in dein HTML einfügen.

<script type="module" src="https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.6/cdn/components/video-player/video-player.js"></script>

Um diese Komponente manuell vom CDN zu importieren, kannst du dieses Code‐Snippet kopieren und es in deine JavaScript‐Datei einfügen.

import "https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.6/cdn/components/video-player/video-player.js";

Um diese Komponente manuell von npm zu importieren, kannst du dieses Code‐Snippet kopieren und es in deine JavaScript‐Datei einfügen.

import "placer-toolkit/dist/components/video-player/video-player.js";

Abhängigkeiten

Diese Komponente importiert automatisch folgende Komponenten:

Wir würden uns freuen, von dir zu hören. Kontaktiere uns einfach bei Fragen oder Anliegen.

Du kannst uns per E‐Mail unter placer.coc.reports+contact@gmail.com erreichen.

Wir freuen uns darauf, von dir zu hören!

Alles klar!
Gefährliche Lande

Ui! Du bist in die gefährlichen Lande von Placer Toolkit geraten. Version 0 ist veraltet und entspricht nicht den EU‐Datenschutzstandards, einschließlich DSGVO.

Willst du die neuesten Kräfte, Sicherheit und Compliance? Bleib bei der aktuellen Version von Placer Toolkit!

Ups!Aufladen!

Unsere Website ist zu 100 % frei von Cookies! Wir legen großen Wert auf deine Privatsphäre und speichern daher keinerlei Cookies oder persönliche Informationen über dich.

Dein Browserverlauf bleibt sauber und deine Daten sind geschützt, ganz im Einklang mit modernen Datenschutzstandards wie der DSGVO. Genieße deinen Besuch ganz ohne digitale Cookies! 🍪🚫

Weitere Informationen findest du in unserer Datenschutzerklärung.

Alles klar!