PageUp and PageDown shortcut keys for volume control

This commit is contained in:
sanj 2010-02-23 12:21:06 +05:30
parent e106f39f25
commit 35f74aa1ed
3 changed files with 49 additions and 29 deletions

View File

@ -12,7 +12,8 @@ Player.prototype.get = function() { }
Player.prototype.listener = function() { }
Player.prototype.set = function(pos) { }
Player.prototype.mute = function(pos) { }
Player.prototype.volUp = function() { }
Player.prototype.volDown = function() { }
Player.prototype.seekFwd = function(ms) {
var currentMs = this.get();
var newMs = currentMs + ms;
@ -47,6 +48,20 @@ VideoPlayer.prototype.init = function(elemID) {
this.height = $(this.player).attr('height');
}
VideoPlayer.prototype.volUp = function() {
var vol = this.player.volume;
if (vol <= 0.9) { var newVol = vol + 0.1 } else { return false; }
this.player.volume = newVol;
return true;
}
VideoPlayer.prototype.volDown = function() {
var vol = this.player.volume;
if (vol >= 0.1) { var newVol = vol - 0.1 } else { return false; }
this.player.volume = newVol;
return true;
}
VideoPlayer.prototype.set = function(pos) {
/* var url = this.url(pos);
var autoplay = 'true';

View File

@ -102,7 +102,19 @@ $(document).ready(function() {
if (e.keyCode == 32 && textArea.hasFocus == false) {
Video.togglePause();
}
//PageUp - volume Up:
if (e.keyCode == 33) {
Video.volUp();
return false;
}
if (e.keyCode == 34) {
Video.volDown();
return false;
}
});
$('#fillMeta').click(function() {
$('#txtWrapper').hide();
$('#eventMetadata').show();

View File

@ -1,29 +1,22 @@
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>b@pad.ma</em:id>
<em:version>0.2</em:version>
<em:type>2</em:type>
<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>3.9</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>pad.ma transcription client</em:name>
<em:description>pad.ma offline transcription client</em:description>
<em:creator>pad.ma</em:creator>
<em:updateURL>http://files.pad.ma/annot/update.rdf</em:updateURL>
<em:updateKey>MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcI+EIEmZ2UMEMzksirJQ6rbRZebeQzM9LCf9i7EZny5umQOF+92G+DxlKrk1BC+B1ZhXHMZNBRWEhn9kuW8mgXL1JBKVPbg4RjbJ39XigtXL5wNWU6EVdUvzFH1D49HwGpDRWJhnlUTMFhJL2FW47Qg1yCttQSEYmmSum3Y77rwIDAQAB</em:updateKey>
<em:homepageURL>http://wiki.pad.ma/wiki/Annot</em:homepageURL>
<em:iconURL>chrome://annot/content/icon.png</em:iconURL>
</Description>
</RDF>
<RDF:RDF xmlns:em="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description RDF:about="urn:mozilla:install-manifest"
em:id="b@pad.ma"
em:version="0.2"
em:type="2"
em:name="pad.ma transcription client"
em:description="pad.ma offline transcription client"
em:creator="pad.ma"
em:updateURL="http://files.pad.ma/speedtrans/update.rdf"
em:homepageURL="http://files.pad.ma/speedtrans/"
em:iconURL="chrome://speedtrans/content/icon.png"
em:updateKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDZutlQBmSw+Pc2G6DvJkhOFsKrh5bcGqnzCOvgZiRCgFVKYKM0M0h9zosV9t/pfUIfHHDeYp9L1GR6gPJnwWdDTC/LCV2K7M9K5L5cF5et+0Tf0yfchOnCx+SAQyJ++8DAyN2mgNtNPXfZrpz1vCePf6TLQuKciobrXPJa+aji2wIDAQAB">
<em:targetApplication RDF:resource="rdf:#$uOho32"/>
</RDF:Description>
<RDF:Description RDF:about="rdf:#$uOho32"
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
em:minVersion="1.5"
em:maxVersion="3.9" />
</RDF:RDF>