1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
<!-- That is a simple example how to use the cortado applet. Please replace the
URL below by one that matches your setup.
The applet parameters can be changed from javascript by calling the
setParam(key, value) on the applet. After setting the new parameters in
the applet it needs to be restarted with the restart() method for the
changes to take effect.
The following piece of HTML demonstrates switching URLs with an without
sound using javascript. The applet can be controlled with the following
javascript methods:
doPlay(): Start playback
doPause(): Pause playback
doStop(): Stop playback
doSeek(double pos); seek to a new position, must be between 0.0 and 1.0.
-->
<html>
<head>
</head>
<body>
<script language="javascript">
function restart() {
document.applets[0].restart();
}
function loadUrl(uri, audio) {
document.applets[0].setParam("audio", audio);
document.applets[0].setParam("url", uri);
restart();
}
</script>
<applet archive="http://localhost/cortado/cortado.jar" code="com.fluendo.player.Cortado.class" width="320" height="240">
<param name="url" value="http://localhost/~twerner/09_20h_ReadWriteSociety.ogg"/>
<param name="local" value="false"/>
<param name="framerate" value="5.0"/>
<param name="keepaspect" value="true"/>
<param name="video" value="true"/>
<param name="audio" value="true"/>
</applet>
<br/>
<br/>
<button onClick="restart()">
Restart
</button>
<button onClick="loadUrl('http://localhost/~twerner/09_20h_ReadWriteSociety.ogg', 'true')">
With Audio
</button>
<button onClick="loadUrl('http://localhost/~twerner/09_20h_ReadWriteSociety.ogg', 'false')">
Without Audio
</button>
</body>
</html>
|