Blazorise Video API

Explore the Blazorise Video API reference for media sources, playback events, methods, and streaming options.

For examples and usage guidance, see the Video documentation.

API

Parameters

ParameterDefaultType
AutomaticallyHideControlsfalsebool

Determines whether the controls hide automatically when the player becomes idle.
AutoPausetruebool

Determines whether starting this player pauses any other active player.
AutoPlayfalsebool

Determines whether playback starts automatically.
AvailableQualitiesnullint[]

Specifies the list of available quality options. Defaults to [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240].
ChildContentnullRenderFragment

Specifies the content to be rendered inside this Video.
ClickToPlaytruebool

Click (or tap) of the video container will toggle play/pause.
Controlstruebool

Determines whether player controls are visible.
ControlsDelay2000double

Specifies how long the controls remain visible after the last user interaction, in milliseconds.
ControlsListnew string[] { VideoControlsType.PlayLarge, VideoControlsType.Play, VideoControlsType.Progress, VideoControlsType.CurrentTime, VideoControlsType.Mute, VideoControlsType.Volume, VideoControlsType.Captions, VideoControlsType.Settings, VideoControlsType.Pip, VideoControlsType.Airplay, VideoControlsType.Fullscreen }string[]

Specifies the customized list of player controls in the order in which they are rendered.
CurrentTime0double

Specifies the current playback time, in seconds.
DefaultQualitynullint?

Specifies the default playback quality.
DisableContextMenutruebool

Disable right click menu on video to help as very primitive obfuscation to prevent downloads of content.
DoubleClickToFullscreentruebool

If defined the player will go fullscreen when the video is double-clicked.
InvertTimetruebool

Display the current time as a countdown rather than an incremental counter.
Mutedfalsebool

Determines whether playback starts muted.
PosterSource.Posterstring

Specifies the poster image shown before playback begins.
ProtectionDatanullobject

Specifies the manual structure of the protection data. If defined, it will override the usage of ProtectionServerUrl and ProtectionHttpRequestHeaders.
ProtectionHttpRequestHeaders—string

Specifies the protection token for the http header that is sent to the server.
ProtectionServerCertificateUrl—string

Specifies the server certificate url of the DRM protection (currently used only with FairPlay).
ProtectionServerUrl—string

Specifies the server url of the DRM protection.
ProtectionTypeVideoProtectionType.NoneVideoProtectionType

Specifies the encoding type used for the DRM protection.
Possible values:NonePlayReadyWidevineFairPlay
Ratio—string

Force an aspect ratio for all videos. The format is 'w:h' - e.g. '16:9' or '4:3'. If this is not specified then the native resolution of the media is used.
ResetOnEndfalsebool

Reset the playback to the start once playback is complete.
SeekTime10int

Specifies how many seconds to skip when seeking forward or backward.
SettingsListnew VideoSettingsType[] { VideoSettingsType.Captions, VideoSettingsType.Quality, VideoSettingsType.Speed, VideoSettingsType.Loop }VideoSettingsType[]

If the default controls are used, you can specify which settings to show in the menu.
SourcenullVideoSource

Specifies the media source used by the player.
StreamingLibraryNoneStreamingLibrary

Specifies the streaming library used for playback.
Possible values:NoneDashHls
Thumbnails—string

Specifies the thumbnail track used for timeline previews and chapter navigation.
Volume1double

A number, between 0 and 1, representing the initial volume of the player.

Events

EventType
CaptionsDisabledFunc<Task>

Sent when captions are disabled.
CaptionsEnabledFunc<Task>

Sent when captions are enabled.
ControlsHiddenFunc<Task>

Sent when the controls are hidden.
ControlsShownFunc<Task>

Sent when the controls are shown.
EndedFunc<Task>

Sent when playback completes. Note: This does not fire if autoplay is true.
FullScreenEnteredFunc<Task>

Sent when the player enters fullscreen mode (either the proper fullscreen or full-window fallback for older browsers).
FullScreenExitedFunc<Task>

Sent when the player exits fullscreen mode.
LanguageChangeFunc<string, Task>

Sent when the caption language is changed.
PausedFunc<Task>

Sent when playback is paused.
PlayedFunc<Task>

Sent when playback of the media starts after having been paused; that is, when playback is resumed after a prior pause event.
PlayingFunc<Task>

Sent when the media begins to play (either for the first time, after having been paused, or after ending and then restarting).
ProgressFunc<double, Task>

Sent periodically to inform interested parties of progress downloading the media. Information about the current amount of the media that has been downloaded is available in the media element's buffered attribute.
QualityChangedFunc<int?, Task>

The quality of playback has changed.

If the quality argument is null it is considered that a default quality value was selected.

RateChangeFunc<double, Task>

Sent when the playback speed changes.
ReadyFunc<Task>

Triggered when the instance is ready for API calls.
SeekedFunc<double, Task>

Sent when a seek operation completes.
SeekingFunc<double, Task>

Sent when a seek operation begins.
TimeUpdateFunc<double, Task>

The time indicated by the element's currentTime attribute has changed.
VolumeChangeFunc<double, bool, Task>

Sent when the audio volume changes (both when the volume is set and when the muted state is changed).

Methods

MethodReturnParameters
AddTextTrackTaskVideoTrack track

Adds a new text track to the list of tracks.
AirplayTask—

Trigger the airplay dialog on supported devices.
ClearTextTracksTask—

Clear all the text tracks.
DecreaseVolumeTaskdouble step

Decrease volume by the specified step. If no parameter is passed, the default step will be used.
EnterFullscreenTask—

Enter fullscreen. If fullscreen is not supported, a fallback "full window/viewport" is used instead.
ExitFullscreenTask—

Exit fullscreen.
ForwardTaskdouble seekTime

Fast forward by the specified seek time. If no parameter is passed, the default seek time will be used.
HideTextTrackTaskint textTrackId

Hide the track from the list of tracks.
IncreaseVolumeTaskdouble step

Increase volume by the specified step. If no parameter is passed, the default step will be used.
PauseTask—

Pause playback.
PlayTask—

Start playback.
RestartTask—

Restart playback.
RewindTaskdouble seekTime

Rewind playback by the specified seek time.
SetPlaybackRateTaskdouble playbackRate

Dispatch an event to change the media playback rate.
ShowTextTrackTaskint textTrackId

Show the track from the list of tracks.
StopTask—

Stop playback and reset to start.
ToggleCaptionsTask—

Toggle captions display.
ToggleControlsTask—

Toggle the controls (video only). Takes optional truthy value to force it on/off.
ToggleFullscreenTask—

Toggle fullscreen.
TogglePlayTask—

Toggle playback, if no parameters are passed, it will toggle based on current status.
UpdateSourceTaskVideoSource source, VideoProtectionType protectionType, object protectionData, string protectionServerUrl, string protectionHttpRequestHeaders, string protectionServerCertificateUrl

Updates the media source.
On this page