Skip to content

Lib for easy control embeed iframe players with vimeo or youtube video. Still Alpha version

License

Notifications You must be signed in to change notification settings

beregovoy/playerControl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

v0.1

playerControl

Lib for control embeed iframe players with vimeo or youtube video.

Require

Youtube and Vimeo api. And jQuery of course

<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="https://www.youtube.com/iframe_api"></script>
<script src="https://f.vimeocdn.com/js/froogaloop2.min.js"></script>

Installaion

<script src="jquery.playerControl.js"></script>

Using

First of first you should initialize plugin. For example we have embeed videos with class .video. So we should do

$(document).on('playerApiReady', function(){
	$('.video').playerControl();		
});

Documentation

There is few functions for now.

play()

$('#video).playerControl.play()

pause()

$('#video).playerControl.pause()

stop()

$('#video).playerControl.stop()

mute()

$('#video).playerControl.mute()

unMute()

$('#video).playerControl.unMute()

getDuration() // Works only on youtube somehow. Should be fixed next time.

$('#video).playerControl.getDuration()

seekTo(integer) // Integer - is seconds for seek.

$('#video).playerControl.seekTo(15)

setVolume(integer) // Integer - is percents of Volume

$('#video).playerControl.setVolume(100)

About

Lib for easy control embeed iframe players with vimeo or youtube video. Still Alpha version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published