Giter Site home page Giter Site logo

vpplayer's Introduction

vpplayer

Jquery Audio player plugin

This is the basic jquery audio player plugin. Before start using this plugin, some of the following dependencies are needed.

Dependency


Jquery library
get jquery library from https://jquery.com/download/

Bootstrap library
get bootstrap library from one of the following links https://www.bootstrapcdn.com/ or https://getbootstrap.com/docs/3.3/getting-started/

Glyphicon
download the glyphicon from https://jquery.com/download/

After the library files are downloaded copy the libraries to the directory of the application. Link all the libraries along with the vpplayer.js and vpplayer.css.

<html>
<head>
<script type="text/javascript" src="./js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="./js/bootstrap.js"></script>
<link rel="stylesheet" type="text/css" href="./css/bootstrap.css">
<script type="text/javascript" src="./lib/vpplayer.js"></script>
<link rel="stylesheet" type="text/css" href="./css/vpplayer.css">
</head>
<script>
/**
  * vpplayer script
  *
  */
</script>
<body>
<div id="player">
</div>
</body>

vpplayer script The basic vpplayer script
src attribute

$(document).ready(function(){
$("#player").vpplayer({
    src: "./audio/audio.mp3"
});
});

The src attribute processes the url of the audio file. In the above code the "./audio/audio.mp3" path is the audio file path within the application.

type attribute

$(document).ready(function(){
$("#player").vpplayer({
    src: "./audio/audio.mp3",
    type: "audio/mp3"
});
});

The type attribute specifies the type of the audio file.

trackName attribute

$(document).ready(function(){
$("#player").vpplayer({
    src: "./audio/audio.mp3"
    type: "audio/mp3",
    trackName: "sample audio",
});
});

The trackName attribute displays the audio name in the player screen.

preloadMessage attribute

$(document).ready(function(){
$("#player").vpplayer({
    src: "./audio/audio.mp3"
    type: "audio/mp3",
    trackName: "sample audio",
    preloadMessage: "LOADING..........."
});
});

The preloadMessage attribute is used to display the message such as LOADING. before the audio file is loaded into the player.

view attribute

$(document).ready(function(){
$("#player").vpplayer({
    src: "./audio/audio.mp3"
    type: "audio/mp3",
    trackName: "sample audio",
    preloadMessage: "LOADING...........",
    view: "basic"
});
});

The view attribute specifies the view mode of the player.

vpplayer supports two mode of view.

view: "basic"
and
view: "minimal"

playerColor attribute

$(document).ready(function(){
$("#player").vpplayer({
    src: "./audio/audio.mp3"
    type: "audio/mp3",
    trackName: "sample audio",
    preloadMessage: "LOADING...........",
    view: "basic",
    playerColor: "black"
});
});

The playerColor attribute is used to define a custom color to the player skin.

vpplayer supports single as well as dual color for skin.

Single color mode

playerColor: "black"

Dual color mode

playerColor: "black, grey"

displayColor attribute

$(document).ready(function(){
$("#player").vpplayer({
    src: "./audio/audio.mp3"
    type: "audio/mp3",
    trackName: "sample audio",
    preloadMessage: "LOADING...........",
    view: "basic",
    playerColor: "black",
    displayColor: "green"
});
});

The displayColor attribute is used to define a custom color to the player screen.

vpplayer supports single as well as dual color for screen.

Single color mode

displayColor: "green"

Dual color mode

displayColor: "green, blue"

license

MIT. Copyright (c) rvprasath.

vpplayer's People

Contributors

rvprasath avatar

Stargazers

hossein s. borhani avatar 이민형 avatar Átila de Freitas Júnior avatar  avatar  avatar layo avatar ycw avatar  avatar Sreejith B S avatar KwanLam Chan avatar wiseyl avatar pyres avatar

Watchers

AntlerBear avatar

vpplayer's Issues

hr:min:sec ?

I really like your player but im having trouble getting it to show hr:min:sec not just min:sec in the elapsed and remaining times. could you help.
thanks.
ben

does not play in android phone

hello rvprasath
thank you for sharing your code
the problem i have is this plugin works in windows browsers in any size
but it dose not play,forward and .. in my phone or tablet
would you please help me to fix it

Cannot place multiple players on a single page.

I am trying to place multiple vpplayers on a single page. Here is the code:

<div id="sampleplayer"></div>
<div id="fullplayer"></div>
<script>
$("#sampleplayer").vpplayer({
src: "sample.mp3",
type: "audio/mp3",
trackName: "my song sample",
view: "minimal",
playerColor: "black, gold",
displayColor: "black"
});
$("#fullsongplayer").vpplayer({
src: "fullsong.mp3",
type: "audio/mp3",
trackName: "my full song",
view: "minimal",
playerColor: "black, gold",
displayColor: "black"
});

Please advise.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.