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
<button> Start </button> | |
<audio controls></audio> | |
<script> | |
var b = document.querySelector("button"); | |
var clicked = false; | |
var chunks = []; | |
var recorder; | |
var type = 'audio/ogg;codecs=opus'; | |
b.addEventListener("click", function(e) { | |
if (!clicked) { |
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
<html> | |
<button> Start </button> | |
<audio controls></audio> | |
<br> | |
<a id="download">download your file</a> | |
<script> | |
var b = document.querySelector("button"); | |
var clicked = false; | |
var chunks = []; | |
var recorder; |
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
import io from 'socket.io-client'; | |
const socket = io(Config.api.hostgcsio); | |
let streamStreaming = false; | |
//=================== recorder lifecycle =============== | |
recorder = new Recorder({ | |
monitorGain: 0, | |
numberOfChannels: 1, | |
bitRate: 44000, | |
encoderSampleRate: 16000, | |
originalSampleRateOverride: 16000, |
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
// Based on Muaz Khan's RecordRTC Repository | |
// | |
// https://github.com/muaz-khan/RecordRTC | |
// | |
// www.MuazKhan.com | |
// To address the ios 11 issue of 'no data' in audio | |
// related to issue of in recording, the 'context/scriptNode' never calling 'onAudioProcess()' | |
// IF YOU ARE ON IOS and are getting what looks like a valid audio blob on the outside , but | |
// that has NO DATA in it then you should look very carefully for a sequence where ALL the | |
// required steps from allocate audioContext thru final disposition of the raw, microphone |
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
//in your main app where is main view | |
loadViews(savedInstanceState); | |
lt = new LooperThread(); | |
lt.start(); | |
class LooperThread extends Thread { | |
public Handler handler0; | |
public void run() { | |
Looper.prepare(); |
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
/*global define*/ | |
define(['marionette', 'vent', 'tpl!../templates/header.html', '../collections/UserList', | |
'../models/User', '../models/Role', 'Parse'], function (Marionette, vent, header, UserList, User, Role, Parse) { | |
"use strict"; | |
return Marionette.ItemView.extend({ | |
template : header, | |
ui : { | |
input : '#new-todo' |
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
/*global define, $*/ | |
define(['marionette', 'vent', 'tpl!./templates/layout.html', './views/Header', './views/Footer', './views/ActiveCount', | |
'./views/RoleListCompositeView', './views/RoleRoleListCompositeView', './views/RoleUserListCompositeView', './views/EmptyRoleListView', './collections/RoleList', './models/Role', 'Parse' | |
], | |
function (Marionette, vent, layoutTemplate, HeaderView, FooterView, ActiveCountView, RoleListCompositeView, RoleRoleListCompositeView, RoleUserListCompositeView, EmptyRoleListView, RoleList, Role, Parse) { | |
"use strict"; | |
return Marionette.Layout.extend({ | |
template: layoutTemplate, |
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
download the static binary for linux-64 from ffmpeg/downloads page and include in heroku project | |
insert following bash script into heroku project | |
push to heroku | |
alter heroku PATH to include the new binaries ( script, ffmpeg ) | |
run the script | |
#!/bin/bash | |
# get 2 input files ( jpg , wav ) and use them in 2pass ffmpeg to create an .mp4 output file | |
shopt -s globstar |
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
ffmpeg on heroku using precompiled,static binary for linux-64 ( vulcan not required, just include ffmpeg exec with project ) | |
download the bin file from http://ffmpeg.org/download.html | |
include it in a 'vendor/bin' folder in your project. | |
heroku config:set PATH=/app/.jdk/bin:/usr/local/bin:/usr/bin:/bin:/app/vendor/bin <-- so you can invoke 'ffmpeg' | |
call ffmpeg from the script below installed with project to heroku | |
#!/bin/bash |
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
ffmpeg on heroku using precompiled,static binary for linux-64 ( vulcan not required, just include ffmpeg exec with project ) | |
download the bin file from http://ffmpeg.org/download.html | |
include it in a 'vendor/bin' folder in your project. | |
heroku config:set PATH=/app/.jdk/bin:/usr/local/bin:/usr/bin:/bin:/app/vendor/bin <-- so you can invoke 'ffmpeg' | |
call ffmpeg from the script below installed with project to heroku | |
#!/bin/bash |