Search the site
APP
Players, recorders, 3D scenes and spatial windows share one rule: their state moves only when the device confirms it.
Add dartvel_scene and enable scene3d to render scenes through Flutter Scene. Browser rendering is verified; native rendering depends on Flutter GPU support. Most targets have no native player or headset binding yet, and each section says which.
ON THIS PAGE
Play audio and video, and record
Describe a 3D scene
Open a window in space
DVBox.video and DVBox.audio own their player while they are on screen, and release it when the page closes.
A player is not playing until the device says so, and a recording cut short by the app going to the background ends as interrupted, with the partial file kept.
Protected content with no DRM adapter is refused up front, never played broken.
// Playback is a mode of the box, so the box keeps its size, modifiers,
// gestures and semantics, and the source says what is played.
// The box's element owns the player, so leaving the page releases the
// decoder and the audio focus with it.
Widget trailer() => DVBox.video(
const DVMediaSource.url('https://cdn.example.com/trailer.mp4'),
controls: DVMediaControls.standard,
).modifier(const DVModifier().width(640));Copy code to clipboard
Partial
Spec section: Media Playback and Capture
Planned work and implementation limits
Linux plays through GStreamer, and only the audio: video frames are not drawn yet.
No player or recorder backend yet for Android, iOS, macOS, Windows, the web or TVs, and no camera capture anywhere.
No captions, lock-screen controls, picture-in-picture or casting.
flutter pub add dartvel_scene
dartvel build webCopy code to clipboard
# pubspec.yaml
dartvel:
scene3d:
enabled: trueCopy code to clipboard
Enable scene3d before building. Dartvel installs the renderer and switches Flutter GPU on for native builds automatically.
A scene is a document of nodes, cameras and glTF assets with stated units and axes, and it round-trips exactly.
Tapping picks the node under the finger by its real shape.
Assets must come from your own storage or listed hosts, with a digest that is checked before use.
Set dartvel.scene3d.enabled: true and add dartvel_scene: scenes then render through Flutter Scene, on Flutter GPU natively and WebGL2 in the browser, and the build switches Flutter GPU on for each platform for you.
Boxes, spheres and planes take small JSON materials (base colour, metal, roughness, glow); glTF models load as they are.
Where a device has no GPU support, the scene shows its poster and says why. It never shows a hole.
// A scene is a list of nodes, so what is in it is data a page builds rather
// than a sequence of calls into a renderer. The viewport reports how it had
// to degrade instead of quietly drawing less.
Widget mug(DVSceneAsset model) => DVBox.scene(
DVScene(
label: 'A stoneware mug, turning',
nodes: <DVSceneNode>[
DVModel3D(model).id('mug'),
DVSceneCamera.orbit(distance: 2.5, controls: true),
DVLight.directional(direction: const DVVec3(-1, -2, -1)).shadows(),
],
),
);Copy code to clipboard
Partial
Spec section: 3D Scenes
Planned work and implementation limits
Environment maps, textures and .fmat shader materials are planned.
No animation, physics or build-time asset import.
Checked in a browser; Linux, Android, iOS, macOS and Windows are not yet checked on a device.
A window can be a volume or an immersive space, with comfort settings, on a headset or glasses.
Passthrough asks for the camera first, and a world anchor is kept only with consent.
Partial
Spec section: XR: Spatial Presentation
Planned work and implementation limits
No native XR binding on any target yet, so spatial windows are not available on a device.
No dartvel build target for Android XR, Meta Horizon or visionOS.
FSL-1.1-MIT licensed. Built with Dartvel.
Dartvel is made by
To the bottom