VideoTextureElement Op

VideoTextureElement

Play a video file, use it as a texture, and output the native HTML video element.


Changelog: Video Player Op Update

Overview

Updated the video player operator to expose the native HTML5 video element, allowing for advanced DOM manipulation and downstream integration outside of the WebGL context.

Added Features

  • New Output Port (outElement): Added an Object output port labeled "Video Element" (op.outObject("Video Element")).
  • Direct DOM Access: The operator now directly exposes the native HTML5 <video> node created internally during initialization.

Use Cases

This modification allows downstream Ops or custom scripts to access the raw DOM element. It enables:

  • Applying custom CSS properties to the video element.
  • Adding specific custom event listeners.
  • Integrating and positioning the video directly into the HTML layout (DOM) outside of the WebGL canvas.

Full Name
  • Ops.Patch.PR5Jn1t.VideoTextureElement
VisibilityLicense
  • MIT
AuthorCreated
  • Aug 22, 2026 at 12:01
Core Libraries
  • interactionneededbutton
  • cgl



Multi Face Tracking Bounding box & video Element

Multiface tracking Op with bounding box and videoTextureElement Op example

Open In Editor

INPUT PORTS


Update (Trigger)
file (String)

File to play

play (Number: boolean)

Start playback

loop (Number: boolean)

Loop file when it reaches the end

Audio

Volume (Number)

Audio volume

mute (Number: boolean)

mute audio

Texture

Filter index (Number: integer) nearest  linear 
Wrap index (Number: integer)
flip (Number: boolean)

Flip the texture

Timing

speed (Number)

Speed of playback

set time (Number)

Set time to trigger playback from

Rewind (Trigger)
Preload (Number: boolean)

Load into memory - useful when loading from a URL

Show Interaction needed Button (Number: boolean)

OUTPUT PORTS


Next (Trigger)
texture (Object)

Texture out

duration (Number)

Duration of loaded media

progress (Number)

Playback progress

Interaction Needed (booleanNumber)
CurrentTime (Number)
Loading (booleanNumber)
Playing (booleanNumber)
Can Play Through (booleanNumber)
Ended (Trigger)
Texture Updated (Trigger)
Width (Number)

Width of texture

Height (Number)

height of texture

Aspect Ratio (Number)
Has Error (booleanNumber)
Error Message (String)
Video Element (Object)

Changelog

Patches using VideoTextureElement

  • Examples
  • Public
  • My Patches