facebook

Video Player Widget: CLOSED

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

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

    Brandon
    Member

    Its been a while since i played around with mobione, but I decided to use it for a friends band. But, I cant seem to find the source to dynamically change the video player widget source video. And, is there a way to automatically start the video once it is changed? so they dont have to click on the play button again?

    Thanks.

    #332249

    Hi CincyPlanet,

    To change the src of your video you can use:

    $(“#m1-appName-video1-player”).attr(“onclick”,”phoneui.playVideo(‘url-of-your-video’)”);

    You can also use .click() function: http://api.jquery.com/click/
    Like
    $(“#m1-appName-video1-player”).click(“phoneui.playVideo(‘url-of-your-video’)”);

    So you could try something like this:

    var newurl = “http://…./videourl.mp4”;
    $(“#m1-audio-video1-player”).attr(“onclick”,”phoneui.playVideo(‘”+newurl+”‘)”);
    phoneui.playVideo(newurl);

    And it will start video after change the src. Let me know how it goes for you.

    #332250

    Brandon
    Member

    Octavio,
    Exactly what I needed, thanks. Now I just need to decide to use this and host the videos, or YouTube…

    #332266

    @CincyPlanet,

    Thanks for your follow up. I’m glad that it was helpful for you. Marking thread as closed.

    #335266

    @support-octavio wrote:

    Hi CincyPlanet,

    To change the src of your video you can use:

    $(“#m1-appName-video1-player”).attr(“onclick”,”phoneui.playVideo(‘url-of-your-video’)”);

    You can also use .click() function: http://api.jquery.com/click/
    Like
    $(“#m1-appName-video1-player”).click(“phoneui.playVideo(‘url-of-your-video’)”);

    So you could try something like this:

    var newurl = “http://…./videourl.mp4”;
    $(“#m1-audio-video1-player”).attr(“onclick”,”phoneui.playVideo(‘”+newurl+”‘)”);
    phoneui.playVideo(newurl);

    And it will start video after change the src. Let me know how it goes for you.

    Octavio. I tried with newurl=”file:///mnt/sdcard/DCIM/camera/myfile.mp4″ and
    newurl=”sdcard/DCIM/camera/myfile.mp4″ , but in both cases It does’nt work…..
    Please can you tell me where I’m Wrong ?
    MAx.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Video Player Widget: CLOSED

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