First Draft
First Draft of the Example Files
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Playing Audio</title>
|
||||
</head>
|
||||
<body><br><pre>
|
||||
<audio controls>
|
||||
<source src='audio.m4a' type='audio/aac'>
|
||||
<source src='audio.mp3' type='audio/mp3'>
|
||||
<source src='audio.ogg' type='audio/ogg'>
|
||||
</audio>
|
||||
</body>
|
||||
</html>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Playing Audio with JavaScript</title>
|
||||
<script src='OSC.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
<audio id='myaudio'>
|
||||
<source src='audio.m4a' type='audio/aac'>
|
||||
<source src='audio.mp3' type='audio/mp3'>
|
||||
<source src='audio.ogg' type='audio/ogg'>
|
||||
</audio>
|
||||
|
||||
<button onclick='playaudio()'>Play Audio</button>
|
||||
<button onclick='pauseaudio()'>Pause Audio</button>
|
||||
|
||||
<script>
|
||||
function playaudio()
|
||||
{
|
||||
O('myaudio').play()
|
||||
}
|
||||
function pauseaudio()
|
||||
{
|
||||
O('myaudio').pause()
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>HTML5 Video</title>
|
||||
</head>
|
||||
<body>
|
||||
<video width='560' height='320' controls>
|
||||
<source src='movie.mp4' type='video/mp4'>
|
||||
<source src='movie.webm' type='video/webm'>
|
||||
<source src='movie.ogv' type='video/ogg'>
|
||||
</video>
|
||||
</body>
|
||||
</html>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Playing Video with JavaScript</title>
|
||||
<script src='OSC.js'></script>
|
||||
</head>
|
||||
<body>
|
||||
<video id='myvideo' width='560' height='320'>
|
||||
<source src='movie.mp4' type='video/mp4'>
|
||||
<source src='movie.webm' type='video/webm'>
|
||||
<source src='movie.ogv' type='video/ogg'>
|
||||
</video><br>
|
||||
|
||||
<button onclick='playvideo()'>Play Video</button>
|
||||
<button onclick='pausevideo()'>Pause Video</button>
|
||||
|
||||
<script>
|
||||
function playvideo()
|
||||
{
|
||||
O('myvideo').play()
|
||||
}
|
||||
function pausevideo()
|
||||
{
|
||||
O('myvideo').pause()
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,3 @@
|
||||
function O(i) { return typeof i == 'object' ? i : document.getElementById(i) }
|
||||
function S(i) { return O(i).style }
|
||||
function C(i) { return document.getElementsByClassName(i) }
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user