cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dellagustin <...@git.apache.org>
Subject [GitHub] cordova-plugin-media pull request #130: CB-8098 & CB-7810:(android) Added me...
Date Wed, 07 Jun 2017 21:08:49 GMT
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.');
          }
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message