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

    https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33482157
  
    --- Diff: src/windows/MediaProxy.js ---
    @@ -203,20 +234,64 @@ module.exports = {
             var id = args[0];
             var thisM = Media.get(id);
     
    -        var normalizedSrc = thisM.src.replace(/\//g, '\\');
    +        var success = function () {
    +            Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_STOPPED);
    +            win();
    +        };
    +
    +        var error = function (reason) {
    +            Media.onStatus(id, Media.MEDIA_ERROR, reason);
    +            lose(reason);
    +        };
    +
    +        var fsTypes = {
    +            PERSISTENT: 'PERSISTENT',
    +            TEMPORARY: 'TEMPORARY'
    +        };
    +        var fsType;
    +
    +        var normalizedSrc = thisM.src;
    +        normalizedSrc = setTemporaryFsByDefault(normalizedSrc);
    +
    +        if (normalizedSrc.indexOf('ms-appdata:///local/') === 0) {
    +            fsType = fsTypes.PERSISTENT;
    +        } else if (normalizedSrc.indexOf('ms-appdata:///temp/') === 0) {
    +            fsType = fsTypes.TEMPORARY;
    +        } else {
    +            lose({ code: MediaError.MEDIA_ERR_NONE_SUPPORTED });
    +            return;
    +        }
    +
    +        // Removing schemes (both variants are supported)
    +        normalizedSrc = normalizedSrc.replace('ms-appdata:///local//', 
'').replace('ms-appdata:///temp//', '')
    --- End diff --
    
    Seems like as per line 192 you don't need these top two variations.  


---
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