[Plugin] Audiostream

Post your work in progress addons and get feedback

Post » Wed Jul 22, 2015 9:04 am

Message: wmsgva can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Just completed my first plugin for Construct 2.

The Audiostream plugin allows you to play online audio streams within the platform.

1. Actions:

Audiostream.StartPlaying (stream URL): Starts playing the specified online audio stream

Audiostream.Stop Playing: Stops the stream currently playing

2. Conditions:

Has stream: Has a stream defined or not

Is playing: Stream is currently playing or not

3. Expressions:

Stream: Returns URL of stream currently defined (String)

4. Known issues:

- The plugin currently works in development mode and when a game is exported to HTML 5. It doesn't however work with games exported via NW.js
(if any specialist plugin creators have an idea why, please let me know)
- Works natively under Chrome, but requires server side definition of aac mime type for other browsers

5. To install:

Download from: www.dropbox.com/s/1vbkkb7ty06zagf/audiostream1-2.zip

Then unzip to \Program Files\Construct 2\exporters\html5\plugins

6. Update history:

Version 1.1 : Improved memory management
Version 1.2 : Prevent plugin crash if Audiostream.Stop is called before any stream has been played
Last edited by wmsgva on Fri Feb 19, 2016 2:26 pm, edited 2 times in total.
B
10
S
3
Posts: 87
Reputation: 957

Post » Wed Jul 22, 2015 12:03 pm

Nice!
I wanted this for a long time.
Thanks for building it.
And i hope u get the NW functionality working.
B
59
S
21
G
14
Posts: 779
Reputation: 13,927

Post » Thu Jul 23, 2015 12:44 pm

this is awesome, thanks for sharing :)
B
78
S
23
G
69
Posts: 1,353
Reputation: 44,005

Post » Thu Jul 23, 2015 6:28 pm

Awesome plugin @wmsgva !.

Can it be possible to retrive the audio stream URL from an XML and then have it played through your plugin. How can this be achieved?

Many thanks for your assistance.
B
107
S
20
G
8
Posts: 155
Reputation: 11,741

Post » Fri Jul 24, 2015 8:06 am

@Animate

Yes, you could store many stream URLs in an XML file and then call the StartPlaying action to play them. For example:

Global Text MyVariable = ""

Ajax.Request yourfile.xml (tag "myfile")

Ajax.On "myfile" completed
XML.Load XML document from string AJAX.LastData

System.Set MyVariable to XML.StringValue("/Gamedata/Streams/Text[@Id='First']/Content/text()"")
Audiostream.StartPlaying(MyVariable)
B
10
S
3
Posts: 87
Reputation: 957

Post » Tue Jul 28, 2015 8:59 am

I was looking for this for long time 😀
Thank you
B
37
S
9
Posts: 63
Reputation: 2,255

Post » Sun Aug 16, 2015 3:29 am

This is kool .... I am using in my client project.
Image
B
53
S
12
G
2
Posts: 259
Reputation: 5,041

Post » Fri Sep 25, 2015 9:48 pm

Have you come across a delay of playback when using on any iOS device (iPAD, iPHONE)?.

It seems that when the audiostream plugin is triggered, it usually takes one to two seconds for the audio to start playing on these devices. Is there a workaround for this issue.?

Thanks for the great plugin @wmsgva.
B
107
S
20
G
8
Posts: 155
Reputation: 11,741

Post » Mon Oct 05, 2015 4:23 pm

@wmsgva. any problems using this plugin on iOS?,

I am getting really bad lag everytime i request a sound (about 1.5 sec delay) when using on a iOS device such as iPhone or iPAD.

Any thoughs?
B
107
S
20
G
8
Posts: 155
Reputation: 11,741

Post » Mon Oct 05, 2015 6:39 pm

@wmsgva not 100% sure how to ask this question... so please bear with me! :)

i am currently loading my streams from a webserver, into a var within construct via xml...and all works great, but my issue is that im in need of knowing when a specific stream has ended, since im using many different vars depending on what im rolling over, i cannot simply use the inverted "is playing" .... plus it seems that unless you tell the stream to stop, it constantly reads as playing even if the sound has finished.

i have tried setting flags to be used as Boolean conditions depending on which vars im loading and playing, but they can still only be changed or reset by activating another stream, thus not giving me the ability to do something like - turn a specific group on when a specific stream is finished streaming.

is there any way to tag a stream for direct monitoring or use multiple streams ???

thanks!
B
9
S
2
G
1
Posts: 17
Reputation: 669

Next

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest