Is there a way to limit the max time of allowed recording? I feel like this was in here at one time. Not seeing it in the code anywhere those past issues seemed to reference it.

Comments

kenianbei’s picture

It still exists in alpha4. I removed it when I revamped the js in alpha5. I think I stuck a note somewhere asking if people wanted the feature still.

If you'd like the feature back it's pretty simple to implement. Just need to add settings to the field widget form and admin settings form, and then tie it into the JS. I may have time to do this in the next few weeks if you need the feature.

btopro’s picture

yeah, I'm going to need to have variable limits at some point. Our students we'd only let do like 20-30s of recording where as faculty we'd allow like 2 minutes. Placing limits can force a certain kind of dialog (in a good way, think twitter).

kenianbei’s picture

I've added the functionality back in dev... I added a setting in both field widget settings and the general media recording settings (affects media browser and file/add/record).

If you need anything more advanced (node-based limits rather than just by field) I'm open to patches...

kenianbei’s picture

Status: Active » Fixed
btopro’s picture

that's awesome and totally unexpected thank you! This will give me a good jumping off point for the thing you mention (node based / etc). I think I might add some kind of per role based setting which should be easy to draw from your current implementation. Thanks again! this is on my agenda for next week

kenianbei’s picture

I needed it anyway, figured I'd just get it done rather than putting it off another week or two.

For role based time limits, it might be easiest to just alter the js in Drupal.settings.mediaRecorder.settings object with some custom js. Otherwise we could add a drupal_alter to the media recorder, or move media recorder into it's own template and have settings part of the theme.

btopro’s picture

Any approach you'd prefer? going to be working on this today, Personally I could see it easiest / most flexible to go the drupal_alter route as this would then open the door for other projects to jump in and modify the time limit based on whatever methodology they want. I'd be game for submitting a patch and very small module to provide that functionality, just let me know what you think would be the best route

kenianbei’s picture

drupal_alter would definitely be the easiest to implement, and most flexible. Something like media_recorder_field_widget_form_process_alter, at the end of the media_recorder_field_widget_form_process() function? Normally I'd say it'd be a best practice to put it in a theme function, but media_recorder is tied into the file field to closely to be able to use theme('media_recorder') anywhere other than the field widget.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.