How to correctly apply Add remote URL to download mp3 from a device or website

0 favourites
  • 2 posts
From the Asset Store
A futuristic device, can be used as radarscreen, optionscreen, infodisplay, research device, ...
  • Good day!

    Can you please tell me if anyone had to use the Add remote URL function in the Audio plugin to download and play music from devices or websites?

    I'm trying to make a game that looks like "osu!", where in the editor I need to load mp3 from the device and put my visual game elements on it.

    I managed to launch from a local device (computer) using File Chooser (it generates an address with a blob), but at every new session of the game, the address changes and it is impossible to reopen the same track using the saved link.

    If you could save a static address of a music track on your device, that would be ideal. But I haven't found a way to do it yet.

    Now I'm trying to load a track from my site, but for some reason it doesn't load, or it doesn't start.

    Already started digging towards .htaccess - I think the site may be blocking access to files. Tried opening from a test domain without .htaccess, but that didn't work either.

    Does anyone have a working example of downloading and launching music from a permalink on a device or from a link on a website?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Please read from the Audio manual article :

    WebM Opus is the only audio format that works across all browsers and platforms. To ensure your audio works everywhere, make sure the URL serves WebM Opus audio. Otherwise whether or not audio playback works will depend on the audio codec support of the current browser/platform.

    Play audio from a URL by adding it first with this action. Specify the URL to be played, the type (aka the MIME type) of the audio to be played, and pick a name to use for this URL. On its own this action does nothing - no request will be made to the given URL. However you can then pass your chosen name to the other actions that work "by name", such as Play (by name) or Preload (by name), it will then play from the URL you associated with that name. If these actions ask for the folder, it is not really used, but chooses whether the audio is fully downloaded and decoded before playback (for Sounds), or streamed (for Music). As with any other audio file, you can use the Preload (by name) action to preload the audio at the given URL, to ensure subsequent playback starts promptly.

    Are you sure the MIME type on your server is properly set ? You are using the proper MIME type in the action ?

    What does the browser console tells you when attempting to download your file ? (ctrl+i in Chrome should display it, before you attempt your download and provide you with further informations as to what might be happening)

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