[ 
https://issues.apache.org/jira/browse/CB-8098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16041613#comment-16041613
 ] 

ASF GitHub Bot commented on CB-8098:
------------------------------------

Github user dellagustin commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-media/pull/130#discussion_r119812195
  
    --- Diff: www/Media.js ---
    @@ -173,7 +173,9 @@ Media.prototype.setRate = function(rate) {
         if (cordova.platformId === 'ios'){
    --- End diff --
    
    I think some polishing would be good here:
    
    1. As the current code is, the if/else is not necessary, as both blocks 
execute the exact same instruction
    2. This pull request says it enables the set rate for Android, but the else 
block is now executed for any other platform then iOS, this looks wrong. Am I 
missing something?
    
    It looks to me the result should look like:
    ```javascript
          if (cordova.platformId === 'ios' || cordova.platformId === 'android'){
              exec(null, null, "Media", "setRate", [this.id, rate]);
          } else {
            console.warn('media.setRate method is currently not supported for', 
cordova.platformId, 'platform.');
          }
    ```


> Media plugin change plackback rate
> ----------------------------------
>
>                 Key: CB-8098
>                 URL: https://issues.apache.org/jira/browse/CB-8098
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: cordova-plugin-media
>    Affects Versions: 3.5.0
>            Reporter: Alex
>
> Doesn't Media plugin support chanding playback rate? I dind't find any 
> mention in docs. I think this fis must even flaw HTML5 audio has it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to