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)- 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— togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Load the video with
resource.load. - Open it with
videoplayer.open. - Call
videoplayer.updateeach frame and upload the frame buffer to a texture.
- 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,
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.