Table of Contents

Class OverlayManagerVideo

Namespace
VisioForge.Core.Types.X.VideoEffects
Assembly
VisioForge.Core.dll

Video overlay element that plays video files in the overlay manager.

public class OverlayManagerVideo : IOverlayManagerElement, IDisposable

Inheritance

Implements

Inherited Members

Constructors

OverlayManagerVideo(string, int, int, int, int, bool)

Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.OverlayManagerVideo class.

public OverlayManagerVideo(string source, int x, int y, int width, int height, bool loop = true)

Parameters

source string

The video source file path or URL.

x int

The X position.

y int

The Y position.

width int

The width.

height int

The height.

loop bool

Whether to loop the video.

Properties

AudioOutput

Gets or sets the audio output device for playback. When provided, audio streams from the decoded file will be played through this device. If null, audio will be discarded.

public AudioOutputDeviceInfo AudioOutput { get; set; }

Property Value

AudioOutputDeviceInfo

AudioOutput_Mute

Gets or sets whether the audio output is muted. Only effective when AudioOutput is configured.

public bool AudioOutput_Mute { get; set; }

Property Value

bool

AudioOutput_Volume

Gets or sets the audio output volume (0.0 to 1.0+, where values above 1.0 provide amplification). Only effective when AudioOutput is configured.

public double AudioOutput_Volume { get; set; }

Property Value

double

Cache

Gets or sets the cached image surface for rendering.

public object Cache { get; set; }

Property Value

object

Enabled

Gets or sets whether the overlay is enabled.

public bool Enabled { get; set; }

Property Value

bool

EndTime

Gets or sets the end time for the overlay visibility.

public TimeSpan EndTime { get; set; }

Property Value

TimeSpan

Height

Gets or sets the height of the overlay.

public int Height { get; set; }

Property Value

int

Lock

Gets the lock object for thread synchronization.

public object Lock { get; }

Property Value

object

Loop

Gets or sets whether the video should loop.

public bool Loop { get; set; }

Property Value

bool

Name

Gets or sets the name of the element.

public string Name { get; set; }

Property Value

string

Opacity

Gets or sets the opacity of the overlay (0.0 to 1.0).

public double Opacity { get; set; }

Property Value

double

PlaybackRate

Gets or sets the playback rate (1.0 = normal speed).

public double PlaybackRate { get; set; }

Property Value

double

Rotation

Gets or sets the rotation angle in degrees.

public double Rotation { get; set; }

Property Value

double

Shadow

Gets or sets the shadow settings for the overlay.

public OverlayManagerShadowSettings Shadow { get; set; }

Property Value

OverlayManagerShadowSettings

Source

Gets or sets the source video file path or URL.

public string Source { get; set; }

Property Value

string

StartTime

Gets or sets the start time for the overlay visibility.

public TimeSpan StartTime { get; set; }

Property Value

TimeSpan

StretchMode

Gets or sets the stretch mode for the video.

public OverlayManagerImageStretchMode StretchMode { get; set; }

Property Value

OverlayManagerImageStretchMode

VideoRendererSettings

Gets or sets the video renderer settings. Used when VideoView is provided.

public VideoRendererSettingsX VideoRendererSettings { get; set; }

Property Value

VideoRendererSettingsX

VideoView

Gets or sets the video view for optional video rendering. If provided, the video will be rendered to this view in addition to being available as an overlay.

public IVideoView VideoView { get; set; }

Property Value

IVideoView

Width

Gets or sets the width of the overlay.

public int Width { get; set; }

Property Value

int

X

Gets or sets the X position of the overlay.

public int X { get; set; }

Property Value

int

Y

Gets or sets the Y position of the overlay.

public int Y { get; set; }

Property Value

int

ZIndex

Gets or sets the Z-index for layering.

public int ZIndex { get; set; }

Property Value

int

Methods

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Initialize(bool)

Initializes the video overlay and starts playback.

public bool Initialize(bool autoStart = true)

Parameters

autoStart bool

If true, starts playing immediately. If false, only preloads.

Returns

bool

true if successful; otherwise, false.

Pause()

Pauses video playback.

public void Pause()

Play()

Starts or resumes video playback.

public void Play()

Seek(TimeSpan)

Seeks to a specific position in the video.

public void Seek(TimeSpan position)

Parameters

position TimeSpan

The position to seek to.

Stop()

Stops video playback.

public void Stop()

UpdateSource(string)

Updates the video source.

public void UpdateSource(string source)

Parameters

source string

The new video source.

See Also