Skip to content

cladera/videojs-stereopanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

videojs-stereopanner

Stereo Panner is a plugin for video-js. The purpose of this package is to extend video-js audio controls adding stereo panning methods.

With StereoPanner you can control which track to listen to of a video in stereo. This feature is useful for multilingual broadcasts where you use stereo to send audio in two languages, for instance, the original language through the left channel and the simultaneous translation through the right channel.

Stability

This plugin only works fine in Chrome due to its use of AudioContext Audio API and this interface is not implemented in all browsers.

##Live-Demo

Demo of StereoPanner plugin: http://cladera.github.io/stereopanner/

##Installation Add videojs.stereopanner.min.js file to your head tag, just after videojs:

<html>
	<head>
		<!--Latest VideoJS-->
		<link href="http://vjs.zencdn.net/4.3/video-js.css" rel="stylesheet">
		<script src="http://vjs.zencdn.net/4.3/video-js.js"></script>
		<!--StereoPanner Pluging-->
		<script src="js/videojs.stereopanner.min.js"></script>
	</head>
	<body>
		...

##Usage After loading video-js enable StereoPanner calling the plugin init:

videojs('myvideo').stereopanner();

Additionally you can select the which track you want to listen to first. The starting default is 'left':

videojs('myvideo').stereopanner({starting:'right'});

##API Methods Once the plugin is started, you can change the stereo channel using the following functions:

panToLeft()

Mute right channel and pan audio to left

	mplayer.panToLeft();

panToRight()

Mute left channel and pan audio to right

	mplayer.panToRight();

panToStereo()

Back to stereo mode

	mplayer.panToStereo();

##TODO

  • Create an audio toogle button in menu bar.
  • Flash support

About

Audiopanner extends video-js audio api adding panning functions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published