facebook

Audio widget not being controlled by a button anymore?

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #351721 Reply

    skull
    Member

    Hello,

    I made an educational app last year that included the controlling of an audio widget from the push of a button. It included the following code:

    function bat3()
    {
    var audioWidgetd3 = AudioPlayerWidget.fromWidget(‘m1-Rasib_-_BAT_word-audio3-container’);
    audioWidgetd3.play();
    }

    The function bat3() was being called by the button in the mob file.

    It doesn’t seem to be working anymore. Any issues with mobione 2.6?

    #351725 Reply

    support-michael
    Keymaster

    @skull
    1) What device/os version are you experiencing this issue on? Is it ios8?

    2) How long is the audio file(s) that are not being played? Are they short such as 1-2 seconds or longer, please provide estimated length in seconds?

    #351726 Reply

    skull
    Member

    1. I checked and it is not working on any of the platforms and OS.

    2. The audio file is more than 2 seconds.

    I think there is generally a problem running javascript code from the simulator at this point since this is all tested code being run again.

    have there been some changes in the Audio library.?

    #351732 Reply

    Hi skull,

    We thought your issue was testing on a device, not the simulator. The audio widget was reimplemented including the api about a year ago in the MobiOne 2.5 update. If you are using the latest audio player widget then it should play. There appear to be some issues with audio on the latest ios8. But your issue appears to be broader. Tell us about how your project uses the audio widget. Here is a ref to some of the api changes: http://www.genuitec.com/mobile/docs/audioWidgetAPI/audioWidgetAPI.html

    #351744 Reply

    skull
    Member

    Thanks for your reply.

    I am trying to make the audio widget play with the push of a button. It is a quiz app, therefore the correct answer and wrong answer sounds will be played when these buttons are pushed.

    I am attaching the simple file where I am testing this but its not wroking out.

    I have put custom code in html_custom which is being called from the mob file.

    #351745 Reply

    skull
    Member

    File attached

    Attachments:
    You must be logged in to view attached files.
    #351837 Reply

    skull
    Member

    Any resolution after looking at the code and mob file?

    Regards,
    Asma

    #351856 Reply

    Hi skull,

    I reviewed the sample project you shared and it was very helpful to found out what the problem is. I took a look at the code and as It looked OK I opened the developer tools > console and it indicated a problem with an extra brace “}” at the end of your _custom.js. I removed it and it worked well.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Audio widget not being controlled by a button anymore?

You must be logged in to post in the forum log in