{"id":13743035,"url":"https://github.com/michalstocki/FlashWavRecorder","last_synced_at":"2025-05-09T00:32:34.538Z","repository":{"id":1267831,"uuid":"1206900","full_name":"michalstocki/FlashWavRecorder","owner":"michalstocki","description":"Simple flash file for recording audio and saving as a WAV","archived":false,"fork":false,"pushed_at":"2016-10-25T15:21:38.000Z","size":3273,"stargazers_count":240,"open_issues_count":34,"forks_count":108,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-11-15T14:35:15.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://michalstocki.github.io/FlashWavRecorder/html/","language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michalstocki.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-29T21:20:03.000Z","updated_at":"2024-11-10T15:10:25.000Z","dependencies_parsed_at":"2022-08-16T12:50:30.258Z","dependency_job_id":null,"html_url":"https://github.com/michalstocki/FlashWavRecorder","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalstocki%2FFlashWavRecorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalstocki%2FFlashWavRecorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalstocki%2FFlashWavRecorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michalstocki%2FFlashWavRecorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michalstocki","download_url":"https://codeload.github.com/michalstocki/FlashWavRecorder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171162,"owners_count":21865275,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:00:39.203Z","updated_at":"2025-05-09T00:32:33.923Z","avatar_url":"https://github.com/michalstocki.png","language":"ActionScript","funding_links":[],"categories":["Multimedia"],"sub_categories":["Sound"],"readme":"Simple Microphone Recorder\n==========================\n\nUse flash to record audio data from a microphone. Converts the audio data to a WAV file. Uploads the WAV file to the server. The WAV file is POSTed as a multpart form-data request. Additional fields can be added to the request, such as authenticity_token, (response) formart, etc... The flash recorder creates serveral external interfaces. This allows the recorder to be controlled through javascript. Only the save button must be clicked inside the flash application, see [Upload and download require user interaction](http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes.html#head3) for more information.\n\n\nDemo\n----\nThere are two pages demonstrating embedding the audio recorder:\n\n - [Basic FlashWavRecorder demo](http://michalstocki.github.io/FlashWavRecorder/html/basic/)\n - [Advanced FlashWavRecorder demo](http://michalstocki.github.io/FlashWavRecorder/html/)\n\nEmbedding the Recorder\n----------------------\n\n    \u003cscript\u003e\n      window.fwr_event_handler = function(eventName) {\n        // handling logic here\n      }\n      var appWidth = 24;\n      var appHeight = 24;\n      var flashvars = {'upload_image': 'images/upload.png'};\n      var params = {};\n      var attributes = {'id': \"recorderApp\", 'name':  \"recorderApp\"};\n      swfobject.embedSWF(\"recorder.swf\", \"flashcontent\", appWidth, appHeight, \"10.1.0\", \"\", flashvars, params, attributes);\n    \u003c/script\u003e\n\nThe `fwr_event_handler` is a javascript function that is called from the flash application. The first argument to the function is always the name of the event as a string. The other arguments may vary depending on the event.\n\n\nFlash vars\n----------\n\n**upload_image**: image used as the save button\n\n**font_color**: font color for the save text, default #0000EE\n\n**font_size**: font size for the save text, default 12\n\n**save_text**: text used for the save link, default Save\n\n**background_color**: background color of the flash app, only used when using a save link\n\n*if upload_image failes recorder will use a save link instead*\n\n\nFlash Events\n------------\n\n**ready**: recorder is ready for use\n\n* width - save button's width\n* height - save button's height\n\n**no_microphone_found**: no microphone was found when trying to record\n\n**microphone_user_request**: user needs to allow the recorder to access the microphone\n\n**microphone_connected**: user allowed access to the microphone\n\n**microphone_not_connected**: user denied access to the microphone, *at this point the recorder CAN NOT be used until the user reloads the page*\n\n**permission_panel_closed**: user closed permission dialog\n\n### Recording ###\n\n**recording**: recording audio data from the microphone\n\n* name - of the recording that was specified when record was called\n\n**recording_stopped**: stopped recording audio data\n\n* name - of the recording that was specified when record was called\n* duration - of the recording as a floating point value in seconds\n\n### Playback ###\n\n**playing**: playing back the recorded audio data\n\n* name - of the recording that was specified when play was called\n\n**playback_started**: useful for synchronizing playback with animation\n\n* name - of the recording that was specified when play was called\n* latency - number of milliseconds before playback starts\n\n**stopped**: stopped playing back the recorded audio data\n\n* name - of the recording that was specified when play was called\n\n**playing_paused**: paused playing the recorded audio\n\n* name - of the recording which was playing\n\n### Uploading recorded audio ###\n\n**save_pressed**: save button was pressed in the recorder, good place to update the form data in the recorder\n\n* name - of the recording\n\n**saving**: upload is in progress\n\n* name - of the recording\n\n**saved**: upload is complete\n\n* name - of the recording\n* response - from the server as a string, can use var data = jQuery.parseJSON(arguments[2]) if response is json\n\n**save_failed**: the recorder failed to upload the audio data\n\n* name - of the recording\n* error - message as a string\n\n**save_progress**: upload progress\n\n* name - of the recording\n* bytes_loaded - number of bytes uploaded\n* bytes_total - number of bytes to upload\n\n### Observing microphone level ###\n\n**observing_level**: started dispatching \"microphone_level\" event\n\n*Is dispatched just after call of `observeLevel`*\n\n**microphone_level**: current Microphone level\n\n* level - value from 0 to 1 provides current volume of sound registered by microphone\n \n**observing_level_stopped**: stopped dispatching \"microphone_level\" event\n\n*Is dispatched just after call of `stopObservingLevel`*\n\n### Obtaining raw microphone samples ###\n\n**observing_samples**: started dispatching \"microphone_samples\" event\n\n*Is dispatched just after call of `observeSamples`*\n\n**microphone_samples**: current buffer of microphone samples\n\n* samples - array of values from -1 to 1\n\n**observing_samples_stopped**: stopped dispatching \"microphone_samples\" event\n\n*Is dispatched just after call of `stopObservingSamples`*\n\nRecorder JS Interface\n---------------------\n\n**record**: tells the recorder to record audio data from the microphone\n\n* name - of the recording, basically a reference to the recording, use this name for playback\n* filename - [optional] if saving the file on the server, this is the name of the file to save the WAV file as\n\n**stopRecording**: tells the recorder to stop recording\n\n**playBack**: tells the recorder to playback the recorded audio\n\n* name - of the recording\n\n**playBackFrom**: tells the recorder to playback from given second in recorded audio\n\n* name - of the recording\n* time - point in recording to start playback (Float of seconds).\n\n**pausePlayBack**: tells the recorder to pause playback of recorded audio\n\n* name - of the recording\n\n**stopPlayBack**: tells the recorder to stop playback\n\n**duration**: returns the duration of the recording\n\n* name - of the recording\n\n**getCurrentTime**: returns current time in recording playback\n\n* name - of the recording\n\n**getBase64**: returns WAV data of recording in form of Base64 string\n\n* name - of the recording\n\n**getBlob**: returns WAV data of recording in form of [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob)\nobject which can be used to send recorded audio to server (via JavaScript) or save on user's local drive\n\n* name - of the recording\n\n*Returns number of seconds as float. For paused recording returns pause position, for stopped recording returns 0.*\n\n**observeLevel**: starts dispatching `microphone_level` events\n\n**stopObservingLevel**: stops dispatching `microphone_level` events\n\n**observeSamples**: starts dispatching `microphone_samples` events\n\n**stopObservingSamples**: stops dispatching `microphone_samples` events\n\n**init**: setup the recorder for saving recordings\n\n* url - upload url\n* field_name - name of the form field for the WAV file\n* form_data - additional form data. Specified as an array of name/value pairs. ex: [{\"name\": 'authenticity_token', \"value\": \"xxxx\"}, {\"name\": \"format\", \"value\": \"json\"}]\n\n**showPermissionWindow**: show the permissions dialog for microphone access. The function also enlarges flash object to be 240x160 (the minimum size of flash application which allows displaying settings dialog).\n\n*The function called with `{permanent: true}` option, displays flash settings dialog with \"Remember\" option, which allow granting permanent microphone access for the site.*\n\n**show**: show the save button\n\n**hide**: hide the save button\n\n**update**: update the form data\n\n* form_data - additional form data, in jQuery you can use $('#upload_form').serializeArray()\n\n**configure**: configure microphone settings\n\n* rate - at which the microphone captures sound, in kHz. default is 22. Currently we only support 44 and 22.\n* gain - the amount by which the microphone should multiply the signal before transmitting it. default is 100\n* silence_level - amount of sound required to activate the microphone and dispatch the activity event. default is 0\n* silence_timeout - number of milliseconds between the time the microphone stops detecting sound and the time the activity event is dispatched. default is 4000\n\n**setUseEchoSuppression**: use echo suppression\n\n* yes_no\n\n**setLoopBack**: routes audio captured by a microphone to the local speakers\n\n* yes_no\n\n**isMicrophoneAccessible**: returns true if microphone is connected and user has allowed use microphone.\n\nGradle Build\n---------------------\nSet environment variable **FLEX_HOME** (compiled with Flex SDK 4.6.0 on windows)\n\nBuild with `gradlew dist`\n\n\nChange Log\n---------------------\n\nReleases history is available on [FlashWavRecorder releases](https://github.com/michalstocki/FlashWavRecorder/releases) page.\n\nSupport \u0026 Sponsors\n---------------------\nCode quality improved by\n\n![IntelliJ IDEA logo](docs/logo_intellij_idea.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalstocki%2FFlashWavRecorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichalstocki%2FFlashWavRecorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalstocki%2FFlashWavRecorder/lists"}