adrianrhodes's Forum Posts

  • 15 posts
  • Hi Ashley

    Thank you for your reply.

    Ok for arguments sake I have created a new project and on the event sheet I've added one script as follows

    System > On start of layout >

    let audio = new Audio("https://streaming.galaxywebsolutions.com/stream/moorland");

    audio.play();

    When you run the project it starts and plays the audio from the script.

    However as it is ran direct from the script I can not tick the play in background on the audio object as the audio object as not been added to the project, therefore all works perfectly apart from the background issue when the app sleeps or loses focus.

    I can not call (or at least I don't know how to call) the stream from the audio object as it is continuous and a live mpeg stream which can not be changed to a different format.

    How would I get my project to steam this URL via the audio object so that I can then check the play in background box, so that the stream continues to play in background mode on both Android & iPhone?

    Many thanks

    Adrian

  • Hi Ashley, surprisingly it does allow me to add the audio to the instance and it then works perfectly all through the project and can be called without any problem.

    I realise this is not the ideal or correct way to do it.

    However the current audio object does not play mpeg audio streams as Is required for a radio station stream.

    Is there any way to get the audio object to stream mpeg audio rather than loading it?

    If there is then I can just click the check box to play audio in the background.

    Otherwise does the play audio in the background check box only work for the specific audio file or for the entire project?

  • I have a line of script code which plays an audio stream

    let audio = new Audio(runtime.globalVars.AudioURL);

    runtime.globalVars.Player = audio;

    runtime.globalVars.Player.play();

    Now understandably this is not idea as it plays the audio without Construct objects being able to access it.

    If this code is ran on a mobile phone there is issues with background audio as the object hasnt been defined and I can therefore not tick the Play in background check box.

    Does anyone know if by adding the audio object, this will allow the entire app to stay alive in the background and all the scripted audio to continue to play?

    I cant reference the audio stream in the audio object as it is an mpeg file stream

    Ashley if you have another way to play an mpeg stream please let me know?

  • Hi Tom

    Thank you for your email today and for sorting this.

    Adrian

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Tom

    I have just emailed you.

    Adrian

  • I've been messaging them since Tuesday night and getting no reply.

  • I notice my profile picture states I have a subscription yet my plan is cancelled and I can not use the software when I was in the middle of doing some work I was being paid by a customer to do.

  • Still no reply on any of the emails including the personal ones.

    Its now been 4 days since my subscription has been cancelled due to issues with your billing system.

    Could someone please at least let me know what is going on?

  • Tom can you please help

  • Ashley

    Can you please get someone to email me. I have sent multiple emails and no one is coming back to me. It has now been over 3 days and counting.

    I paid my subscription yet it has been cancelled.

    All my emails appear to be being ignored.

    Please email me back.

    Adrian Rhodes

    adrianrhodeshsu@yahoo.com

    Tagged:

    I made a payment in advance and the system looks like it keep on trying to take a further payment. It has now cancelled my account even though the full months payment was already paid.

    I have emailed support on both the supportyzh@construct.net and the ordersyzh@construct.net emails but not received a reply and it has now been a couple of days.

    Ashley could you please sort

  • Hi Ashley

    Thank you for your reply.

    It allows me to assigning the object as a global variable and I can reference it from each new event, so my pause resume button works perfectly, but I'm referencing it from the JavaScript to do this not construct.

    i.e.

    runtime.globalVars.Player.play();

    or

    runtime.globalVars.Player.pause();

    I am not adding a global variable in construct for it though, only in the JavaScript.

    If I add the global variable in construct, it stops working.

    Do you know if there is a way to make the audio object play the stream rather than doing any of the above?

    If its beyond it capabilities, is there a tutorial or something where I can look at modifying the plugin? and do I have access to modify the plugin and resave it?

    Thank you for the help.

    Kindest regards

    Adrian

  • Just to add I have made the new audio instance global so that each event can access it to say play and pause for example.

    let audio = new Audio(runtime.globalVars.AudioURL);

    runtime.globalVars.Player = audio;

    runtime.globalVars.Player.play();

    Ashley

  • I have written a radio mobile app which works great and plays the FM stations music which is being broadcast via 'broadcast radio'.

    The stream is basically the same as icecast/shoutcast and I believe is being broadcast as an mpeg.

    I am currently doing the following:

    Global string AudioURL = streaming.broadcast.radio/hitmixhigh

    let audio = new Audio(runtime.globalVars.AudioURL);

    audio.play();

    This works perfect and I can use script to play and pause the stream. However as its a mobile app it naturally loses focus or goes in to sleep mode after timing out or someone locking the phone.

    I can see that the Audio Object as a 'Play in background' option.

    Is there anyway of linking the script to the Audio object to get it play the MPEG audio stream?

    (Note that it is a stream and never downloads as it is constantly suppling more audio so the URL download will never end.)

    Any help would be appreciated.

    Adrian

  • 15 posts