Skip to content

Commit

Permalink
fixes issue #22 - appropriately checks if parameter is passed into vo…
Browse files Browse the repository at this point in the history
…lume, quality and size methods
  • Loading branch information
nirvanatikku committed Jan 18, 2013
1 parent 76046cb commit 072c6d4
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 27 deletions.
19 changes: 19 additions & 0 deletions LICENSE
@@ -0,0 +1,19 @@
Copyright (c) 2013 Nirvana Tikku

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
jQuery YouTube TubePlayer Plugin
===

Latest version: v1.1.2 (_17th Jan 2013_)
Latest version: v1.1.3 (_17th Jan 2013_)

http://www.tikku.com/jquery-youtube-tubeplayer-plugin

Expand Down
12 changes: 6 additions & 6 deletions jQuery.tubeplayer.js
@@ -1,7 +1,7 @@
/*!
* jQuery TubePlayer Plugin
*
* version: 1.1.2 (17-Jan-2013)
* version: 1.1.3 (17-Jan-2013)
* @requires v1.3.2 or later
*
* @imports SWFObject - http://code.google.com/p/swfobject/
Expand Down Expand Up @@ -232,7 +232,7 @@

else if( type === "string" )

return $this.triggerHandler( input+TUBEPLAYER, xtra || null );
return $this.triggerHandler( input+TUBEPLAYER, ( typeof xtra !== 'undefined' ? xtra : null ) );

};

Expand Down Expand Up @@ -651,7 +651,7 @@
if(typeof(param)==='object')
p.ytplayer.loadVideoById(param.id,param.time, p.opts.preferredQuality);

else if(param)
else if(typeof param !== 'undefined')
p.ytplayer.loadVideoById(param, 0, p.opts.preferredQuality);

else
Expand Down Expand Up @@ -713,7 +713,7 @@

volume: buildFN(function(evt,param,p){

if(param) {
if(typeof param !== 'undefined') {

p.ytplayer.setVolume(param);

Expand All @@ -729,7 +729,7 @@

quality: buildFN(function(evt,param,p){

if(param)
if(typeof param !== 'undefined')
p.ytplayer.setPlaybackQuality(param);

else
Expand Down Expand Up @@ -775,7 +775,7 @@

size: buildFN(function(evt, param, p){

if(param.width && param.height) {
if(typeof param !== 'undefined' && param.width && param.height) {

p.ytplayer.setSize(param.width, param.height);

Expand Down
28 changes: 14 additions & 14 deletions jQuery.tubeplayer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions tubeplayer.jquery.json
@@ -1,4 +1,5 @@
{
"version": "1.1.2",
"name": "tubeplayer",
"title": "jQuery TubePlayer",
"description": "jQuery plugin for the YouTube Player API",
Expand All @@ -7,7 +8,9 @@
"video",
"media"
],
"version": "1.1.2",
"homepage": "tikku.com/jquery-youtube-tubeplayer-plugin",
"docs": "http://tikku.com/jquery-youtube-tubeplayer-plugin#tubeplayer_tutorial_3",
"bugs": "https://github.com/nirvanatikku/jQuery-TubePlayer-Plugin/issues",
"author": {
"name": "Nirvana Tikku",
"email": "ntikku@gmail.com",
Expand All @@ -20,13 +23,9 @@
"licenses": [
{
"type": "MIT",
"url": "http://opensource.org/licenses/MIT"
"url": "https://github.com/nirvanatikku/jQuery-TubePlayer-Plugin/blob/master/LICENSE"
}
],
"bugs": "https://github.com/nirvanatikku/jQuery-TubePlayer-Plugin/issues",
"homepage": "tikku.com/jquery-youtube-tubeplayer-plugin",
"docs": "http://tikku.com/jquery-youtube-tubeplayer-plugin#tubeplayer_tutorial_3",
"download": "https://github.com/nirvanatikku/jQuery-TubePlayer-Plugin/blob/master/jQuery.tubeplayer.js",
"dependencies": {
"jquery": ">=1.3"
}
Expand Down

0 comments on commit 072c6d4

Please sign in to comment.