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

Open in TuneToys

Media player as the Patch draws it, at default values: inlets on the left, outlets on the right.

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#

PortDirectionSignalLanes
videoOutputVideo1

Parameters#

ParameterLabelRangeDefaultUnitScaleNotes
playingPlaying0 to 11linearPlay or pause the media. Choices: 0 Paused, 1 Playing.
loopLoop0 to 11linearStart again at the end. Choices: 0 Once, 1 Loop.
rateRate0.25 to 41×logPlayback speed.
seekSeek0 to 10linearJump 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.

Patch: A patch with no cables.
  • 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.
Frame preview: Play and loopFrame “Play and loop” with 6 elements: text heading, toggle Loop, toggle Playing, knob Rate, screen Picture, knob Seek.PLAY AND LOOPLoopPlaying1 ×Ratescreen0Seek
Frame preview (static). Controls show their default values.

Open in TuneToys

  • 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.

Edit this page on GitHub

esc

↑ ↓ move↩ open⌘↩ new tabesc close