class

MVideoPlayer

UMG's MediaPlayer + Image pairing in one node: binds a .media asset, owns the playback controls Visual Script reaches through MUIStatics, and shows the decoded frame through a hosted MImage so the picture takes the same brush path every other image on the screen does. The decode itself lives behind IMiriGraphicsMediaSource; without a source factory installed the widget builds, holds its settings and paints its backdrop, so a headless build of the screen still reports the node.

Module
MiriGraphics
Header
#include "MiriGraphics/Widgets/MVideoPlayer.h"
Namespace
Miri

Constructors

SignatureNameDescription
MVideoPlayer()MVideoPlayer
~MVideoPlayer() override~MVideoPlayer
MVideoPlayer(const MVideoPlayer&) = deleteMVideoPlayer

Public functions

ReturnsNameDescription
MVideoPlayer&operator=
boolSetSourceOpens the asset through the installed source factory; an empty path closes whatever is open.
const std::string&GetSource
voidAdoptSourceHands the widget a source directly — the host-side seam and the test seam, so a fake clip can stand in for the decoder.
voidPlay
voidPause
voidStop
voidSeek
voidSetLooping
boolIsLooping
voidSetVolume
floatGetVolume
voidSetAutoPlay
boolIsAutoPlay
voidSetKeepAspectLetterbox the frame inside the node instead of stretching it.
boolKeepsAspect
voidSetTint
voidSetBackdropColor
boolHasSource
boolIsPlaying
floatGetTime
floatGetDuration
voidTickAdvances the clip and refreshes the hosted image when the frame target was recreated.
voidTickAll
int32_tLiveCount
MiriVec2ComputeDesiredSize
voidArrangeChildren
int32_tOnPaint
boolCanSkipArrangeThe frame arrives in place; a recreated target swaps the brush and invalidates, so a replay can never show a stale image handle.
boolCanRetainPaint
const char*GetTypeName

Function details

MVideoPlayer

C++
MVideoPlayer()

~MVideoPlayer

C++
~MVideoPlayer() override

MVideoPlayer

C++
MVideoPlayer(const MVideoPlayer&) = delete

operator=

C++
MVideoPlayer& operator=(const MVideoPlayer&) = delete

SetSource

C++
bool SetSource(const std::string& assetPath)

Opens the asset through the installed source factory; an empty path closes whatever is open. AutoPlay starts the clip on success.

GetSource

C++
const std::string& GetSource() const

AdoptSource

C++
void AdoptSource(std::unique_ptr<::Mowo::IMiriGraphicsMediaSource> source, const std::string& assetPath)

Hands the widget a source directly — the host-side seam and the test seam, so a fake clip can stand in for the decoder.

Play

C++
void Play()

Pause

C++
void Pause()

Stop

C++
void Stop()

Seek

C++
void Seek(float seconds)

SetLooping

C++
void SetLooping(bool loop)

IsLooping

C++
bool IsLooping() const

SetVolume

C++
void SetVolume(float volume)

GetVolume

C++
float GetVolume() const

SetAutoPlay

C++
void SetAutoPlay(bool autoPlay)

IsAutoPlay

C++
bool IsAutoPlay() const

SetKeepAspect

C++
void SetKeepAspect(bool keep)

Letterbox the frame inside the node instead of stretching it.

KeepsAspect

C++
bool KeepsAspect() const

SetTint

C++
void SetTint(const MiriColor& tint)

SetBackdropColor

C++
void SetBackdropColor(const MiriColor& color)

HasSource

C++
bool HasSource() const

IsPlaying

C++
bool IsPlaying() const

GetTime

C++
float GetTime() const

GetDuration

C++
float GetDuration() const

Tick

C++
void Tick(float deltaSeconds)

Advances the clip and refreshes the hosted image when the frame target was recreated. The screen stack drives this through TickAll.

TickAll

C++
static void TickAll(float deltaSeconds)

LiveCount

C++
static int32_t LiveCount()

ComputeDesiredSize

C++
MiriVec2 ComputeDesiredSize(float scale) const override

ArrangeChildren

C++
void ArrangeChildren(const CGeometry& geo) override

OnPaint

C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const override

CanSkipArrange

C++
bool CanSkipArrange() const override

The frame arrives in place; a recreated target swaps the brush and invalidates, so a replay can never show a stale image handle.

CanRetainPaint

C++
bool CanRetainPaint() const override

GetTypeName

C++
const char* GetTypeName() const override
Generated from MiriGraphics/Widgets/MVideoPlayer.h via mirigraphics.json · Dec 5, 2026Version 1.1.0