Permalink
Browse files

Merge pull request #215 from heff/jhurliman-youtube

Jhurliman youtube
  • Loading branch information...
2 parents 9343610 + fffa9dd commit 8eba022c0c9a5708cfd35fc40e7603c7723f3c81 Steve Heffernan committed Aug 13, 2012
View
@@ -30,7 +30,11 @@ cat src/tracks.js >> dist/video.js
# h5swf temporarily requires swfobject
# cat flash/swfobject.js >> dist/video.js
+cat tech/html5/html5.js >> dist/video.js
+cat tech/flash/flash.js >> dist/video.js
+
cat src/setup.js >> dist/video.js
+
cat src/_end.js >> dist/video.js
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Video.js | HTML5 Video Player | YouTube Demo</title>
+
+ <!-- Change URLs to wherever Video.js files will be hosted -->
+ <link href="video-js.css" rel="stylesheet" type="text/css">
+ <!-- video.js must be in the <head> for older IEs to work. -->
+ <script src="video.js"></script>
+
+</head>
+<body>
+
+ <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="360"
+ data-setup='{"techOrder":["youtube","html5"],"ytcontrols":false}'>
+ <source src="http://www.youtube.com/watch?v=qWjzVHG9T1I" type='video/youtube' />
+ </video>
+
+</body>
+</html>
View
@@ -20,13 +20,17 @@
<script src="src/controls.js"></script>
<script src="src/events.js"></script>
<script src="src/tracks.js"></script>
+
+ <script src="tech/html5/html5.js"></script>
+ <script src="tech/flash/flash.js"></script>
<script src="src/setup.js"></script>
-
+
<script type="text/javascript" charset="utf-8">
// Easy access to test Flash over HTML5. Add ?flash to URL
if (window.location.href.indexOf("?flash") !== -1) {
- _V_.options.techOrder = ["H5swf"]
+ _V_.options.techOrder = ["flash"];
+ _V_.options.flash.swf = "tech/flash/video-js.swf";
}
</script>
View
@@ -44,3 +44,47 @@ timeupdate
progress
enterFullScreen
exitFullScreen
+
+Adding Playback Technology
+==================
+When adding additional Tech to a video player, make sure to add the supported tech to the video object.
+
+### Tag Method: ###
+ <video data-setup='{"techOrder", "html5", "flash", [other supported tech]}'
+
+### Object Method: ###
+ _V_("videoID", {
+ techOrder: {"html5", "flash", [other supported tech]}
+ });
+
+Youtube Technology
+==================
+To add a youtube source to your video tag, use the following source:
+
+ <source src="http://www.youtube.com/watch?v=[ytVideoId]" type="video/youtube"
+
+Important Note:
+------------------
+> You can simply copy and paste the url of the youtube page from the browser and
+> the Youtube Tech will be able to find the video id by itself. This is just the
+> minimum needed to get the video working. (Useful for data storage)
+
+
+Youtube Technology - Extra Options
+----------------------------------
+
+In Addition to the natively supported options, the Youtube API supports the following
+added options:
+
+### ytcontrols ###
+Type: Boolean (T/F)
+Default: False
+
+Determines whether to show Youtube's basic Red/Black default play bar skin or to hide
+it and use the native video-js play bar.
+
+### hd ###
+Type: Boolean (T/F)
+Default: False
+
+Determines whether or not to play back the video in HD.
Oops, something went wrong.

0 comments on commit 8eba022

Please sign in to comment.