Sign inSign up

jQuery Playback Progress Bar Plugin with Drag Support

Add-ons
2026-07-26 00:31 4 views • 0 downloads 3.2KB
jQuery Playback Progress Bar Plugin with Drag Support

Usage

Include jquery-PlayBar.js or jquery-playBar.min.js

Include barstyle.css

First, prepare a container for displaying the progress bar, for example:

1
<div clas="test"></div>

Initialization:

1
2
3
4
5
6
7
$.playBar.addBar($('.test'),1000*64);// The first parameter is the container for the player, and the second parameter is the duration in milliseconds
$.playBar.changeBarColor("#F60");// Set the progress bar color
$.playBar.changeFontColor("#fff")// Set the time display color
$.playBar.stop()// Stop the progress bar
$.playBar.Begin()// Start the progress bar
$.playBar.restTime(1000)// Reset the duration and restart playback
var t=$.playBar.getTheTime()// Get the current time