WordPress.org

Forums

Haiku minimalist audio player
Reset the play index back to time 00:00 programatically (1 post)

  1. wrayco
    Member
    Posted 1 year ago #

    So here's the issue…

    The goal is to reset the play index back to time 00:00 programatically. You are supposed to be able to do this by calling…

    xxx.jplayer('play',0) where that '0' is the time offset.
    xxx.jplayer('pause',0) is supposed to do the same thing, and
    xxx.jplayer('stop') is supposed to reset to 00:00 by default.

    I have tried making these changes in the haiku-player.js file in the graphical player section where haiku-player calls jPlayer. That section (in part) looks like this…

    // play button
    play.click(function(){

    $(this).hide();
    pause.fadeIn(100);
    parent.jPlayer('play');

    return false;
    });

    // pause button
    pause.click(function(){

    $(this).hide();
    play.fadeIn(100).attr('title','Resume');
    parent.jPlayer('pause');

    return false;
    });

    // stop button
    stop.click(function(){

    pause.hide();
    play.fadeIn(100);
    parent.jPlayer('stop');

    return false;
    });

    Changing the parent.jPlayer('play'); to parent.jPlayer('play',0); has no effect. If the user played all the way through, Play does nothing and the play bar appears "wide" as it does when play has just finished. Changing the parent.jPlayer('pause'); to parent.jPlayer('pause',0); has no effect. Play resumes right where the user paused. And changing parent.jPlayer('pause'); to parent.jPlayer('stop'); just for testing has no effect. Again play resumes right where the user paused.

    So…either the settings are not working, or something is taking precedence over the code in hiku-player.js.

    http://wordpress.org/extend/plugins/haiku-minimalist-audio-player/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Haiku minimalist audio player
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic