How do I download and play music?

0 favourites
  • 6 posts
From the Asset Store
In this template the music plays without looping in your game
  • Does anyone know of a way to download music from a web host, and play it within the program?

    I want to upload some music and have the program download or even stream music that I have hosted online.

    I know I could just add all my files, but I want to save space, and have LOADS of music set aside.

    I wish to make a visualizer, so I don't think I can simply use an embed feature. Also, embed seems to hate autoplay these days.

  • AnD4D

    More than one way to do it. One possible way is to create a MySQL database with links to your music. Write a Node JS script to be accessible via Websocket in your C3 project. That Node JS script can send the link to your game and it can play. This way you can keep on adding more music easily in the back-end without requiring any changes in your game.

  • umarfarooq I'm using Construct 2 :)

    Custom scripts is not something I can do. Also, does your method actually allow a visualizer to make note of it?

    For example, the visualizer that already exists in the Example section will only react to music played from the actual project. If I have YouTube (for example) playing in the background, the visualizer will not react.

  • AnD4D

    Yes. It's possible to do it using Audio (preload by name) while the script downloads the file and renames it to this name before it gets preloaded.

  • Wonderful. Is anyone able to show me how?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Drop me a bit more detail about your project at my email readumarkjx@gmail.com , I'll guide you

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