cjstewar said about 2 years ago on Record Audio to Active Storage :
This is really cool! Question: Do you have any episodes that cover uploading music files and reading/changing meta data tags?

David Kimura PRO said about 2 years ago on Record Audio to Active Storage :
  I do not currently have one for reading the metadata tags, but I like the idea. I think that changing the metadata could be a bit more difficult, but reading it should be possible.

cjstewar said about 2 years ago on Record Audio to Active Storage :
Even reading would be great! 

dedannie said almost 2 years ago on Record Audio to Active Storage :
What need to be changed if we would like record video instead of audio?

David Kimura PRO said almost 2 years ago on Record Audio to Active Storage :
  You would likely need to make most of your changes in the recorder function and also change the stream function to allow video. This episode may help with getting the camera to show. You would just want to ignore the bits about the streaming server as you wouldn't be transmitting the video feed.

https://www.driftingruby.com/episodes/video-chat-with-webrtc


dedannie said almost 2 years ago on Record Audio to Active Storage :
Yes, I made it work. Thanks a lot!

snRenato PRO said over 1 year ago on Record Audio to Active Storage :
instead of recording could I upload an audio instead ?

David Kimura PRO said over 1 year ago on Record Audio to Active Storage :
  Yes, and you would likely not use any of the Stimulus controller parts since the file is already generated. For audio files (and likewise with images), you should probably have some front end validation with the mime types that you would accept in a comma separated string. For example, in this case, you would accept MP3 (or similar).

<%= form.file_field :media, direct_upload: true, accept: 'audio/mpeg' %>

Jeremy Bray said 6 months ago on Record Audio to Active Storage :
David any plans to update this as it doesnt seem to be working in rails 7 

David Kimura PRO said 6 months ago on Record Audio to Active Storage :
  Jeremy Bray I just set this up again and it seemed to work in a Rails 7 application. The only changes that I had to make from the show notes was

# Terminal
yarn add @rails/activestorage

# application.js
import * as ActiveStorage from "@rails/activestorage"
ActiveStorage.start()

Is there something that you're experiencing different?

Jeremy Bray said 6 months ago on Record Audio to Active Storage :
Thanks David, I got it working. Can I ask if I wanted to submit the form on stop, how would i do that?

Henry Lepa said 2 months ago on Record Audio to Active Storage :
Hi, i'm working with rails 7 and this not works for me, when i click on buttons, nothing happen.

David Kimura PRO said 2 months ago on Record Audio to Active Storage :
Any error messages and/or steps to reproduce the issue?

Henry Lepa said 2 months ago on Record Audio to Active Storage :
Nothing, the two buttons(record and stop) are displayed and when i clicked, noting happens.

Henry Lepa said 2 months ago on Record Audio to Active Storage :
Any help David please, i'm working on a project and i'm sruck on this and i specially get pro membership because i saw this video on youtube and i thought it will be the solution for my problem

David Kimura PRO said 2 months ago on Record Audio to Active Storage :
You don't see any JS errors in the console of your browser? Have you tried console logging to make sure that the buttons are connecting?

Henry Lepa said 2 months ago on Record Audio to Active Storage :
"Failed to register controller: recorder (controllers/recorder_controller) Error: Unable to resolve specifier '@rails/activestorage' imported from http://127.0.0.1:3000/assets/controllers/recorder_controller…7cc8eac423c2cbef0cfa15e6352ab96f09854103d29bf7c580de2281f.js"

That's the error i get in console

David Kimura PRO said 2 months ago on Record Audio to Active Storage :
Are you using import maps or esbuild?

Henry Lepa said 2 months ago on Record Audio to Active Storage :
i'm using import map

David Kimura PRO said 2 months ago on Record Audio to Active Storage :
Import maps is a bit strange in handling stuff. Did you pin @rails/activestorage?

Henry Lepa said 2 months ago on Record Audio to Active Storage :
I have to pin that where? In which file please?

David Kimura PRO said 2 months ago on Record Audio to Active Storage :
You should be able to pin it with something like

bin/importmap pin @rails/activestorage

Henry Lepa said 2 months ago on Record Audio to Active Storage :
Done, but buttons still not work.

David Kimura PRO said 2 months ago on Record Audio to Active Storage :
Any js errors?

Henry Lepa said about 2 months ago on Record Audio to Active Storage :
Nope, juste not working.

Login to Comment