Skip to content

frumbert/circular-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

circular-player

plain, self-contained javascript class that shows a compact resolution independant circular player. You can mousewheel/touch-drag to scrub the file. Only once instance on a page plays at a time. No other dependencies.

Demo

how it looks

A circle with a play/pause button. This is a SVG object generated by code. You can determine the progress bar width, and overall theme colour (on white).

usage

include the script in the regular way, then initialise it against all items.

<script src="circularAudioPlayer.js"></script>
<script>
    document.querySelectorAll(".mp3").forEach((mp3,index) => {
      new CircularAudioPlayer(mp3, mp3.dataset.src, {
        size: 32,
        lineColor: "#007bff",
        lineWidth: 2
      });
    });
</script>

licence

MIT.

About

proof of concept for a circular html5 audio player, using svg and plain javascript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors