Skip to Content
defold-typescript libraries
defold (official)

defold/extension-videoplayer

An example native extension that decodes .webm video into a buffer, with no sound support. Upstream marks it as an example not meant for production use. It registers a videoplayer Lua module with functions such as videoplayer.open, videoplayer.get_frame and videoplayer.update.

Lua API not typed — upstream ships no .script_api, so resolve skips it.

  • GitHub: defold/extension-videoplayer — pinned to 1.0.0 (released while Defold 1.11.2 was current)
    1. This repo publishes no stable release. Pick a tag from defold/extension-videoplayer tags and add its Source code (zip) URL — for the pinned tag, https://github.com/defold/extension-videoplayer/archive/refs/tags/1.0.0.zip — to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Load the video with resource.load.
    3. Open it with videoplayer.open.
    4. Call videoplayer.update each frame and upload the frame buffer to a texture.

Engine APIs

The example loads the video and writes each frame with resource (resource.load, resource.set_texture); the frame is a buffer with one RGB stream, shown on a sprite.

On this page