MP4ERequest access
On the videoBy MP4E Signed by mp4e

Picture in Picture Video

Plays a second video in a small window over the main one, with its own controls.

  • Sends 8 events
  • 10 actions for rules and the host
  • Provides 7 variables
  • Can pause or mute the main video, follow it, or play on its own
  • Optional title bar, start and end time, speed and loop
  • Closes when the clip ends, when the main video plays, or after a set time
  • Plays a file from the video's media library or a web address
Version 1.0.6

It opens in the Studio, where you place it on your video.

Preview

About

Plays a second video in a small window over the main one, with its own controls.

  • With the main video: it can pause or mute the main video, follow it in step, or play on its own.
  • The window: an optional title bar, a start and an end time, speed, loop and volume.
  • When it closes: when the clip ends, when the main video plays, or after a time you set.
  • The clip comes from the video's media library or from a web address.

Rules can drive it (play, pause, seek, setVolume, mute, close, restart and more) and react to it (opened, playing, ended, closed and more).

Settings

What a creator can set in the Studio, and what a host can set in its overrides.

Content

Content
SettingTypeDefaultWhat it does
Video SourcesrcMedia-Video URL (media:// for embedded, or external URL)
TitletitleText-Optional title shown in the title bar
VolumevolumeNumber1Initial volume (0-1)
End TimeendTimeNumber0Stop playback at this time (0 = end of video)
Start TimestartTimeNumber0Start playback from this time (seconds)
Playback RateplaybackRateNumber1Playback speed (1 = normal)

Video

Video
SettingTypeDefaultWhat it does
LooploopOn or offOffRestart when video ends
Start MutedmutedOn or offOffBegin playback muted
AutoplayautoplayOn or offOnStart playing automatically when shown
Show ControlsshowControlsOne of
  • On Hover
  • Always
  • Never
On HoverWhen to show video controls

Styling

Styling
SettingTypeDefaultWhat it does
Video FitobjectFitOne of
  • Cover (fill, may crop)
  • Contain (fit, may letterbox)
  • Stretch to fill
Cover (fill, may crop)How video fills the container
Accent ColoraccentColorColour#3b82f6Progress bar and accent color

Sync

Sync
SettingTypeDefaultWhat it does
Sync Offset (seconds)syncOffsetNumber0Time offset when syncing with main video

Interaction

Interaction
SettingTypeDefaultWhat it does
Click ActionclickActionOne of
  • Play/Pause
  • Close PIP
  • Fullscreen
  • Do Nothing
Play/PauseWhat happens when clicking the video
Pause on HoverpauseOnHoverOn or offOffPause video when mouse hovers over it

Behavior

Behavior
SettingTypeDefaultWhat it does
Close Timeout (seconds)closeTimeoutNumber0Auto-close after this many seconds (0 = disabled)
Playback ModeplaybackModeOne of
  • Pause Main Video
  • Independent
  • Sync with Main
  • Mute Main Video
Pause Main VideoHow the PIP interacts with the main video
Auto-Close TriggerscloseBehaviorsSeveral of
  • onComplete
  • onMainPlay
  • onClickOutside
  • onTimeout
-When should the PIP automatically close

Events and actions

Events you can react to

EventWhen it is sentData
Video Endedplugin:mp4e:pip:endedFired when video reaches the end
  • {{eventData.duration}}
Errorplugin:mp4e:pip:errorFired when the PIP video fails to load or play; carries the browser's error message
  • {{eventData.message}}
PIP Closedplugin:mp4e:pip:closedFired when PIP is closed
  • {{eventData.reason}}
  • {{eventData.currentTime}}
Video Loadedplugin:mp4e:pip:loadedFired when the PIP video can play, and again after it waited for data; carries its duration in seconds
  • {{eventData.duration}}
PIP Openedplugin:mp4e:pip:openedFired when PIP becomes visible
  • {{eventData.src}}
Pausedplugin:mp4e:pip:pausedFired when the PIP video pauses; carries the time in seconds it paused at
  • {{eventData.currentTime}}
Started Playingplugin:mp4e:pip:playingFired when the PIP video starts or resumes playing; carries its current time in seconds
  • {{eventData.currentTime}}
Time Updateplugin:mp4e:pip:timeupdateFired periodically during playback
  • {{eventData.progress}}
  • {{eventData.currentTime}}

Actions a rule or the host can call

ActionWhat it doesIts settings
PlayplayStart or resume playback-
PausepausePause playback-
Toggle Play/PausetogglePlayPause the PIP video if it is playing, play it if it is paused-
SeekseekSeek to a specific time
  • timeNumber
Seek RelativeseekRelativeSeek forward/backward
  • offsetNumber
Set VolumesetVolumeSet the PIP video's volume, from 0 to 1; does not unmute it
  • volumeNumber
MutemuteMute the PIP video-
UnmuteunmuteUnmute the PIP video-
ClosecloseClose the PIP overlay-
RestartrestartRestart from beginning-

Variables it provides

VariableWhat it holdsType and default
Is playing{{mp4e:pip:isPlaying}}Whether video is currently playing. Written by Picture in Picture only.booleanStarts as OffRead only
Is paused{{mp4e:pip:isPaused}}Whether video is paused. Written by Picture in Picture only.booleanStarts as OffRead only
Current time{{mp4e:pip:currentTime}}Current playback time in seconds. Written by Picture in Picture only.numberStarts as 0Read only
Duration{{mp4e:pip:duration}}Total video duration in seconds. Written by Picture in Picture only.numberStarts as 0Read only
Progress{{mp4e:pip:progress}}Playback progress (0-1). Written by Picture in Picture only.numberStarts as 0Read only
Has ended{{mp4e:pip:hasEnded}}Whether video has finished playing. Written by Picture in Picture only.booleanStarts as OffRead only
Is loading{{mp4e:pip:isLoading}}Whether video is buffering. Written by Picture in Picture only.booleanStarts as OffRead only

What it can reach

This plugin asks for nothing: no network, no reading of the video's analysis, no say over what plays.

Versions

  1. v1.0.6November 29, 2026Current
    What changed

    1.0.6: full screen from the picture-in-picture video works: it declares the fullscreen capability (permissions.device). 1.0.5: what it reports (isPlaying, isPaused, currentTime, duration, progress, hasEnded, isLoading) is now its own read-only variables, one set per Picture in Picture, which rules read; currentTime and progress change at most four times a second. The undeclared pip_isPlaying, pip_currentTime and pip_progress are no longer written, and the retired outputs list is gone. 1.0.4: its events and actions are described. 1.0.3: closes at once on a device that plays one video at a time, rather than stop the main video. 1.0.2: stays within the player's oldest browser (no inset shorthand). 1.0.1: the first video plays once its file has loaded, not only from the second click on; no error shows while it loads. First kept as sources.

  2. v1.0.5November 28, 2026
    What changed

    1.0.5: what it reports (isPlaying, isPaused, currentTime, duration, progress, hasEnded, isLoading) is now its own read-only variables, one set per Picture in Picture, which rules read; currentTime and progress change at most four times a second. The undeclared pip_isPlaying, pip_currentTime and pip_progress are no longer written, and the retired outputs list is gone. 1.0.4: its events and actions are described. 1.0.3: closes at once on a device that plays one video at a time, rather than stop the main video. 1.0.2: stays within the player's oldest browser (no inset shorthand). 1.0.1: the first video plays once its file has loaded, not only from the second click on; no error shows while it loads. First kept as sources.

  3. v1.0.4November 27, 2026
    What changed

    1.0.4: its events and actions are described. 1.0.3: closes at once on a device that plays one video at a time, rather than stop the main video. 1.0.2: stays within the player's oldest browser (no inset shorthand). 1.0.1: the first video plays once its file has loaded, not only from the second click on; no error shows while it loads. First kept as sources.

  4. v1.0.3November 4, 2026
    What changed

    1.0.3: closes at once on a device that plays one video at a time, rather than stop the main video. 1.0.2: stays within the player's oldest browser (no inset shorthand). 1.0.1: the first video plays once its file has loaded, not only from the second click on; no error shows while it loads. First kept as sources.

  5. v1.0.0November 4, 2026
    What changed

    Archived before upgrade to v1.0.1 by seed_family.py.

  6. v1.0.1November 4, 2026
    What changed

    1.0.1: the first video plays once its file has loaded, not only from the second click on; no error shows while it loads. First kept as sources.

Picture in Picture Video · MP4E Marketplace