🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@webwriter/interactive-video

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webwriter/interactive-video

(WIP) Enhance learning by adding interactive content in popups to videos for an engaging, interactive experience.

latest
npmnpm
Version
3.0.1
Version published
Maintainers
1
Created
Source

Interactive Video (@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

Snippets are examples and templates using the package's widgets.

NameImport 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.

Usage

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>

Fields

Name (Attribute Name)TypeDescriptionDefaultReflects
hideInteractions (hide-interactions)booleanWhether interactions should be shownfalseâś“
hideChapters (hide-chapters)booleanWhether the video has chapters and they should be shownfalseâś“
disablePlaybackRateChange (disable-playback-rate-change)booleanWhether the user is allowed to change the playback ratefalseâś“
videoBase64 (video-base64)stringVideo file as a base64 string for offline storage.""âś“
videoURL (video-url)stringVideo URL for online playback.""âś“
videoLoaded (videoLoaded)booleanIndicates whether the video is currently loaded.falseâś—
videoType (video-type)stringType 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)numberContains the ID of the selected interaction.-1âś—
videoInteractions-The list of video interaction elements slotted into the component.-âś—
tabIndex (tabIndex)numberThe tab index of the component.-1âś“
videoPlayerVideoPlayerThe video player element-âś—

Fields including properties and attributes define the current state of the widget and offer customization options.

Methods

NameDescriptionParameters
showPopupsRenders the overlay elements for the video.-
updateContextUpdates the videoContext attribute and requests an update.-
updateBaublePositionsUpdates the positions of the baubles in the widget.-
playVideoPlays the video.-
pauseVideoPauses the video.-

Methods allow programmatic access to the widget.

Editing config

NameValue
draggablefalse
definingAsContexttrue
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.

Usage

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>

Fields

Name (Attribute Name)TypeDescriptionDefaultReflects
tabIndex (tabIndex)numberThe 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)booleanWhether the interaction should pause the video when shown.falseâś“
hasPaused (hasPaused)booleanWhether 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)numberThe video width in non-full-screen mode.800âś—
videoBaseHeight (videoBaseHeight)numberThe video height in non-full-screen mode.450âś—

Fields including properties and attributes define the current state of the widget and offer customization options.

Events

NameDescription
interactionClicked-
positionChanged-

Events are dispatched by the widget after certain triggers.

Editing config

NameValue
draggablefalse
definingForContenttrue
isolatingtrue
content(flow)*
uninsertabletrue

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

Keywords

webwriter-widget

FAQs

Package last updated on 21 Oct 2025

Did you know?

Socket

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.

Install

Related posts