
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@webwriter/interactive-video
Advanced tools
(WIP) Enhance learning by adding interactive content in popups to videos for an engaging, interactive experience.
@webwriter/interactive-video@3.0.1)License: MIT | Version: 3.0.1
(WIP) Enhance learning by adding interactive content in popups to videos for an engaging, interactive experience.
Snippets are examples and templates using the package's widgets.
| Name | Import Path |
|---|---|
| Mondlandung | @webwriter/interactive-video/snippets/Mondlandung.html |
WebwriterInteractiveVideo (<webwriter-interactive-video>)Class containing the video player as well as all the logic for video playback, interactive elements, controls, file input, and more.
This class extends the LitElementWw class.
Use with a CDN (e.g. jsdelivr):
<link href="https://cdn.jsdelivr.net/npm/@webwriter/interactive-video/widgets/webwriter-interactive-video.css" rel="stylesheet">
<script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/interactive-video/widgets/webwriter-interactive-video.js"></script>
<webwriter-interactive-video></webwriter-interactive-video>
Or use with a bundler (e.g. Vite):
npm install @webwriter/interactive-video
<link href="@webwriter/interactive-video/widgets/webwriter-interactive-video.css" rel="stylesheet">
<script type="module" src="@webwriter/interactive-video/widgets/webwriter-interactive-video.js"></script>
<webwriter-interactive-video></webwriter-interactive-video>
| Name (Attribute Name) | Type | Description | Default | Reflects |
|---|---|---|---|---|
hideInteractions (hide-interactions) | boolean | Whether interactions should be shown | false | âś“ |
hideChapters (hide-chapters) | boolean | Whether the video has chapters and they should be shown | false | âś“ |
disablePlaybackRateChange (disable-playback-rate-change) | boolean | Whether the user is allowed to change the playback rate | false | âś“ |
videoBase64 (video-base64) | string | Video file as a base64 string for offline storage. | "" | âś“ |
videoURL (video-url) | string | Video URL for online playback. | "" | âś“ |
videoLoaded (videoLoaded) | boolean | Indicates whether the video is currently loaded. | false | âś— |
videoType (video-type) | string | Type of the video source. | "placeholder" | âś“ |
videoDetails (video-details) | { title: string; author: string; duration: number } | Details of the video, such as title, author, and duration. | { title: "", author: "", duration: 0, } | âś“ |
waveformData (waveform-data) | number[][] | Waveform data for audio visualization generated by WaveSurfer.js. | null | âś“ |
chapterConfig (chapter-config) | { title: string, startTime: number }[] | Contains the current chapter configuration as an object. | [] | âś“ |
selectedInteractionId (selectedInteractionId) | number | Contains the ID of the selected interaction. | -1 | âś— |
videoInteractions | - | The list of video interaction elements slotted into the component. | - | âś— |
tabIndex (tabIndex) | number | The tab index of the component. | -1 | âś“ |
videoPlayer | VideoPlayer | The video player element | - | âś— |
Fields including properties and attributes define the current state of the widget and offer customization options.
| Name | Description | Parameters |
|---|---|---|
showPopups | Renders the overlay elements for the video. | - |
updateContext | Updates the videoContext attribute and requests an update. | - |
updateBaublePositions | Updates the positions of the baubles in the widget. | - |
playVideo | Plays the video. | - |
pauseVideo | Pauses the video. | - |
Methods allow programmatic access to the widget.
| Name | Value |
|---|---|
draggable | false |
definingAsContext | true |
content | (webwriter-video-interaction)* |
The editing config defines how explorable authoring tools such as WebWriter treat the widget.
No public slots, events, custom CSS properties, or CSS parts.
WwVideoInteraction (<webwriter-video-interaction>)webwriter-video-interaction is a custom element that represents an interaction in a replace interaction.
It extends LitElementWw and provides a slot for content insertion.
Use with a CDN (e.g. jsdelivr):
<link href="https://cdn.jsdelivr.net/npm/@webwriter/interactive-video/widgets/webwriter-video-interaction.css" rel="stylesheet">
<script type="module" src="https://cdn.jsdelivr.net/npm/@webwriter/interactive-video/widgets/webwriter-video-interaction.js"></script>
<webwriter-video-interaction></webwriter-video-interaction>
Or use with a bundler (e.g. Vite):
npm install @webwriter/interactive-video
<link href="@webwriter/interactive-video/widgets/webwriter-video-interaction.css" rel="stylesheet">
<script type="module" src="@webwriter/interactive-video/widgets/webwriter-video-interaction.js"></script>
<webwriter-video-interaction></webwriter-video-interaction>
| Name (Attribute Name) | Type | Description | Default | Reflects |
|---|---|---|---|---|
tabIndex (tabIndex) | number | The tab index of the component. | -1 | âś“ |
id (id) | - | The interaction id. Must be unique. | - | âś“ |
startTime (startTime) | - | The interaction start time in seconds. | - | âś“ |
endTime (endTime) | - | The interaction end time in seconds. | - | âś“ |
noInitialPause (noInitialPause) | boolean | Whether the interaction should pause the video when shown. | false | âś“ |
hasPaused (hasPaused) | boolean | Whether the interaction has already paused the video. | false | âś— |
posX (posX) | - | The x position of the interaction as a percentage of the video width. | - | âś“ |
posY (posY) | - | The y position of the interaction as a percentage of the video height. | - | âś“ |
width (width) | - | The width of the interaction in pixels. | - | âś“ |
height (height) | - | The height of the interaction in pixels. | - | âś“ |
parentWidth (parentWidth) | - | The width of the parent video player. | - | âś— |
parentHeight (parentHeight) | - | The height of the parent video player. | - | âś— |
videoBaseWidth (videoBaseWidth) | number | The video width in non-full-screen mode. | 800 | âś— |
videoBaseHeight (videoBaseHeight) | number | The video height in non-full-screen mode. | 450 | âś— |
Fields including properties and attributes define the current state of the widget and offer customization options.
| Name | Description |
|---|---|
| interactionClicked | - |
| positionChanged | - |
Events are dispatched by the widget after certain triggers.
| Name | Value |
|---|---|
draggable | false |
definingForContent | true |
isolating | true |
content | (flow)* |
uninsertable | true |
The editing config defines how explorable authoring tools such as WebWriter treat the widget.
No public methods, slots, custom CSS properties, or CSS parts.
Generated with @webwriter/build@1.9.0
FAQs
(WIP) Enhance learning by adding interactive content in popups to videos for an engaging, interactive experience.
We found that @webwriter/interactive-video demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.