I just landed bug 878057 which allows the use of any music file as a ringtone (it works on my Unagi, running aurora, but bugs have been reported against it on a Buri using m-c, so it is apparently not ready for prime time.)

It allows the settings app to pick ringtones from the Music app, and allows the user to share songs from the Music app to be used a ringtones. This share activity works because the patch defines a new setringtone app. Currently, the app allows the user to listen to the song and has a "set ringtone" button. I imagine that this app will grow to include the "ringtone cropping" functionality that Peter is asking for here. (As Jonas points out, this can't be done by a 3rd party utility because only certified apps can write to the settings database to set the ringtone.)

WebAudio allows us to extract audio data from any user-specified region of the song, but does not (apparently) define any way to encode that data to a compressed format. I have heard that the Media Recording team is working on a voice recorder app and that the plan is for it to produce ogg files, so we must have some kind of audio encoding functionality coming.

On the other hand, it would also be simple to just store start and end times in the settings database along with the ringtone and use those to define a media fragment url (if that works with blob:// urls). So we may not actually need the audio editing feature: we can just store the entire song and the start time and endtime of the portion to be used as the ringtone.

As for the UX of the audio cropping functionality, I would suggest that we do not try to rely on sliders or fine tuners of any sort. I'd have a normal set of audio playback controls that let the user play the song. And in addition, I'd add a record button with a traditional red circle icon. When the user gets to the point where they want their ringtone to start, they tap the record button. When they get to the point where they want to stop, they tap the button again.

  David

On 10/13/13 8:56 PM, Jonas Sicking wrote:
On Mon, Sep 23, 2013 at 10:21 AM, Peter Dolanjski
<[email protected]> wrote:
Hello all,

We know how important being able to set custom ringtones is to the user. We are 
working on wireframes/requirements to cover the scenarios around downloading 
(or transferring over USB) ringtones that the user can set.

Our user research has also pointed out how common it was for people to edit 
their own song snippets to produce new ringtones.
We may just want to encourage the ecosystem to build such an application, but I 
wanted to get some input here on what would be involved to produce such a 
utility.

The basic functionality would be:
- Utility presents user with audio files currently residing on device (or 
possibly accessed directly from Music app via the selected audio file)
- The user should be able to chose the start time and end time for the ringtone 
(with a possible length limit in place)
- Selection controls need to be precise enough to pick specific starting/ending 
points
- The user should be able to preview the selected portion of the track
- Once satisfied, the user should be able to save the snippet and directly set 
it as their ringtone
- Displaying the waveform is probably optional, but would be nice to be able to 
pinpoint certain parts of the song

How difficult is this? Is there platform functionality missing to enable this?
I think the only platform pieces that are really missing is the
ability to directly set a ringtone. Especially now that we have
WebAudio landed (has it been uploaded to v1.2?) that should make some
of the above even easier I think.

What we might be missing is an mp3 encoding API. Is that part of WebAudio?

Though I suspect you can work around that by simply grabbing chunks
from the existing file, though it might be pretty painful to do so.

You can work around the ability to directly set a ringtone by saving
the edited song using DeviceStorage and then letting the user manually
go over to the settings app and set the ringtone there.

But it would definitely be better if we had a built-in app which
responded to a WebActivity specifically and which allowed directly
setting a ringtone. That both results in a better UX, and means that
the ringtone-editing-app wouldn't need to be a privileged app.

/ Jonas
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to