Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mp3 encoding and background workers repo #28

Open
tombh opened this issue Mar 5, 2013 · 14 comments
Open

Mp3 encoding and background workers repo #28

tombh opened this issue Mar 5, 2013 · 14 comments

Comments

@tombh
Copy link

tombh commented Mar 5, 2013

I forgot to mention at the time but our company paid @ovidiuD to write MP3 encoding and background workers into this repo, see here https://github.com/ovidiuD/recorder.js/commits/master

Please feel free to include the code if you wish.

@marconi
Copy link

marconi commented Jan 30, 2014

@tombh I've been trying to use your fork with the mp3 encoding and it still seems to be submitting wav format. Is it right to just copy bin-release/FlashRecorder.swf as recorder.swf or is there anything else I'm missing? Thanks!

@tombh
Copy link
Author

tombh commented Jan 30, 2014

@marconi Are you using audioFormat: Recorder.AUDIO_FORMAT_MP3?

@ovidiuD
Copy link

ovidiuD commented Jan 30, 2014

yes you need to pass that value in encode or upload functions

Ovidiu Diac, Software Engineer

Iasi, Romania, 700733

Mobile: +(40)756.062.600

E-mail: [email protected] mailto:[email protected]

From: Thomas Buckley-Houston [mailto:[email protected]]
Sent: 30 January 2014 20:49
To: jwagener/recorder.js
Cc: Ovidiu Diac
Subject: Re: [recorder.js] Mp3 encoding and background workers repo (#28)

@marconi https://github.com/marconi Are you using audioFormat: Recorder.AUDIO_FORMAT_MP3?


Reply to this email directly or view it on GitHub #28 (comment) . https://github.com/notifications/beacon/1143778__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNjY0MDU2MSwiZGF0YSI6eyJpZCI6Nzk4MjQ0OH19--9a17bdd3620b4f6df740feed6b26936885b3ed9a.gif

@marconi
Copy link

marconi commented Jan 31, 2014

Oh! didn't know that parameter was available. Should be documented I think, thanks!

@marconi
Copy link

marconi commented Jan 31, 2014

But it still uploads wav file, here's my code:

Recorder.initialize({
  swfSrc: "/js/vendors/recorder/FlashRecorder.swf"
});

Recorder.upload({
  method: "POST",
  url: "/recording/",
  audioParam: "audio",
  audioFormat: Recorder.AUDIO_FORMAT_MP3,
  params: {},
  success: function() {}
});

and in request payload from chrome inspector, here's what's being submitted:

...
audio.wav
--tpgnsiulrgoowdjjurstfavupqvlvnhi
Content-Disposition: form-data; name="audio"; filename="audio.wav"
Content-Type: application/octet-stream
...

on my backend I still end up having audio.wav.

@marconi
Copy link

marconi commented Jan 31, 2014

Oh demn, should have looked under test earlier. Its working now, cheers!

@tombh
Copy link
Author

tombh commented Jan 31, 2014

\o/

@marconi
Copy link

marconi commented Jan 31, 2014

Hey guys I can't seem to build this, I'm getting the following error:

recorder.js/flash/Recorder.as(76): col: 43 Error: Access of possibly undefined property CHANNEL_MESSAGE through a reference with static type Class.

    mainToWorker.addEventListener(Event.CHANNEL_MESSAGE, messageFromMain);

Any idea what's causing it?

@tombh
Copy link
Author

tombh commented Jan 31, 2014

that's @ovidiuD's expertise...

@ovidiuD
Copy link

ovidiuD commented Jan 31, 2014

you need to build for flash player >=11.4 with swf-version >=17

Ovidiu Diac, Software Engineer

Iasi, Romania, 700733

Mobile: +(40)756.062.600

E-mail: [email protected] mailto:[email protected]

From: Thomas Buckley-Houston [mailto:[email protected]]
Sent: 31 January 2014 16:51
To: jwagener/recorder.js
Cc: Ovidiu Diac
Subject: Re: [recorder.js] Mp3 encoding and background workers repo (#28)

that's @ovidiuD https://github.com/ovidiuD 's expertise...


Reply to this email directly or view it on GitHub #28 (comment) . https://github.com/notifications/beacon/1143778__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNjcxMjYzMSwiZGF0YSI6eyJpZCI6Nzk4MjQ0OH19--1b0d571ab9ee40daf3e31752393ff50a9ac33976.gif

@marconi
Copy link

marconi commented Jan 31, 2014

@ovidiuD still the same though. :( here's my makefile:

MXMLC = "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0/bin/mxmlc"

build:
    $(MXMLC) -swf-version=17 -library-path=./libs -debug=false -static-link-runtime-shared-libraries=true -optimize=true -o recorder.swf -file-specs flash/FlashRecorder.as

@marconi
Copy link

marconi commented Jan 31, 2014

I merged these changes to have an error callback #32 that's why I'm trying to rebuild it. Unfortunately my AS skills are very rusty. :)

@ovidiuD
Copy link

ovidiuD commented Jan 31, 2014

you should also specify -target-player 11.4

and make sure in your flex sdk you have playerglobal.swc for flash player 11.4 - the path should be sdk_root/frameworks/libs/player/11.4/playerglobal.swc

if you don't have it there, download it from http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html

Ovidiu Diac, Software Engineer

Iasi, Romania, 700733

Mobile: +(40)756.062.600

E-mail: [email protected] mailto:[email protected]

From: Marconi Moreto [mailto:[email protected]]
Sent: 31 January 2014 17:38
To: jwagener/recorder.js
Cc: Ovidiu Diac
Subject: Re: [recorder.js] Mp3 encoding and background workers repo (#28)

@ovidiuD https://github.com/ovidiuD still the same though. :( here's my makefile:

MXMLC = "/Applications/Adobe Flash Builder 4.6/sdks/4.6.0/bin/mxmlc"

build:
$(MXMLC) -swf-version=17 -library-path=./libs -debug=false -static-link-runtime-shared-libraries=true -optimize=true -o recorder.swf -file-specs flash/FlashRecorder.as

clean:
rm recorder.swf


Reply to this email directly or view it on GitHub #28 (comment) . https://github.com/notifications/beacon/1143778__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwNjcxNTQ2MywiZGF0YSI6eyJpZCI6Nzk4MjQ0OH19--75f638fe493fcc6e4f1f104ed5d6424a71bf6b4a.gif

@marconi
Copy link

marconi commented Jan 31, 2014

Thanks again @ovidiuD, finally got it working. 🍺 Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants