\Kendo\UI\MediaPlayer
A PHP wrapper for Kendo UI MediaPlayer.
Inherits from \Kendo\UI\Widget.
Usage
To use MediaPlayer in a PHP page instantiate a new instance, configure it via the available
configuration methods and output it by echo
-ing the result of the render method.
Using Kendo MediaPlayer
<?php
// Create a new instance of MediaPlayer and specify its id
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
// Configure it
$mediaPlayer->autoPlay(true)
// Output it
echo $mediaPlayer->render();
?>
Methods
autoPlay
If set to true, the widget will start playing the video or videos after initializing.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value boolean
Example
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->autoPlay(true);
?>
autoRepeat
If set to true, the widget will start playing the video or videos after initializing.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value boolean
Example
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->autoRepeat(true);
?>
end
Fires when the media finishes playing.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the end event documentation.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->end('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onEnd(e) {
// handle the end event.
}
</script>
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->end('onEnd');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->end(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
forwardSeek
If set to false, the user will be prevented from seeking the video forward.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value boolean
Example
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->forwardSeek(true);
?>
fullScreen
If set to true, the widget will enter fullscreen mode.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value boolean
Example
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->fullScreen(true);
?>
media
The object which holds the information about the media that will be played by the control.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value \Kendo\UI\MediaPlayerMedia|array
Example - using \Kendo\UI\MediaPlayerMedia
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$media = new \Kendo\UI\MediaPlayerMedia();
$source = 'value';
$media->source($source);
$mediaPlayer->media($media);
?>
Example - using array
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$source = 'value';
$mediaPlayer->media(array('source' => $source));
?>
messages
The object which holds the localization strings.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value \Kendo\UI\MediaPlayerMessages|array
Example - using \Kendo\UI\MediaPlayerMessages
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$messages = new \Kendo\UI\MediaPlayerMessages();
$fullscreen = 'value';
$messages->fullscreen($fullscreen);
$mediaPlayer->messages($messages);
?>
Example - using array
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$fullscreen = 'value';
$mediaPlayer->messages(array('fullscreen' => $fullscreen));
?>
mute
If set to true, the video will be played without sound.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value boolean
Example
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->mute(true);
?>
navigatable
If set to true, the option enables the keyboard navigation for the widget.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value boolean
Example
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->navigatable(true);
?>
pause
Fires when the media is paused.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the pause event documentation.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->pause('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onPause(e) {
// handle the pause event.
}
</script>
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->pause('onPause');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->pause(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
play
Fires when the media begins playing.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the play event documentation.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->play('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onPlay(e) {
// handle the play event.
}
</script>
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->play('onPlay');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->play(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
ready
Fires when loading is over and the widget is ready to start playing the media.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the ready event documentation.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->ready('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onReady(e) {
// handle the ready event.
}
</script>
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->ready('onReady');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->ready(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
timeChange
Fires when the user selects a new play time.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the timeChange event documentation.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->timeChange('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onTimeChange(e) {
// handle the timeChange event.
}
</script>
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->timeChange('onTimeChange');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->timeChange(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
volume
A value between 0 and 100 that specifies the volume of the video.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value float
Example
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->volume(1);
?>
volumeChange
This event is fired upon changing the volume level.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the volumeChange event documentation.
Returns
\Kendo\UI\MediaPlayer
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->volumeChange('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onVolumeChange(e) {
// handle the volumeChange event.
}
</script>
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->volumeChange('onVolumeChange');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$mediaPlayer = new \Kendo\UI\MediaPlayer('MediaPlayer');
$mediaPlayer->volumeChange(new \Kendo\JavaScriptFunction('function(e) { }'));
?>