Media player
Plays a video asset or an open stream URL (MP4, WebM; HLS where the browser plays it natively) as one video stream with play, loop and rate controls.
- Media
- Since 0.2.0
- media
- video file
- stream
- source
Media player plays a video file or an open stream as one video stream, with play, loop, rate and seek controls.
What it does#
Set data.asset to a declared video asset id, or data.source to an open URL. Neither is required: without either the player waits for the host to choose media. HLS plays only where the browser plays it natively; DASH is not supported. Playback is paced by the media and the newest frame wins.
When to use it#
Use it for clips, backgrounds and prerecorded sources that you want to filter or composite with other streams.
Ports#
| Port | Direction | Signal | Lanes |
|---|---|---|---|
video | Output | Video | 1 |
Parameters#
| Parameter | Label | Range | Default | Unit | Scale | Notes |
|---|---|---|---|---|---|---|
playing | Playing | 0 to 1 | 1 | linear | Play or pause the media. Choices: 0 Paused, 1 Playing. | |
loop | Loop | 0 to 1 | 1 | linear | Start again at the end. Choices: 0 Once, 1 Loop. | |
rate | Rate | 0.25 to 4 | 1 | × | log | Playback speed. |
seek | Seek | 0 to 1 | 0 | linear | Jump to this fraction of the duration whenever the value changes. |
asset: text.source: text.
Playing (playing)#
Plays when on and pauses when off.
Loop (loop)#
Starts again from the beginning at the end when on.
Rate (rate)#
Playback speed from 0.25 to 4 times; 1 is normal. It is logarithmic.
Seek (seek)#
Position in the media from 0 (start) to 1 (end).
Tips#
- Prefer a declared asset for Toys you share; an open URL needs network access.
- Video needs the browser's WebGPU video engine. The Player and exports do not run video yet and report it unavailable. To see a video output, bind a live Screen in the Frame to it.
See also#
Image, Camera, Screen capture, Video, Control lanes.
Help patches
Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.
1. Play and loop
beginner Teaches: playing, loop, rate, seek
The media player with transport controls on a live Screen.
- Choose the media in your own copy: a declared video asset (data.asset) or an open URL (data.source).
- Rate is logarithmic, so 1 sits in the middle.
Related nodes
- Image A declared image asset as a still video stream, for logos, backgrounds and keys.
- Camera A camera feed as one video stream. The Toy names a logical camera; the host binds it to a device after the person allows it.
- Screen capture A window, tab or whole display as one video stream, chosen by the person each time it starts.