Playing external audio in Node-Webkit

Discussion and feedback on Construct 2

Post » Wed Aug 27, 2014 2:38 pm

Hi all,

I need help, somebody knows if there are a way to play external (local) audio files in Node-Webkit?

I already do this when export a C2 Webapp at HTML5 format. I only need to upload the audio file to /media folder of C2 in my server and call it by "Play (by name)" command.

I put an audio file at Node/win32 folder and tried to call it by "Play (by name)" command with NodeWebkit.AppFolder&"audiofilename", but it do not work.
B
110
S
12
G
8
Posts: 180
Reputation: 8,878

Post » Wed Aug 27, 2014 2:59 pm

Hey I found this right now and it works!!!

Katala wrote:Not sure why I didn't try this before, but if I just play by name (no matter the folder) like this

NodeWebkit.AppFolder&"/media/Here's Johnny" with out the file extension it WORKS :D

Apparently it needs to be an OGG. At least when I tried to load it by Here's Johnny.wav in the Node-Webkit dev tool it said cannot find
Here's Johnny.wav.ogg


Thanks anyway.
B
110
S
12
G
8
Posts: 180
Reputation: 8,878


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 35 guests