https://github.com/daaain/JSSoundRecorder
// use this in your recordLive.js from line no.52 handleWAV(blob) function. you will get save button so it will help to save in your server directly.
function handleWAV(blob) {
var tableRef = document.getElementById('recordingslist');
if (currentEditedSoundIndex !== -1) {
$('#recordingslist tr:nth-child(' + (currentEditedSoundIndex + 1) + ')').remove();
}
var url = URL.createObjectURL(blob);
var newRow = tableRef.insertRow(currentEditedSoundIndex);
newRow.className = 'soundBite';
var audioElement = document.createElement('audio');
var downloadAnchor = document.createElement('a');
var downloadAnchor1 = document.createElement('a');
var editButton = document.createElement('button');
audioElement.controls = true;
audioElement.src = url;
downloadAnchor.href = url;
downloadAnchor.download = new Date().toISOString() + '.wav';
downloadAnchor.innerHTML = 'Download';
downloadAnchor.className = 'btn btn-primary';
filename= new Date().toISOString() + '.wav';
downloadAnchor1.download =filename;
downloadAnchor1.id ='button_audio';
downloadAnchor1.setAttribute('onclick','getaudiofile("'+url+'")');
//downloadAnchor1.href = url;
downloadAnchor1.innerHTML = 'Save me';
downloadAnchor1.className = 'btn btn-primary';
editButton.onclick = function(e) {
$('.recorder.container').addClass('hide');
$('.editor.container').removeClass('invisible');
currentEditedSoundIndex = $(e.target).closest('tr').index();
var f = new FileReader();
f.onload = function(e) {
audio_context.decodeAudioData(e.target.result, function(buffer) {
console.warn(buffer);
$('#audioLayerControl')[0].handleAudio(buffer);
}, function(e) {
console.warn(e);
});
};
f.readAsArrayBuffer(blob);
};
editButton.innerHTML = 'Edit';
editButton.className = 'btn btn-primary';
var newCell = newRow.insertCell(-1);
newCell.appendChild(audioElement);
newRow = tableRef.insertRow(currentEditedSoundIndex);
newRow.className = 'soundBite';
newCell = newRow.insertCell(-1);
newCell.appendChild(downloadAnchor);
newRow = tableRef.insertRow(currentEditedSoundIndex);
newRow.className = 'soundBite';
newCell = newRow.insertCell(-1);
newCell.appendChild(downloadAnchor1);
newRow = tableRef.insertRow(currentEditedSoundIndex);
newRow.className = 'soundBite';
newCell = newRow.insertCell(-1);
newCell.appendChild(editButton);
newCell = newRow.insertCell(-1);
var toggler;
for (var i = 0, l = 8; i < l; i++) {
toggler = document.createElement('input');
$(toggler).attr('type', 'checkbox');
//newCell.appendChild(toggler); //check box after edit button
}
}
window.onload = function init() {
try {
// webkit shim
window.AudioContext = window.AudioContext || window.webkitAudioContext || window.mozAudioContext;
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;
window.URL = window.URL || window.webkitURL || window.mozURL;
audio_context = new AudioContext();
console.log('Audio context set up.');
console.log('navigator.getUserMedia ' + (navigator.getUserMedia ? 'available.' : 'not present!'));
} catch (e) {
console.warn('No web audio support in this browser!');
}
navigator.getUserMedia({audio: true}, startUserMedia, function(e) {
console.warn('No live audio input: ' + e);
});
};
function getaudiofile(blob)
{
url=blob;
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'blob';
xhr.onload = function(e) {
if (this.status == 200) {
var myBlob = this.response;
var data = new FormData();
data.append('file', myBlob);
$.ajax({
url : "save_file.php",
type: 'POST',
data: data,
contentType: false,
processData: false,
success: function(data) {
//alert(data);
$('#audio_input_name').val(data);
localStorage.clear();
localStorage["my"]=data;
//if(data=="")
alert("File Save Successfully.");
// $('#audio_name').val(data);
},
error: function() {
alert("Please try again Some thing is wrong.");
}
});
}
};
xhr.send();
}
// create on save_file.php and put this code
<?php
date_default_timezone_set('Asia/Calcutta');
if(isset($_FILES['file']) and !$_FILES['file']['error']){
$date=date('Y-m-d H:i:s');
$fn="newfile";
$newfile = $fn.''.$date.".wav";
$fn = "abc" . ".wav";
move_uploaded_file($_FILES['file']['tmp_name'], 'audiofile/'. $fn);
if(rename('audiofile/'.$fn,'audiofile/'.$newfile)){
//echo sprintf("%s was renamed to %s",$fn,$newfn);
}
echo $newfile;
}
// you will get new audio file.
// when you click on save button wait for few seconds one alert with file name appears means file saved successfully.
// for more details contact me on rajeshkakadiya3292@gmail.com
Viagra Pagamento Contrassegno Amoxicillin Allergy Kamagra Women Oral Jelly Viagra Udito <a href=http://byuvaigranonile.com>viagra</a> Amoxicillin With Milk Amoxicillin Msds Sheets Alimentation Et Baclofen
Cialis Poco Prezzo <a href=http://kamagra-tablet.kamagpills.com>Kamagra Tablet</a> Todo Sobre Kamagra Comprare Viagra Thailandia <a href=http://cytotec.ccrpdc.com/cheap-cytotec-pills.php>Cheap Cytotec Pills</a> Where To Buy Cialis Best Place To Buy Viagara <a href=http://buylevi.com>Buy Levitra Online</a> Achete Viagra Propecia Tipos <a href=http://priligy-venta.priliorder.com>Priligy Venta</a> Cheap Cheap Viagra H Pylori And Keflex <a href=http://viacheap.com>viagra</a> Dosage Of Cephalexin For Puppies Buy Generic Viagra Online Cheap <a href=http://generic-viagra.via100mg.com>Generic Viagra</a> Best National Pharmacy Donde Comprar Levitra <a href=http://cial40mg.com/order-cialis-pills.php>Order Cialis Pills</a> Clomid Hemorragie
http://allocating.one
<a href=http://betonlinereviewx.org/>betonline poker withdrawal review</a>
betonline review gambler ask
<a href=" http://betonlinereviewx.org/ ">betonline casino review</a>
betonline poker review reddit
<a href=http://acheterfinasteridesansordonnance.com/>ou acheter du finasteride</a>
acheter finasteride biogaran
<a href=" http://acheterfinasteridesansordonnance.com/ ">acheter finasteride</a>
finasteride acheter
<a href=http://acheterclomidenlignefrance.com/>clomid acheter</a>
acheter clomid en ligne
<a href=" http://acheterclomidenlignefrance.com/ ">acheter clomid en belgique</a>
acheter clomid en pharmacie
<a href=http://sildenafil100mgprixenpharmacieenfrance.com/>sildenafil tablets 100mg for sale</a>
sildenafil 100mg pas cher
<a href=" http://sildenafil100mgprixenpharmacieenfrance.com/ ">sildenafil soft tablets 100mg</a>
sildenafil 100mg, 24 comprimГ©s
<a href=http://acheterazithromycinesansordonnance.club/>acheter azithromycine sans ordonnance</a>
azithromycine 250 sans ordonnance
<a href=" http://acheterazithromycinesansordonnance.club/ ">azithromycine 250 sans ordonnance</a>
acheter azithromycine
<a href=http://acheterzithromaxsurinternetenfrance.club/>zithromax sans ordonnance en pharmacie</a>
zithromax monodose sans ordonnance
<a href=" http://acheterzithromaxsurinternetenfrance.club/ ">acheter zithromax monodose</a>
zithromax monodose sans ordonnance
<a href=http://sildenafilpfizer50mgprix.com/>prix sildenafil 100mg pfizer</a>
generique sildenafil pfizer
<a href=" http://sildenafilpfizer50mgprix.com/ ">sildenafil pfizer generique prix</a>
sildenafil 100 pfizer
<a href=http://tadalafil20mgpaschereninde.com/>prix tadalafil 20mg</a>
generique tadalafil 20mg prix
<a href=" http://tadalafil20mgpaschereninde.com/ ">generic cialis tadalafil 20mg reviews</a>
tadalafil 20mg france
<a href=http://acheterpropeciasansordonnance.com/>acheter propecia en ligne</a>
propecia avis
<a href=" http://acheterpropeciasansordonnance.com/ ">side effects propecia</a>
propecia avant aprГÐs
<a href=http://acheteramoxicilline500enligne.com/>amoxicilline biogaran 500 mg</a>
amoxicilline mylan 500 mg
<a href=" http://acheteramoxicilline500enligne.com/ ">effet secondaire amoxicilline 500</a>
amoxicilline 500 mg gГ©lules
<a href=http://acheteramoxicillinesansordonnance.com/>amoxicilline sans ordonnance prix</a>
amoxicilline sans ordonnance pharmacie
<a href=" http://acheteramoxicillinesansordonnance.com/ ">amoxicilline sans ordonnance</a>
amoxicilline 1g sans ordonnance
<a href=http://vardenafilprixenpharmacieacaen.com/>acheter vardenafil france</a>
vardenafil prix en pharmacie
<a href=" http://vardenafilprixenpharmacieacaen.com/ ">prix du vardenafil</a>
acheter vardenafil
<a href=http://acheteramoxicillinepascherenfrance.com/>ou acheter amoxicilline</a>
acheter amoxicilline mylan
<a href=" http://acheteramoxicillinepascherenfrance.com/ ">acheter amoxicilline acide clavulanique</a>
acheter amoxicilline felin
<a href=http://viagrahap30.org/>female viagra for sale</a>
what happens if a female takes viagra
<a href=" http://viagrahap30.org/ ">female viagra addyi</a>
female viagra video
<a href=http://parlittga30.org/>buy cialis online reviews</a>
where to buy cialis online forum
<a href=" http://parlittga30.org/ ">buy cialis online without prescription</a>
buy cialis in canada
<a href=http://viagraning30.org/>pfizer viagra coupon</a>
pfizer viagra coupon
<a href=" http://viagraning30.org/ ">viagra coupon online</a>
free viagra coupon
<a href=http://feheckevent30.org/>viagra vs cialis reviews</a>
cialis 20 mg vs viagra 100mg
<a href=" http://feheckevent30.org/ ">viagra vs. cialis</a>
cialis vs viagra cost
<a href=http://fortperhat30.org/>cialis 20mg price</a>
price of cialis at walmart
<a href=" http://fortperhat30.org/ ">best price on cialis 20mg</a>
cialis price per pill walmart
<a href=http://viagrathen30.org/>chinese viagra herbal</a>
herbal viagra alternatives
<a href=" http://viagrathen30.org/ ">herbal viagra substitute</a>
safe herbal viagra
<a href=http://viagraund30.org/>how to make natural viagra pdf</a>
natural cialis viagra
<a href=" http://viagraund30.org/ ">viagra natural alternatives</a>
natural viagra over the counter
<a href=http://thenronkin30.org/>cheap cialis pills for sale</a>
cialis 20 mg for sale
<a href=" http://thenronkin30.org/ ">cialis for sale usa</a>
cialis 5mgs for sale
<a href=http://dintrolha.org/>buy prednisone online</a>
buy prednisone online overnight
<a href=" http://dintrolha.org/ ">prednisone buy</a>
buy liquid prednisone for cats
<a href=http://tertsepa.org/>how much will generic viagra cost</a>
generic viagra
<a href=" http://tertsepa.org/ ">how much will generic viagra cost</a>
buy generic viagra
<a href=http://prednisoloneprice01.org/>prednisone 10 mg price</a>
price of prednisone
<a href=" http://prednisoloneprice01.org/ ">prednisone 20 mg price walmart</a>
prednisone 10mg tablet price
Zithromax Without Prescription De Amoxil Amoxil Po De Suite Kamagra Pas Cher Pharmacie <a href=http://costofcial.com>buy cialis</a> Pilule Viagra Acheter Propecia Farmacias Similares
h http://tadalafilph24.com cialis viagra online <a href= http://tadalafilph24.com >cialis</a> become
Earn on the Internet from $ 5000 per day, do not strain, the details are here: http://pagebin.com/glv4FHBf
make money from home no scams, 888 онлайн казино, 0 credit card transfer australia, paypal money generator for android phone, paypal transfer time from bank, bet royal online casino, how to make money currency trading, best 0 percent credit card transfer
, paypal online money adder no survey, ways to make extra money in utah, how to make money on online casinos, proven legitimate ways to make money online, www soccer transfer rumours, how to make a lot of money easily, malaysia no 1 online casino, fast ways to make money now, make money from online surveys legit, best ways to earn money from home in australia, make money online under 18
, online casino malaysia no deposit bonus, play real casino games online for real money, jackpot city casino login, how to make your music sound more professional, online casino no deposit bonus codes 2014, easiest way to make extra money on the side, make money online in india for students, online casino slots strategy
Achat Viagra Quel Site Levitra Dove Agisce Mixing Amoxicillin With Penicillin <a href=http://cialiviag.com>cialis</a> Provera Medicine In Us Cash Delivery Td Bank Difference Between Amoxicillin Penicillin
kamagra bezorgen rotterdam
<a href="http://kamagradxt.com/">kamagra jelly india</a>
erfahrungsbericht kamagra oral jelly wirkung
<a href="http://kamagradxt.com/">kamagradxt.com</a>
kamagra 100mg
Amoxicillin Side Effect Baby Hyper <a href=http://cialiviag.com>cialis prices</a> Cialis Online Rezeptfrei Aus Kanada
Levitra Antinfiammatorio When Does Amoxicillin Suspension Go Bad Can Priligy Be Taken With Cialis <a href=http://buyciali.com>canadian pharmacy cialis</a> Buy Amoxcillin Overseas
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http:/// - .ankor <a href="http:///">.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http:/// - .ankor <a href="http:///">.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
http://doxycycline-cheapbuy.site/ - doxycycline-cheapbuy.site.ankor <a href="http://onlinebuycytotec.site/">onlinebuycytotec.site.ankor</a>
Cialis Bestellung Propecia Rash <a href=http://cialiviag.com>cialis</a> Where To Get Levitra Acticin Quick Shipping Cialis Pour Femme En Pharmacie
Clobetasol Medication Discount Shop With Free Shipping Canadian Parmacy Posologia Viagra Generico <a href=http://tadalaf.com>buy cialis</a> Prescription For Diflucan Viagra Con Cerveza Achat Kamagra Orleans
Viagra Store In Usa Cialis Originale Miglior Prezzo <a href=http://cialibuy.com>tadalafil cialis from india</a> Priligy Precio En Colombia Acheter Xenical Suisse Canine Uti Cephalexin
these sits the bodyРІs throw-away <a href="http://btadalafil.com/#">generic tadalafil 20mg</a> Chic Genealogy Applesauce (ANDA) object of adjuvant burglars ( Seed 1 ) http://btadalafil.com/
Type your Comment below and click to send comment