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

Markbook Audio Recording #34

Closed
glowcone opened this issue Jul 27, 2015 · 5 comments
Closed

Markbook Audio Recording #34

glowcone opened this issue Jul 27, 2015 · 5 comments

Comments

@glowcone
Copy link

Hi Ross,

I'm still stuck on this. When I record into a blob, I don't know how to send it along with the rest of the form when the user presses submit. I've tried xhr and form.append (but I might not be using it correctly).
What other methods are there?

Thanks,

Steph

@rossdotparker
Copy link
Member

Steph, don't store the blob in the database, as it will get too big. Try
setting the enctype on the form to allow file uploads. Check the markbook
data page to see how it works. Ross.
On Jul 28, 2015 9:10 AM, "Steph Ng" notifications@github.com wrote:

Hi Ross,

I'm still stuck on this. When I record into a blob, I don't know how to
send it along with the rest of the form when the user presses submit. I've
tried xhr and form.append (but I might not be using it correctly).

What other methods are there?

Thanks,

Steph


Reply to this email directly or view it on GitHub
#34.

@glowcone
Copy link
Author

I see, so I should use a hidden file input and set the value to blob? And then upload it to the uploads folder?

@glowcone
Copy link
Author

glowcone commented Aug 1, 2015

Now I'm stuck on the uploading part. I can pass the blob by using $_POST, but I can't convert it to a wav file. It gives me a file with only 13 bytes. The files for the data page all seem to be using $_FILES.
I'm using file_put_contents($path . "/" . $attachment, $_POST['rec'])).

@rossdotparker
Copy link
Member

Hmmm, what is the form of the blob in the first place? Is there a config
option in the recording library to get a file in a specific file?

WAV would be a terrible file format as well, as the files are huge...HUGE!
MP3 would be better, but there might be licensing issues.

Does this help? Keep digging ; )

On Sat, Aug 1, 2015 at 7:37 PM, Steph Ng notifications@github.com wrote:

Now I'm stuck on the uploading part. I can pass the blob by using $_POST,
but I can't convert it to a wav file. It gives me a file with only 13 bytes.
I'm using file_put_contents($path . "/" . $attachment, $_POST['rec'])).


Reply to this email directly or view it on GitHub
#34 (comment).

Husband, father, son, brother, friend, coder, teacher & coordinator of
ICT.

Blog . http://rossparker.org
Tweets . @rossdotparker https://twitter.com/rossdotparker

Opensource . http://gibbonedu.org

@glowcone
Copy link
Author

glowcone commented Aug 2, 2015

Yep, I set the "mime type" to wav. But I'll have to find some way to
compress the wav to mp3
​, which means (I think) I still have to send the blob from the form to
add_process.​

On Aug 2, 2015 5:58 PM, "Ross Parker" notifications@github.com wrote:

Hmmm, what is the form of the blob in the first place? Is there a config
option in the recording library to get a file in a specific file?

WAV would be a terrible file format as well, as the files are huge...HUGE!
MP3 would be better, but there might be licensing issues.

Does this help? Keep digging ; )

On Sat, Aug 1, 2015 at 7:37 PM, Steph Ng notifications@github.com wrote:

Now I'm stuck on the uploading part. I can pass the blob by using $_POST,
but I can't convert it to a wav file. It gives me a file with only 13
bytes.
I'm using file_put_contents($path . "/" . $attachment, $_POST['rec'])).


Reply to this email directly or view it on GitHub
#34 (comment).

Husband, father, son, brother, friend, coder, teacher & coordinator of
ICT.

Blog . http://rossparker.org
Tweets . @rossdotparker https://twitter.com/rossdotparker

Opensource . http://gibbonedu.org


Reply to this email directly or view it on GitHub
#34 (comment).

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

2 participants