Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B86AA18B12 for ; Mon, 6 Jul 2015 16:02:10 +0000 (UTC) Received: (qmail 75723 invoked by uid 500); 6 Jul 2015 16:02:10 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 75689 invoked by uid 500); 6 Jul 2015 16:02:10 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 75678 invoked by uid 99); 6 Jul 2015 16:02:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jul 2015 16:02:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1585AE01E2; Mon, 6 Jul 2015 16:02:10 +0000 (UTC) From: daserge To: dev@cordova.apache.org Reply-To: dev@cordova.apache.org References: In-Reply-To: Subject: [GitHub] cordova-plugin-media pull request: CB-9238 Media plugin cannot rec... Content-Type: text/plain Message-Id: <20150706160210.1585AE01E2@git1-us-west.apache.org> Date: Mon, 6 Jul 2015 16:02:10 +0000 (UTC) Github user daserge commented on a diff in the pull request: https://github.com/apache/cordova-plugin-media/pull/58#discussion_r33950380 --- Diff: src/windows/MediaProxy.js --- @@ -159,7 +176,21 @@ module.exports = { var id = args[0]; var src = args[1]; - var normalizedSrc = src.replace(/\//g, '\\'); + src = setTemporaryFsByDefault(src); + + var success = function () { + Media.onStatus(id, Media.MEDIA_STATE, Media.MEDIA_RUNNING); + win(); + }; + + var error = function (reason) { + Media.onStatus(id, Media.MEDIA_ERROR, reason); + lose(reason); + }; + + // Fixing paths like: ms-appdata:///temp//recs/memos/media.m4a => ms-appdata:///temp/recs/memos/media.m4a + var normalizedSrc = src.replace(/([^\/])(\/\/)([^\/])/g, '$1/$3'); --- End diff -- uri.absoluteCanonicalUri does not handle double slashes, so I have left some regexps in the path-handling functions. --- 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