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 0A3CB200C23 for ; Wed, 22 Feb 2017 19:16:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 08FFB160B62; Wed, 22 Feb 2017 18:16: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 253B6160B49 for ; Wed, 22 Feb 2017 19:16:49 +0100 (CET) Received: (qmail 96858 invoked by uid 500); 22 Feb 2017 18:16: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 96847 invoked by uid 99); 22 Feb 2017 18:16:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2017 18:16:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id D6A72C04D9 for ; Wed, 22 Feb 2017 18:16:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 4VALjVMdrvfJ for ; Wed, 22 Feb 2017 18:16:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A08CB5F56B for ; Wed, 22 Feb 2017 18:16: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 51A2FE02F1 for ; Wed, 22 Feb 2017 18:16:44 +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 1013724121 for ; Wed, 22 Feb 2017 18:16:44 +0000 (UTC) Date: Wed, 22 Feb 2017 18:16:44 +0000 (UTC) From: "Kerri Shotts (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: Wed, 22 Feb 2017 18:16:51 -0000 [ https://issues.apache.org/jira/browse/CB-12494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kerri Shotts updated CB-12494: ------------------------------ Description: 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. was: 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: 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) {} ); 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. > 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 > > 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