Jump to content

Search the Community

Showing results for tags 'sound; android'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi everybody, I'm developing a game using Phaser 2.4.4. In my desktop web browsers (Chrome & Mozilla) the sound works fine but when I test it on Android web browser (Chrome), it doesn't work. //MainActivity.java protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView myWebView = (WebView) this.findViewById(R.id.webView); // Enable JavaScript WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setAllowFileAccess(true); webSettings.setAllowFileAccessFromFileURLs(true); webSettings.setAllowUniversalAccessFromFileURLs(true); webSettings.setAllowContentAccess(true); webSettings.setLoadsImagesAutomatically(true); // Load HTML page myWebView.loadUrl("file:///android_asset/index.html"); } //PreloadGame.js preload: function() { this.load.audio("TapSound", ["Common/sounds/TapButton.mp3","Common/sounds/TapButton.ogg"]); }, // preload update: function() { if (this.cache.isSoundDecoded("TapSound") && !this.m_ready) { this.m_ready = true; this.state.start("Menu"); } }, // update //Menu.js create: function() { this._tapSound = this.add.sound("TapSound"); }, // create onClickButton: function() { this._tapSound.play(); }, I have used .mp3 and .ogg with these bitrates: 64, 128, 192, 320 I've got the next error in the logcat. 04-19 10:41:06.366 24333-24333 I/chromium: [INFO:CONSOLE(11)] "%c %c %c Phaser v2.4.4 | Pixi.js v2.2.9 | Canvas | HTML Audio %c %c %c http://phaser.io %c?%c?%c?", source: file:///android_asset/phaser.min.js (11) 04-19 10:41:08.408 24333-24333 I/chromium: [INFO:async_pixel_transfer_manager_android.cc(60)] Async pixel transfers not supported 04-19 10:55:33.712 24333-24333 V/MediaPlayer-JNI: native_setup 04-19 10:55:33.712 24333-24333 V/MediaPlayer: constructor 04-19 10:55:33.722 24333-24333 V/MediaPlayer: setListener 04-19 10:55:33.722 24333-24345 V/MediaPlayer: message received msg=8, ext1=0, ext2=0 04-19 10:55:33.722 24333-24333 V/MediaPlayer: setVideoSurfaceTexture 04-19 10:55:33.732 24333-24333 V/MediaPlayer: prepareAsync 04-19 10:55:33.732 24333-24345 V/MediaPlayer: unrecognized message: (8, 0, 0) 04-19 10:55:33.732 24333-24345 V/MediaPlayer: callback application 04-19 10:55:33.732 24333-24345 V/MediaPlayer: back from callback 04-19 10:55:33.732 24333-24345 V/MediaPlayer: message received msg=100, ext1=1, ext2=-2147483648 04-19 10:55:33.732 24333-24345 E/MediaPlayer: error (1, -2147483648) 04-19 10:55:33.732 24333-24345 V/MediaPlayer: callback application 04-19 10:55:33.732 24333-24345 V/MediaPlayer: back from callback 04-19 10:55:33.732 24333-24333 E/MediaPlayer: Error (1,-2147483648) How can I solve this error? Thanks
×
×
  • Create New...