How to make the music work on every browser ?

0 favourites
From the Asset Store
High quality sound effect pack, in the following categories: Garden work, tools
  • Hello,

    I got a problem with my game, the audio seems to only work on Google Chrome, I can't manage to make it work in Firefox.

    My music file is a .wav, I tried to put it in "sound" instead of "music" and the result was that the preview didn't even load.

    And when I try to preview it in construct, the sound doesn't start, and when I close the preview window Construct crash with this log :

    Error report information Type: unhandled rejection Reason: Error: The fetching process for the media resource was aborted by the user agent at the user's request. Construct 3 version: r210.2 URL: https://editor.construct.net/ Date: Thu Sep 17 2020 00:21:11 GMT+0200 (heure d’été d’Europe centrale) Uptime: 320 s Platform information Browser: Firefox Browser version: 80.0 Browser engine: Gecko Browser architecture: 64-bit Context: browser Operating system: Windows Operating system version: 10 Operating system architecture: 64-bit Device type: desktop Device pixel ratio: 1 Logical CPU cores: 4 Approx. device memory: (unavailable) User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0 C3 release: r210.2 (stable) Language setting: en-US WebGL information Version string: WebGL 2.0 Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: no Supports highp precision: yes Vendor: Google Inc. Renderer: ANGLE (NVIDIA GeForce GTX 1060 6GB Direct3D11 vs_5_0 ps_5_0) Major performance caveat: no Maximum texture size: 16384 Point size range: 1 to 1024 Extensions: EXT_color_buffer_float, EXT_float_blend, EXT_texture_compression_bptc, EXT_texture_filter_anisotropic, OES_texture_float_linear, OVR_multiview2, WEBGL_compressed_texture_s3tc, WEBGL_compressed_texture_s3tc_srgb, WEBGL_debug_renderer_info, WEBGL_debug_shaders, WEBGL_lose_context

  • Thank you for your replay, but I already went on this page with no success =)

    I tried to provide a m4a file, while keeping the .wav converted by construct 3 but I still don't have mmusic when I'm on Firefox. (Still working on Chrome)

    EDIT : I tried to make my file play on the kiwi example project and it doesn't play either, I suspect it comes from my files. But I don't understand, it IS a 16bit wav file, I made sure of it in Audacity, and I should add : I tried to play it in construct 2, and it works ...

    I'm feeling lost =/

  • As the linked manual page states, you must use WebM Opus audio (.webm). It's the only format that reliably plays on all platforms. If you use any other formats, audio might not work in certain cases.

    The Import Audio dialog can encode WebM Opus for you, if you import WAV files.

  • The Import Audio dialog can encode WebM Opus for you, if you import WAV files.

    Yup it does, but the resulting file doesn't play on firefox, and when I put it in "sound" instead of "music" the game doesnt load (it stay stuck at 0%)

    (I don't know how to give you my project file =x)

  • construct.net/en/make-games/manuals/construct-3/overview/saving-sharing-projects

    Host your file on an online hosting file that will provide you a public link to it. Post the link in this topic.

    Also, in FireFox in the case when the project does not load, consider checking for errors in your browser and posting the result of the console.

  • Here is a link of my project :

    filehosting.org/file/details/894162/Flock.c3p

    The music is launched in the title event sheet, and in the play too just in case ^^'

  • Consider trying another service that does not require people who have to download your file to go through the hoops of putting their email address in.

    Also, in FireFox in the case when the project does not load, consider checking for errors in your browser and posting the result of the console.

  • I uploaded it as a source code on the game page instead.

    reidunamis.itch.io/flock

    And you're right, I got this in the console :

    [Construct 3] Audio: error starting playback: TypeError: this.m is not a function ie https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/c3runtime.js:657 vb https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:70 oc https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:70 Kf https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:72 <anonymous> https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:63 rf https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:20 _OnMessageFromRuntime https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:20 onmessage https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:11 rd https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:11 q https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:9 <anonymous> https://v6p9d9t4.ssl.hwcdn.net/html/2725767/scripts/main.js:57

  • I checked your file in beta R216.

    You try to launch play right "On start of layout".

    In my console, Firefox indicates this message :

    La lecture automatique n’est autorisée que lorsqu’elle a été approuvée par l’utilisateur, que le site est activé par l’utilisateur, ou que le média est muet.

    Auto playback is only authorised if it has been approved by a user, that the website is activated by the user, or that the media is muted.

    As indicated in the Audio plugin manual article, browsers expect a user input before starting audio.

    Music starts and plays as intended if I move the event from On start of layout to the second event "Touch: on tap gesture".

  • hum this is pretty strange then, because I tried that, the "preview project" still doesn't read the music.

    I uploaded a version with the start of the music on the tap in the title, thinking it might be an editor bug, and I still got this message in firefox' console with no music (tested on 3 differents PC) :

    [Construct 3] Audio: error starting playback: TypeError: this.m is not a function ie https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/c3runtime.js:657 vb https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/main.js:70 oc https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/main.js:70 Kf https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/main.js:72 <anonymous> https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/main.js:63 rf https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/main.js:20 _OnMessageFromRuntime https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/main.js:20 onmessage https://v6p9d9t4.ssl.hwcdn.net/html/2726169/scripts/main.js:11

  • What is the URL to your uploaded project ?

    Are you sure you forced reload, to remove existing data from the browser cache ?

    The URL is your itch.io project right ?

    I've just tested in FireFox, and it works as intended, starting the music once you've touched and the birds start to fly.

    I'm pretty sure your computers are still showing an older version of your file.

  • Ok an update : this message in the console was weird, so I tried to change the minifying from advanced to simple, and now the build works on itch io.

    But the preview in the editor still don't want to play the music (and no error in the console)

    So my problem is half resolved I guess ? haha

  • Greetings! I'm having this same exact issue with my students.

    No audio will play on Chrome (even when C3 installed as app), Firefox or Edge. Not on preview, not when exported. Firefox console shows no errors.

    I took an audio file (town.webm) from the Demonoire template (where audio works) to make sure it wasn't the file. Nothing.

    Tried making the sound play on button push, to make sure it wasn't auto-play related. Still nothing.

    I tried preloading the audio and/or unchecking preload, but that did nothing either.

    Any ideas?

    Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • UPDATE: We figured it out. If you drag an audio file to the sound or music folder, it'll show up correctly and will play on the audio preview (double clicked on the project window), but not in game.

    If you manually import the file by right-clicking -> Import sounds, it works as intended.

    As it is now, there is no way for the user to know the sound file was not successfully imported when dragged.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)