mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-09 09:20:15 +01:00
21 lines
529 B
HTML
21 lines
529 B
HTML
|
<html>
|
||
|
<head>
|
||
|
<title>Sound Service Play Example</title>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<script>
|
||
|
var url = Components.classes["@mozilla.org/network/standard-url;1"].createInstance();
|
||
|
url = url.QueryInterface(Components.interfaces.nsIURL);
|
||
|
url.spec = "resource:/res/samples/test.wav";
|
||
|
|
||
|
var sample = Components.classes["@mozilla.org/sound;1"].createInstance();
|
||
|
sample = sample.QueryInterface(Components.interfaces.nsISound);
|
||
|
</script>
|
||
|
|
||
|
<form name="form">
|
||
|
<input type="button" value="Play Sound" onclick="sample.play(url);">
|
||
|
<form>
|
||
|
</body>
|
||
|
</html>
|