Created
March 17, 2018 16:48
-
-
Save mhawksey/a27b46bc3a244ac5cbde221b2af3d798 to your computer and use it in GitHub Desktop.
Code snippets for Recording .mp3 audio in Google Add-ons/Google Apps Script to Google Drive https://mashe.hawksey.info/?p=17916
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blobToDataURL(blob, function(url){ | |
var filename = 'recording_' + | |
(new Date()) + | |
'_.mp3'; | |
google.script.run.withSuccessHandler(function(driveUrl){ | |
$('ol.convertedList') | |
.append('<li><strong> ' + filename + | |
'</strong> <a href="'+driveUrl+'" target="_blank">Drive Link</a><br/>' + | |
'<audio controls src="' + url + '"></audio>' + | |
'</li>'); | |
}).invokeSave(url, filename); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment