You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.8 KiB
PHP
65 lines
1.8 KiB
PHP
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="styles/stylesheet.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body>
|
|
|
|
<h2>Podcast 1: Mediating speech</h2>
|
|
|
|
|
|
<!-- https://github.com/mdn/web-dictaphone/ -->
|
|
<div class="wrapper">
|
|
<section class="main-controls">
|
|
<canvas class="visualizer" height="60px"></canvas>
|
|
<div id="buttons">
|
|
<button class="record">Record</button>
|
|
<button class="stop">Stop</button>
|
|
</div>
|
|
</section>
|
|
<section class="sound-clips">
|
|
</section>
|
|
</div>
|
|
|
|
<h3 align="center">Episodes</h3>
|
|
|
|
<h3 align="right">Metadata</h3>
|
|
|
|
<?php
|
|
|
|
$files = glob("podcasts/*.*.mp3"); for ($i=1; $i<count($files); $i++) { $num = $files[$i];
|
|
$var1 = $_GET["files"]["name"];
|
|
echo '<div class="tooltip-wrap" align="center"><audio src='.$num.' controls></audio><div class="tooltip-content-down" align="center">anything</div></div>'."<br /><br />"; } ?>
|
|
|
|
<!-- scripts for dictaphone -->
|
|
<script src="scripts/mediaDevices-getUserMedia-polyfill.js"></script>
|
|
|
|
<!-- Below is your custom application script -->
|
|
<script src="scripts/app.js"></script>
|
|
|
|
<script>
|
|
function saveAudio(){
|
|
var req = null;
|
|
var url = "savefile.php";
|
|
var data = document.getElementById("save").href.toString();// document.getElementById("save").innerHTML;// = xhttp.responseText;; // you have to check how to get the data from your saveAudio() method
|
|
window.alert(data);
|
|
|
|
(window.XMLHttpRequest) ? req = new XMLHttpRequest() : (window.ActiveXObject) ? req = new ActiveXObject("Microsoft.XMLHTTP") : req = false;
|
|
req.open("POST", url, true);
|
|
req.setRequestHeader("Content-Type", "multipart/form-data");
|
|
|
|
if(data != null) //&& data != "")
|
|
{
|
|
req.setRequestHeader("Content-length", data.length);
|
|
req.send(data);
|
|
}}
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|