From 9edaae63290f512d66991246c262d616ae1874ab Mon Sep 17 00:00:00 2001
From: Michael Metrocavich
Date: Sat, 3 Dec 2016 16:40:16 -0500
Subject: [PATCH 1/4] Fix paths to js files in README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index feafada..8bb82ba 100644
--- a/README.md
+++ b/README.md
@@ -8,8 +8,8 @@ The TubePlayer plugin allows developers to focus on functionality as opposed to
Download the [production version][min] or the [development version][max].
-[min]: https://raw.github.com/nirvanatikku/jQuery-TubePlayer-Plugin/master/jquery.tubeplayer.min.js
-[max]: https://raw.github.com/nirvanatikku/jQuery-TubePlayer-Plugin/master/jquery.tubeplayer.js
+[min]: https://raw.github.com/nirvanatikku/jQuery-TubePlayer-Plugin/master/dist/jquery.tubeplayer.min.js
+[max]: https://raw.github.com/nirvanatikku/jQuery-TubePlayer-Plugin/master/dist/jquery.tubeplayer.js
In your web page:
From 1554b714257227e07641bbd234916f8efa417333 Mon Sep 17 00:00:00 2001
From: Nirvana Tikku
Date: Sun, 4 Dec 2016 14:43:28 -0500
Subject: [PATCH 2/4] Include playlist property and update reference to
tubeplayer.js to point to cdnjs
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 8bb82ba..37bd45e 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ In your web page:
```html
-
+
```
@@ -35,50 +35,50 @@ jQuery(document).ready(function(){
```javascript
$.tubeplayer.defaults.settings = {
-
- // Plugin init params
- width: 480, // the width of the player
- height: 270, // the height of the player
- allowFullScreen: "true", // true by default, allow user to go full screen
- initialVideo: "DkoeNLuMbcI", // the video that is loaded into the player
- playlist: null, // array of video id's if a playlist is desired
- start: 0,
- preferredQuality: "default", // preferred quality: auto, small, medium, large, hd720
- controls: 1, // whether the player should have the controls visible, 0 or 1 or 2
- showRelated: false, // show the related videos when the player ends, 0 or 1
- playsinline: false, // setting for ipad
- autoPlay: false, // whether the player should autoplay the video, 0 or 1
- color: "red", // possible options: "red" or "white"
- showinfo: false, // if you want the player to include details about the video
- modestbranding: true, // specify to include/exclude the YouTube watermark
- annotations: true, // show annotations?
- loop: 0, // whether or not the player will loop
- protocol: 'http',
-
- // Player Trigger Specific Functionality
- onPlay: function(id){}, // after the play method is called
- onPause: function(){}, // after the pause method is called
- onStop: function(){}, // after the player is stopped
- onSeek: function(time){}, // after the video has been seeked to a defined point
- onMute: function(){}, // after the player is muted
- onUnMute: function(){}, // after the player is unmuted
-
- // Player State Change Specific Functionality
- onPlayerUnstarted: function(){}, // player returns a state of unstarted
- onPlayerEnded: function(){}, // player returns a state of ended
- onPlayerPlaying: function(){}, // player returns a state of playing
- onPlayerPaused: function(){}, // player returns a state of paused
- onPlayerBuffering: function(){}, // player returns a state of buffering
- onPlayerCued: function(){}, // player returns a state of cued
- onPlayerLoaded: function(){}, // player is initially loaded and attached to the DOM
- onQualityChange: function(quality){}, // player quality changes
- onRateChange: function(rate){}, // player rate changes
-
- // Error State Specific Functionality
- onErrorNotFound: function(){}, // if a video cant be found
- onErrorNotEmbeddable: function(){}, // if a video isnt embeddable
- onErrorInvalidParameter: function(){} // if we've got an invalid param and can't play
-
+
+ // Plugin init params
+ width: 480, // the width of the player
+ height: 270, // the height of the player
+ allowFullScreen: "true", // true by default, allow user to go full screen
+ initialVideo: "DkoeNLuMbcI", // the video that is loaded into the player
+ playlist: null, // array of video id's if a playlist is desired
+ start: 0,
+ preferredQuality: "default", // preferred quality: auto, small, medium, large, hd720
+ controls: 1, // whether the player should have the controls visible, 0 or 1 or 2
+ showRelated: false, // show the related videos when the player ends, 0 or 1
+ playsinline: false, // setting for ipad
+ autoPlay: false, // whether the player should autoplay the video, 0 or 1
+ color: "red", // possible options: "red" or "white"
+ showinfo: false, // if you want the player to include details about the video
+ modestbranding: true, // specify to include/exclude the YouTube watermark
+ annotations: true, // show annotations?
+ loop: 0, // whether or not the player will loop
+ protocol: 'http',
+
+ // Player Trigger Specific Functionality
+ onPlay: function(id){}, // after the play method is called
+ onPause: function(){}, // after the pause method is called
+ onStop: function(){}, // after the player is stopped
+ onSeek: function(time){}, // after the video has been seeked to a defined point
+ onMute: function(){}, // after the player is muted
+ onUnMute: function(){}, // after the player is unmuted
+
+ // Player State Change Specific Functionality
+ onPlayerUnstarted: function(){}, // player returns a state of unstarted
+ onPlayerEnded: function(){}, // player returns a state of ended
+ onPlayerPlaying: function(){}, // player returns a state of playing
+ onPlayerPaused: function(){}, // player returns a state of paused
+ onPlayerBuffering: function(){}, // player returns a state of buffering
+ onPlayerCued: function(){}, // player returns a state of cued
+ onPlayerLoaded: function(){}, // player is initially loaded and attached to the DOM
+ onQualityChange: function(quality){}, // player quality changes
+ onRateChange: function(rate){}, // player rate changes
+
+ // Error State Specific Functionality
+ onErrorNotFound: function(){}, // if a video cant be found
+ onErrorNotEmbeddable: function(){}, // if a video isnt embeddable
+ onErrorInvalidParameter: function(){} // if we've got an invalid param and can't play
+
};
```
@@ -112,7 +112,7 @@ onErrorNotFound
onErrorNotEmbeddable
onErrorInvalidParameter
```
-
+
### TubePlayer API Methods
#### Player
From f5a43254459909f7789ba216ba2b487b7968b2e8 Mon Sep 17 00:00:00 2001
From: Nirvana Tikku
Date: Sun, 4 Dec 2016 14:45:11 -0500
Subject: [PATCH 4/4] More examples in playlisting section
---
README.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index e1dbf64..1c2bc55 100644
--- a/README.md
+++ b/README.md
@@ -161,8 +161,11 @@ jQuery("#player").tubeplayer("playbackRate", 1.5); // video must support this
#### Playlist
```javascript
+jQuery("#player").tubeplayer("cuePlaylist", [videoId1, videoId2]);
+jQuery("#player").tubeplayer("cuePlaylist", {playlist: [videoId1, videoId2], index: 1});
+
jQuery("#player").tubeplayer("playPlaylist", [videoId1, videoId2]);
-jQuery("#player").tubeplayer("playPlaylist", {playlist: [videoId1], index: 1});
+jQuery("#player").tubeplayer("playPlaylist", {playlist: [videoId1, videoId2], index: 1});
jQuery("#player").tubeplayer("next");
jQuery("#player").tubeplayer("previous");