New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the Kendo UI MediaPlayer

Definition

Constructors

C#
public MediaPlayerBuilder(MediaPlayer component)
Parameters:componentMediaPlayer

Methods

If set to true, the component will automatically start playing the video after initializing.

C#
public MediaPlayerBuilder AutoPlay()
Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.AutoPlay()
)

If set to true, the component will automatically start playing the video after initializing.

C#
public MediaPlayerBuilder AutoPlay(bool value)
Parameters:valuebool

The value for AutoPlay

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.AutoPlay(true)
)

If set to true, the component will start repeating the video after it has finished.

C#
public MediaPlayerBuilder AutoRepeat()
Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.AutoRepeat()
)

If set to true, the component will start repeating the video after it has finished.

C#
public MediaPlayerBuilder AutoRepeat(bool value)
Parameters:valuebool

The value for AutoRepeat

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.AutoRepeat(true)
)

Configures the client-side events.

C#
public MediaPlayerBuilder Events(Action<MediaPlayerEventBuilder> configurator)
Parameters:configuratorAction<MediaPlayerEventBuilder>

The client events action.

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("MediaPlayer")
.Events(events =&gt; events
.End("onEnd")
)
)

If set to false the user will be prevented from seeking the video forward

C#
public MediaPlayerBuilder ForwardSeek(bool value)
Parameters:valuebool

The value for ForwardSeek

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.ForwardSeek(true)
)

If set to true the component will enter in full-sreen mode

C#
public MediaPlayerBuilder FullScreen()
Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.FullScreen()
)

If set to true the component will enter in full-sreen mode

C#
public MediaPlayerBuilder FullScreen(bool value)
Parameters:valuebool

The value for FullScreen

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.FullScreen(true)
)

Specifies the object which holds the information about the media that will be played

C#
public MediaPlayerBuilder Media(Action<MediaPlayerMediaBuilder> configurator)
Parameters:configuratorAction<MediaPlayerMediaBuilder>

The configurator for the Media

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Media(m =&gt; m
.Title("ProgressNEXT 2019 Highlights")
.Source("https://youtu.be/2OvvwWShNWo")
)
)

The object which holds the localization strings

C#
public MediaPlayerBuilder Messages(Action<MediaPlayerMessagesBuilder> configurator)
Parameters:configuratorAction<MediaPlayerMessagesBuilder>

The configurator for the messages setting.

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Messages(m=&gt;m.Play("Play button tooltip message."))
)

If set to true the video will be played without sound

C#
public MediaPlayerBuilder Mute()
Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Mute()
)

If set to true the video will be played without sound

C#
public MediaPlayerBuilder Mute(bool value)
Parameters:valuebool

The value for Mute

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Mute(true)
)

If set to true will enable the keyboard navigation for the component

C#
public MediaPlayerBuilder Navigatable()
Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Navigatable()
)

If set to true will enable the keyboard navigation for the component

C#
public MediaPlayerBuilder Navigatable(bool value)
Parameters:valuebool

The value for Navigatable

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Navigatable(true)
)

A value between 0 and 100 that specifies the volume of the video

C#
public MediaPlayerBuilder Volume(double value)
Parameters:valuedouble

The value for Volume

Returns:

MediaPlayerBuilder

Example:
C#
@(Html.Kendo().MediaPlayer()
.Name("mediaPlayer")
.Volume(2.5)
)