Github user whitecolor commented on the pull request:

    https://github.com/apache/cordova-plugin-media/pull/40#issuecomment-68854223
  
    @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 
playing).(https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioPlayerClassReference/index.html)
    
    3) Windows Phone supports ```SpeedRatio``` property on ```MediaElement``` 
(http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.speedratio(v=vs.110).aspx)
    
    4) The problem with android: phonegap uses ```MediaPlayer``` for playing 
media files, but it does not support any rate change methods (an old issue 
https://code.google.com/p/android/issues/detail?id=1961), 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 
applicatons).
    
    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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to