antonchizhikov opened a new issue, #375:
URL: https://github.com/apache/cordova-plugin-media/issues/375

   # Bug Report
   
   ## Problem
   I've created new cordova project and installed cordova-plugin-media the 
latest version 6.1.0. I use API version 33. I build and install apk file on my 
Samsung A53 smartphone. When I start an application and press a button to play 
a sound it throws an error message:
   **Audio Error: 1 Prepare failed.: status=0x1**
   
   ### What is expected to happen?
   
   Sound should be played
   
   ### What does actually happen?
   
   Error callback is called
   
   ## Information
   <!-- Include all relevant information that might help understand and 
reproduce the problem -->
   
   
   
   ### Command or Code
   This is my html code:
   
   <!DOCTYPE html>
   <!--
       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
        KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
   -->
   <html>
   <head>
       <meta charset="utf-8">
       <!--
       Customize this policy to fit your own app's needs. For more guidance, 
please refer to the docs:
           https://cordova.apache.org/docs/en/latest/
       Some notes:
           * https://ssl.gstatic.com is required only on Android and is needed 
for TalkBack to function properly
           * Disables use of inline scripts in order to mitigate risk of XSS 
vulnerabilities. To change this:
               * Enable inline JS: add 'unsafe-inline' to default-src
       -->
       <!--<meta http-equiv="Content-Security-Policy" content="default-src 
'self' data: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 
'unsafe-inline'; media-src *; img-src 'self' data: content:;">-->
       <meta name="format-detection" content="telephone=no">
       <meta name="msapplication-tap-highlight" content="no">
       <meta name="viewport" content="initial-scale=1, width=device-width, 
viewport-fit=cover">
       <meta name="color-scheme" content="light dark">
       <link rel="stylesheet" href="css/index.css">
       <title>Hello World</title>
   </head>
           <body>
               <div class="app">
                   <h1>Apache Cordova</h1>
                   <div id="deviceready" class="blink">
                       <p class="event listening">Connecting to Device</p>
                       <p class="event received">Device is Ready</p>
                       <button onclick="play('v1/a1.mp3')">
                           Play
                       </button>
                   </div>
   
               </div>
               <script src="cordova.js"></script>
               <script src="js/index.js"></script>
               <script type="text/javascript">
                   var basePath = 'cdvfile://localhost/assets/www/assets/';
   
                   function play(fileSubPath) {
                       console.log(fileSubPath);
                       var filePath = basePath + fileSubPath;
                       alert(filePath);
                       var media = new Media(filePath,
                           function () { },
                           function (err) {
                               alert("Audio Error: " + err.code + ' ' + 
err.message);
                           },
                           function (status) {
                               if (status == 4)
                                   media.release();
                           });
                       media.play();
                   }
               </script>
   
           </body>
       </html>
   
   
   ### Environment, Platform, Device
   Android Api v33, Sansung A53
   
   
   ### Version information
   I use cordova: 12.0.0 ([email protected])
   Java\jdk-11
   cordova-plugin-media 6.1.0
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x ] I searched for existing GitHub issues
   - [ x] I updated all Cordova tooling to most recent version
   - [ x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to