cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitecolor <>
Subject [GitHub] cordova-plugin-media pull request: Add Media.prototype.setRate met...
Date Tue, 06 Jan 2015 11:21:38 GMT
Github user whitecolor commented on the pull request:
    @purplecabbage Well I think the variant with playbackRate option for ```play``` maybe
ok but lets consider this most of the platforms treats playback rate just like ```volume```
property, that can be changed at any time:
    1) HTML5 audio supports just a property ```playbackRate``` on ```audio``` element, that
you can set anytime while playing.
    2) iOs supports ```setRate``` method on ```AVAudioPlayer``` object (to can be set while
    3) Windows Phone supports ```SpeedRatio``` property on ```MediaElement``` (
    4) The problem with android: phonegap uses ```MediaPlayer``` for playing media files,
but it does not support any rate change methods (an old issue,
there is also ```AudioTrack``` class, that can be used to play media, and probably have some
capabilities of chanding rate (need to be tested) but there is a problem with seeking and
actually it plays only uncompressed audio (that can be taken from ```MediaPlayer``` - so the
workflow with using ```AudioTrack``` is quite complicated). The is also ```SoundPool``` class
that has method ```setRate```, but it has the same problems that ```AudioTrack``` class. But
actually people do implement such capabilities in android (in different audiobooks playing
    So I think it is reasonable to approach to ```payback rate``` just as to ```volume```
property, and as PG has method ```setVolume``` and had proposed ```setRate``` for this. What
do you think?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message