mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-02 14:29:36 +00:00
158 lines
4.8 KiB
HTML
Executable File
158 lines
4.8 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>API</title>
|
|
<meta charset="utf-8">
|
|
<link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.common.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.min.css" rel="stylesheet">
|
|
<link href="../../styles/kendo.default.mobile.min.css" rel="stylesheet">
|
|
<script src="../../js/jquery.min.js"></script>
|
|
<script src="../../js/jszip.min.js"></script>
|
|
<script src="../../js/kendo.all.min.js"></script>
|
|
<script src="../content/shared/js/console.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<a class="offline-button" href="../index.html">Back</a>
|
|
|
|
<div id="example">
|
|
<div class="configurator">
|
|
<div class="header">Configurator</div>
|
|
<h4 style="display: flex; flex: 0 0 100%; padding: 16px 0 0 16px">API Functions</h4>
|
|
<div class="box-col">
|
|
<ul class="options">
|
|
<li>
|
|
<button id="playButton">Play</button>
|
|
</li>
|
|
<li>
|
|
<button id="stopButton">Stop</button>
|
|
</li>
|
|
<li>
|
|
<button id="pauseButton">Pause</button>
|
|
</li>
|
|
<li>
|
|
<button id="fullScreenButton">Full-screen</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="box-col">
|
|
<ul class="options">
|
|
<li>
|
|
<button id="toggleMuteButton">Toggle mute</button>
|
|
</li>
|
|
<li>
|
|
<button id="isEndedButton">Video has ended</button>
|
|
</li>
|
|
<li>
|
|
<button id="isPausedButton">Video is paused</button>
|
|
</li>
|
|
<li>
|
|
<button id="isPlayingButton">Video is playing</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="box-col">
|
|
<ul class="options">
|
|
<li>
|
|
<input id="volumeValue" value="50" style="float:none; width:90px;" />
|
|
<button id="volumeButton">Set volume</button>
|
|
</li>
|
|
<li>
|
|
<input id="seekValue" value="50" style="float:none; width:90px;" />
|
|
<button id="seekButton">Seek to</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="demo-section k-content wide" style="max-width: 644px;">
|
|
<div id="mediaplayer" style="height:360px"></div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
|
|
$("#mediaplayer").kendoMediaPlayer({
|
|
autoPlay: true,
|
|
navigatable: true,
|
|
media: {
|
|
title: "Build HIPAA-Compliant Healthcare Apps Fast",
|
|
source: "https://www.youtube.com/watch?v=dyvxivS5EcI"
|
|
}
|
|
});
|
|
|
|
var mediaPlayer = $("#mediaplayer").data("kendoMediaPlayer");
|
|
|
|
var setVolume = function () {
|
|
mediaPlayer.volume($("#volumeValue").val());
|
|
};
|
|
|
|
var seekTo = function () {
|
|
mediaPlayer.seek($("#seekValue").data("kendoNumericTextBox").value() * 1000);
|
|
};
|
|
|
|
$("#playButton").click(function () {
|
|
mediaPlayer.play();
|
|
});
|
|
|
|
$("#stopButton").click(function () {
|
|
mediaPlayer.stop();
|
|
});
|
|
|
|
$("#pauseButton").click(function () {
|
|
mediaPlayer.pause();
|
|
});
|
|
|
|
$("#fullScreenButton").click(function () {
|
|
mediaPlayer.fullScreen(true);
|
|
});
|
|
|
|
$("#toggleMuteButton").click(function () {
|
|
mediaPlayer.mute(!mediaPlayer.mute());
|
|
});
|
|
|
|
$("#isEndedButton").click(function () {
|
|
alert(mediaPlayer.isEnded());
|
|
});
|
|
|
|
$("#isPausedButton").click(function () {
|
|
alert(mediaPlayer.isPaused());
|
|
});
|
|
|
|
$("#isPlayingButton").click(function () {
|
|
alert(mediaPlayer.isPlaying());
|
|
});
|
|
|
|
$("#volumeValue").kendoNumericTextBox({
|
|
change: setVolume,
|
|
min: 0,
|
|
max: 100,
|
|
format: "#",
|
|
decimals: 0
|
|
});
|
|
|
|
$("#seekValue").kendoNumericTextBox({
|
|
change: seekTo,
|
|
min: 0,
|
|
max: 97,
|
|
format: "#",
|
|
decimals: 0
|
|
});
|
|
|
|
$("#seekButton").click(seekTo);
|
|
|
|
$("#volumeButton").click(setVolume);
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|