|
|
@ -2,113 +2,13 @@
|
|
|
|
<head>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
|
|
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
|
|
|
|
|
|
|
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
|
|
|
|
|
|
|
<link href="styles/stylesheet.css" rel="stylesheet" type="text/css">
|
|
|
|
|
|
|
|
<link href="styles/jquery-ui.css" rel="stylesheet" type="text/css">
|
|
|
|
<link href="styles/jquery-ui.css" rel="stylesheet" type="text/css">
|
|
|
|
<script src="js/main.js"></script>
|
|
|
|
<link href="styles/stylesheet.css" rel="stylesheet" type="text/css">
|
|
|
|
</head>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<body>
|
|
|
|
<script type="text/javascript" src="js/jquery.min.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="js/mp3recorder.js"></script>
|
|
|
|
|
|
|
|
<!-- scripts for recorder -->
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var audio_context;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function __log(e, data) {
|
|
|
|
|
|
|
|
log.innerHTML += "\n" + e + " " + (data || '');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// webkit shim
|
|
|
|
|
|
|
|
window.AudioContext = window.AudioContext || window.webkitAudioContext;
|
|
|
|
|
|
|
|
navigator.getUserMedia = ( navigator.getUserMedia ||
|
|
|
|
|
|
|
|
navigator.webkitGetUserMedia ||
|
|
|
|
|
|
|
|
navigator.mozGetUserMedia ||
|
|
|
|
|
|
|
|
navigator.msGetUserMedia);
|
|
|
|
|
|
|
|
window.URL = window.URL || window.webkitURL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var audio_context = new AudioContext;
|
|
|
|
|
|
|
|
__log('Audio context set up.');
|
|
|
|
|
|
|
|
__log('navigator.getUserMedia ' + (navigator.getUserMedia ? 'available.' : 'not present!'));
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
alert('No web audio support in this browser!');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.recorder .start').on('click', function() {
|
|
|
|
|
|
|
|
$this = $(this);
|
|
|
|
|
|
|
|
$recorder = $this.parent();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
navigator.getUserMedia({audio: true}, function(stream) {
|
|
|
|
|
|
|
|
var recorderObject = new MP3Recorder(audio_context, stream, { statusContainer: $recorder.find('.status'), statusMethod: 'replace' });
|
|
|
|
|
|
|
|
$recorder.data('recorderObject', recorderObject);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject.start();
|
|
|
|
|
|
|
|
}, function(e) { });
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.recorder .stop').on('click', function() {
|
|
|
|
|
|
|
|
$this = $(this);
|
|
|
|
|
|
|
|
$recorder = $this.parent();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject = $recorder.data('recorderObject');
|
|
|
|
|
|
|
|
recorderObject.stop();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject.exportMP3(function(base64_data) {
|
|
|
|
|
|
|
|
var url = 'data:audio/mp3;base64,' + base64_data;
|
|
|
|
|
|
|
|
var au = document.createElement('audio');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById("playerContainer").innerHTML = "";
|
|
|
|
|
|
|
|
// console.log(url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var duc = document.getElementById("dataUrlcontainer");
|
|
|
|
|
|
|
|
duc.innerHTML = url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
au.controls = true;
|
|
|
|
|
|
|
|
au.src = url;
|
|
|
|
|
|
|
|
//$recorder.append(au);
|
|
|
|
|
|
|
|
$('#playerContainer').append(au);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject.logStatus('');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
function upload(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataURL = document.getElementById("dataUrlcontainer").innerHTML;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: "POST",
|
|
|
|
|
|
|
|
url: "scripts/uploadMp3.php",
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
base64: dataURL
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).done(function(o) {
|
|
|
|
|
|
|
|
console.log('saved');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- draggable -->
|
|
|
|
<!-- draggable -->
|
|
|
|
<script>
|
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
var a = 3;
|
|
|
|
|
|
|
|
$('.draggable').draggable({
|
|
|
|
|
|
|
|
start: function(event, ui) { $(this).css("z-index", a++); }
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<br><br>
|
|
|
|
<br><br>
|
|
|
|
<h3 id="box-title" style="width: 200px; left: 45%; position: absolute;">
|
|
|
|
<h3 id="box-title" style="width: 200px; left: 45%; position: absolute;">
|
|
|
|
"Mediating Speech"
|
|
|
|
"Mediating Speech"
|
|
|
@ -233,6 +133,102 @@ echo '<audio src='.$num.' controls></audio><br /><br />'; }
|
|
|
|
<!-- <script src="scripts/app.js"></script> -->
|
|
|
|
<!-- <script src="scripts/app.js"></script> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="js/jquery.min.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="js/mp3recorder.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script src="js/draggable.js"></script>
|
|
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
|
|
|
|
|
|
|
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
|
|
|
|
|
|
|
<script src="js/main.js"></script>
|
|
|
|
|
|
|
|
<!-- scripts for recorder -->
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
var audio_context;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function __log(e, data) {
|
|
|
|
|
|
|
|
log.innerHTML += "\n" + e + " " + (data || '');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// webkit shim
|
|
|
|
|
|
|
|
window.AudioContext = window.AudioContext || window.webkitAudioContext;
|
|
|
|
|
|
|
|
navigator.getUserMedia = ( navigator.getUserMedia ||
|
|
|
|
|
|
|
|
navigator.webkitGetUserMedia ||
|
|
|
|
|
|
|
|
navigator.mozGetUserMedia ||
|
|
|
|
|
|
|
|
navigator.msGetUserMedia);
|
|
|
|
|
|
|
|
window.URL = window.URL || window.webkitURL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var audio_context = new AudioContext;
|
|
|
|
|
|
|
|
__log('Audio context set up.');
|
|
|
|
|
|
|
|
__log('navigator.getUserMedia ' + (navigator.getUserMedia ? 'available.' : 'not present!'));
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
alert('No web audio support in this browser!');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.recorder .start').on('click', function() {
|
|
|
|
|
|
|
|
$this = $(this);
|
|
|
|
|
|
|
|
$recorder = $this.parent();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
navigator.getUserMedia({audio: true}, function(stream) {
|
|
|
|
|
|
|
|
var recorderObject = new MP3Recorder(audio_context, stream, { statusContainer: $recorder.find('.status'), statusMethod: 'replace' });
|
|
|
|
|
|
|
|
$recorder.data('recorderObject', recorderObject);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject.start();
|
|
|
|
|
|
|
|
}, function(e) { });
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.recorder .stop').on('click', function() {
|
|
|
|
|
|
|
|
$this = $(this);
|
|
|
|
|
|
|
|
$recorder = $this.parent();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject = $recorder.data('recorderObject');
|
|
|
|
|
|
|
|
recorderObject.stop();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject.exportMP3(function(base64_data) {
|
|
|
|
|
|
|
|
var url = 'data:audio/mp3;base64,' + base64_data;
|
|
|
|
|
|
|
|
var au = document.createElement('audio');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById("playerContainer").innerHTML = "";
|
|
|
|
|
|
|
|
// console.log(url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var duc = document.getElementById("dataUrlcontainer");
|
|
|
|
|
|
|
|
duc.innerHTML = url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
au.controls = true;
|
|
|
|
|
|
|
|
au.src = url;
|
|
|
|
|
|
|
|
//$recorder.append(au);
|
|
|
|
|
|
|
|
$('#playerContainer').append(au);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
recorderObject.logStatus('');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
function upload(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataURL = document.getElementById("dataUrlcontainer").innerHTML;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
|
|
|
type: "POST",
|
|
|
|
|
|
|
|
url: "scripts/uploadMp3.php",
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
|
|
|
base64: dataURL
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).done(function(o) {
|
|
|
|
|
|
|
|
console.log('saved');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
<!-- script for subs and sound -->
|
|
|
|
<!-- script for subs and sound -->
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
var dialogueTimings = [10,24,28,58,115,120,124,134,138,142,152,160],
|
|
|
|
var dialogueTimings = [10,24,28,58,115,120,124,134,138,142,152,160],
|
|
|
@ -260,8 +256,6 @@ echo '<audio src='.$num.' controls></audio><br /><br />'; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
|
|
|
|
</html>
|
|
|
|
</html>
|
|
|
|