Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4CF1C200C36 for ; Thu, 23 Feb 2017 12:35:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 49F9D160B50; Thu, 23 Feb 2017 11:35:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 967F5160B62 for ; Thu, 23 Feb 2017 12:35:50 +0100 (CET) Received: (qmail 86969 invoked by uid 500); 23 Feb 2017 11:35:49 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 86948 invoked by uid 99); 23 Feb 2017 11:35:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2017 11:35:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id CEDA618DBED for ; Thu, 23 Feb 2017 11:35:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.199 X-Spam-Level: X-Spam-Status: No, score=-1.199 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 9PHUZJ77BBor for ; Thu, 23 Feb 2017 11:35:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 032E05F30C for ; Thu, 23 Feb 2017 11:35:47 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 359BDE00D6 for ; Thu, 23 Feb 2017 11:35:46 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E5E982412B for ; Thu, 23 Feb 2017 11:35:45 +0000 (UTC) Date: Thu, 23 Feb 2017 11:35:45 +0000 (UTC) From: "Javier (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-12494) Not able to reproduce recorded audios if including path such as cordova.file.dataDirectory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 23 Feb 2017 11:35:51 -0000 [ https://issues.apache.org/jira/browse/CB-12494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Javier updated CB-12494: ------------------------ Attachment: index.html > Not able to reproduce recorded audios if including path such as cordova.file.dataDirectory > ------------------------------------------------------------------------------------------ > > Key: CB-12494 > URL: https://issues.apache.org/jira/browse/CB-12494 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Media > Affects Versions: 2.4.1 > Environment: cordova 6.4.0 > cordova-plugin-media 2.4.1 > Android 5.0 > Reporter: Javier > Labels: startRecord > Attachments: index.html, index.js > > > I record and audio file and I want later on to reproduce it. > Depending on the path that I use to record it, it will reproduce the audio fine before closing the App, but no after re-opening it again or in the other way round: it will NOT reproduce the audio, and if I close the App and re-open it again it will work fine. > When it fails it returns an error code 1 (MediaError.MEDIA_ERR_ABORTED). > Snippets of the code: > {code} > function recordAudio(src, ms, successCB) { > var mediaRec = new Media(src, > // success callback > function() { > // DEBUG > console.log('OK recording to: ' + src); > }, > // error callback > function(err) { > alert('ERROR recording spot: ' + err.message); > } > ); > // Record audio > mediaRec.startRecord(); > // Stop recording after 10 seconds > setTimeout(function() { > mediaRec.stopRecord(); > successCB(); > }, ms); > } > var fileName = cordova.file.dataDirectory + spotAudio + '.amr'; > // spot media with the voice previously recorded by the user > var newRadioSpotMedia = new Media(fileName, > // success callback > function () { > // New radio spot exists, and play finished > // resume playing new radio station > console.log('OK playing spot'); > }, > // error callback > function (err) { > // New radio spot DOES NOT exists > // err.message comes empty > console.log('Unable to retrieve spot "' + fileName + > '". Error code: ' + err.code); > }, > // change callback > function (status) {} > ); > {code} > I also tried all the possible combinations, try using "audioName.amr", "cdvfile://localhost/persistent/audioName.amr" but the issue is persistent: I'm able to reproduce the recorded audio file before closing the App or after re-opening it again, but I'm not able to reproduce the sound before and after closing the App. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org