facebook

Jplayer code not working in the code

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

    skull
    Member

    Im making a quiz game that will need to output a small sound whenever an answer is wrong. I added an audio widget and linked it to an audio file. If i try to control the audio widget with one of the buttons it does not work.

    I have put the following code in the button taht will have the wrong answer but it doesnt play any sound:

    $(“m1-testingaudiojplayer-audio1-player”).jPlayer(“play”);

    If i click on the audio widget it works of course.

    #341067 Reply

    Hi,

    Are you using Mobione 2.3.2? We found a bug that prevents the use of jPlayer api. A fix is available in the recent MobiOne 2.5 milestone-1 release. Please see this link to learn more http://www.genuitec.com/support-genuitec/viewtopic.php?f=2&t=5826

    #341073 Reply

    skull
    Member

    Thanks. I downloaded it and installed thinkign that it will work but its still not working..

    function PlayAudio()
    {
    phoneui.activeAudioPlayer(“m1-JPlayer-audio1-player”).jPlayer(“play”);
    }

    PlayAudio() is being called by a custom button.

    The audio widget gets clicked but no sound comes off it. Why is this happening?

    This milestone is expiring in coming september. Can we expect anything reliable solution before this september?

    Is there any other way to include sound on a button click?

    #341085 Reply

    Hi skull, I think you have missed a # char:

    @skull wrote:

    function PlayAudio()
    {
    phoneui.activeAudioPlayer(“#m1-JPlayer-audio1-player”).jPlayer(“play”);
    }

    Let me know how it goes.

    #341092 Reply

    skull
    Member

    I have added the ‘#’ char but it is still not working. The button gets pressed but no sound comes off it … then the play button also gets disabled.
    This is the behaviour if i publish it as a web application and run it on the browser.

    I am sending the file to u.

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

    Hi skull,

    Apologies, when I realized that you didn’t use the number sign I didn’t take a look at the rest of your code. Note that the nodeID sufix is now -container, that’s why it didn’t work even though you added the number sign in your code. Please try with this:

    function PlayAudio()
    {
    phoneui.activeAudioPlayer("#m1-JPlayer-audio1-container").jPlayer("play");
    }
    #341157 Reply

    skull
    Member

    THNKSSS!!!

    Perfect resolution..its working perfectly.

    It says that the milestone version will expire after 30th september. it wont work after that?

    #341159 Reply

    skull
    Member

    …annndddd it shud work on android as well as iphone rite?

    #341165 Reply

    Hi skull,

    >…annndddd it shud work on android as well as iphone rite?
    You’re right.

    >It says that the milestone version will expire after 30th september. it wont work after that?
    After that it should be another milestone released or a production release.

    #341178 Reply

    skull
    Member

    Great! thanks for ur help!

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Jplayer code not working in the code

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