Permalink
Browse files

Version 3.0 BETA

1 parent cab6d3f commit 442696cfc2be6ac51b2cf63d1256abc519f57668 Steve Heffernan committed Oct 1, 2011
Showing with 12,239 additions and 4,591 deletions.
  1. +0 −215 README.markdown
  2. +153 −0 README.md
  3. +0 −13 demo-subtitles.srt
  4. +10 −90 demo.html
  5. +36 −0 dev/build/combine_sources.sh
  6. +0 −13 dev/combine_sources.sh
  7. +6 −0 dev/compare/compare.css
  8. +102 −0 dev/compare/compare.html
  9. +55 −0 dev/compare/compare.js
  10. +8 −0 dev/decisions.txt
  11. +13 −0 dev/demo-subtitles.srt
  12. BIN dev/design/Icon Design.png
  13. +190 −0 dev/design/skin.old.css
  14. +307 −0 dev/design/video-js.css
  15. BIN dev/design/video-js.png
  16. +62 −0 dev/dev.html
  17. BIN dev/flash/VideoJS.swf
  18. +6 −0 dev/flash/swfobject.js
  19. +0 −24 dev/flowplayer/flowplayer-3.2.4.min.js
  20. +0 −114 dev/flowplayer/test.html
  21. +0 −13 dev/map/coords.srt
  22. +0 −92 dev/map/map.html
  23. +1 −21 dev/src/_begin.js
  24. +198 −65 dev/src/api.js
  25. +37 −0 dev/src/autoload.js
  26. +0 −579 dev/src/behaviors.js
  27. +310 −0 dev/src/behaviors/behaviors.js
  28. +213 −0 dev/src/behaviors/seekBar.js
  29. +43 −0 dev/src/behaviors/texttrackdisplays.js
  30. +177 −0 dev/src/behaviors/volume.js
  31. +153 −0 dev/src/controls/bar.js
  32. +52 −0 dev/src/controls/bigPlay.js
  33. +157 −0 dev/src/controls/controls.html
  34. +133 −0 dev/src/controls/main.js
  35. +22 −0 dev/src/controls/subtitlesBox.js
  36. +381 −0 dev/src/core.js
  37. +217 −0 dev/src/ecma.js
  38. +287 −0 dev/src/events.js
  39. +0 −77 dev/src/flash.js
  40. +0 −474 dev/src/html5.js
  41. +54 −0 dev/src/json.js
  42. +198 −126 dev/src/lib.js
  43. +15 −0 dev/src/log.js
  44. +0 −306 dev/src/main.js
  45. +90 −46 dev/{flowplayer/video-js.flowplayer.js → src/tech/flowplayer.js}
  46. +152 −0 dev/src/tech/h5swf.js
  47. +157 −0 dev/src/tech/html5.js
  48. +131 −0 dev/src/tracks.js
  49. +0 −24 dev/src/video-js.jquery.js
  50. +0 −150 dev/test.html
  51. +7 −0 dev/test/qunit/.gitignore
  52. +27 −0 dev/test/qunit/README.md
  53. +16 −0 dev/test/qunit/addons/canvas/README.md
  54. +76 −0 dev/test/qunit/addons/canvas/canvas-test.js
  55. +19 −0 dev/test/qunit/addons/canvas/canvas.html
  56. +6 −0 dev/test/qunit/addons/canvas/qunit-canvas.js
  57. +17 −0 dev/test/qunit/addons/close-enough/README.md
  58. +37 −0 dev/test/qunit/addons/close-enough/close-enough-test.js
  59. +18 −0 dev/test/qunit/addons/close-enough/close-enough.html
  60. +32 −0 dev/test/qunit/addons/close-enough/qunit-close-enough.js
  61. +7 −0 dev/test/qunit/addons/composite/README.md
  62. +33 −0 dev/test/qunit/addons/composite/composite-demo-test.html
  63. +20 −0 dev/test/qunit/addons/composite/composite-test.html
  64. +159 −0 dev/test/qunit/addons/composite/composite-test.js
  65. +19 −0 dev/test/qunit/addons/composite/dummy-qunit-test.html
  66. +19 −0 dev/test/qunit/addons/composite/dummy-same-test.html
  67. +35 −0 dev/test/qunit/addons/composite/index.html
  68. +13 −0 dev/test/qunit/addons/composite/qunit-composite.css
  69. +82 −0 dev/test/qunit/addons/composite/qunit-composite.js
  70. +18 −0 dev/test/qunit/addons/step/README.md
  71. +25 −0 dev/test/qunit/addons/step/qunit-step.js
  72. +13 −0 dev/test/qunit/addons/step/step-test.js
  73. +19 −0 dev/test/qunit/addons/step/step.html
  74. +27 −0 dev/test/qunit/package.json
  75. +226 −0 dev/test/qunit/qunit/qunit.css
  76. +1,552 −0 dev/test/qunit/qunit/qunit.js
  77. +24 −0 dev/test/qunit/test/headless.html
  78. +19 −0 dev/test/qunit/test/index.html
  79. +17 −0 dev/test/qunit/test/logs.html
  80. +153 −0 dev/test/qunit/test/logs.js
  81. +1,421 −0 dev/test/qunit/test/same.js
  82. +471 −0 dev/test/qunit/test/test.js
  83. +56 −0 dev/test/test.html
  84. +154 −0 dev/test/test.js
  85. +0 −214 docs/API.markdown
  86. +156 −0 docs/api.md
  87. +0 −3 docs/{behaviors.markdown → behaviors.md}
  88. 0 docs/{glossary.markdown → glossary.md}
  89. +2 −0 docs/options.md
  90. +29 −0 docs/setup.md
  91. +44 −0 docs/tech.md
  92. +2 −0 docs/timerange.md
  93. +8 −0 docs/video-tag.md
  94. +0 −116 skins/hu.css
  95. +0 −111 skins/tube.css
  96. +0 −89 skins/vim.css
  97. +253 −205 video-js.css
  98. BIN video-js.png
  99. BIN video-js.swf
  100. +2,782 −1,411 video.js
View
@@ -1,215 +0,0 @@
-VideoJS - [HTML5 Video Player](http://videojs.com)
-==================================================
-Version 2.0.2
-
-View [VideoJS.com](http://videojs.com) for a demo and overview.
-
-VideoJS is an HTML5 video player that uses the HTML5 video tag built into modern browsers, and uses javascript to add custom controls, new functionality, and to fix cross browser bugs.
-
-The base of VideoJS is Kroc Camen's [Video for Everybody](http://camendesign.com/code/video_for_everybody), which is a video embed code that falls back to a Flash video player or download links for browsers and devices that don't support HTML5 video.
-
-View demo.html for an example of how to use it.
-
-Originally based on [this tutorial](http://blog.steveheffernan.com/2010/04/how-to-build-an-html5-video-player/).
-
-Contributors (Github Username)
-------------------------------
-heff, dz0ny, sentientbit, tvdeyen, brandonarbini, gordonbrander, Shraymonks, albertogasparin, sandaru1, nicholasbs, majornista, Fredust85, @wonderboymusic, ellis-, emirpprime, eirikb, mbrubeck
-
-
-Getting Started
----------------
-
-### Step 1: Include VideoJS Javascript and CSS files in your page.
-Change the src/href to the appropriate location on your server.
-
- <script src="video.js" type="text/javascript" charset="utf-8"></script>
- <link rel="stylesheet" href="video-js.css" type="text/css" media="screen" title="Video JS" charset="utf-8">
-
-
-### Step 2: Add the VideoJS setup code to your page or another script.
-Must run after the VideoJS javascript file has been included
-
- <script type="text/javascript" charset="utf-8">
-
- // Add VideoJS to all video tags on the page when the DOM is ready
- VideoJS.setupAllWhenReady();
-
- </script>
-
-
-### Step 3: Add the VideoJS embed code to your page (grab the latest version for demo.html).
-Change the video and image files to your own. You can even swap out the Flash Fallback for your own, just maintain the "vjs-flash-fallback" class on the object. I know, seems like a lot of HTML, but it's super compatible. [Check it](http://camendesign.com/code/video_for_everybody/test.html).
-
- <!-- Begin VideoJS -->
- <div class="video-js-box">
- <!-- Using the Video for Everybody Embed Code http://camendesign.com/code/video_for_everybody -->
- <video id="example_video_1" class="video-js" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls preload>
- <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
- <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
- <source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg; codecs="theora, vorbis"' />
- <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
- <object id="flash_fallback_1" class="vjs-flash-fallback" width="640" height="264" type="application/x-shockwave-flash"
- data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
- <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
- <param name="wmode" value="opaque" />
- <param name="allowfullscreen" value="true" />
- <param name="flashvars" value='config={"playlist":["http://video-js.zencoder.com/oceans-clip.png", {"url": "http://video-js.zencoder.com/oceans-clip.mp4","autoPlay":false,"autoBuffering":true}]}' />
- <!-- Image Fallback. Typically the same as the poster image. -->
- <img src="http://video-js.zencoder.com/oceans-clip.png" width="640" height="264" alt="Poster Image"
- title="No video playback capabilities." />
- </object>
- </video>
- <!-- Download links provided for devices that can't play video in the browser. -->
- <p class="vjs-no-video"><strong>Download Video:</strong>
- <a href="http://video-js.zencoder.com/oceans-clip.mp4">MP4</a>,
- <a href="http://video-js.zencoder.com/oceans-clip.webm">WebM</a>,
- <a href="http://video-js.zencoder.com/oceans-clip.ogv">Ogg</a><br>
- <!-- Support VideoJS by keeping this link. -->
- <a href="http://videojs.com">HTML5 Video Player</a> by VideoJS
- </p>
- </div>
- <!-- End VideoJS -->
-
-
-Storing a Reference to the Player(s)
-------------------------------------
-You can set up the player(s) in a way that allows you to access it later, and control things like the video playback. In this case, the setup has to happen after the DOM has been loaded. You can use any library's DOM Ready method, or the one built into VideoJS.
-
-### Using a Video's ID or Element
-
- VideoJS.DOMReady(function(){
- var myPlayer = VideoJS.setup("example_video_1");
- });
-
-
-### Using an array of video elements/IDs
-Note: It returns an array of players
-
- VideoJS.DOMReady(function(){
- var myManyPlayers = VideoJS.setup(["example_video_1", "example_video_2", video3Element]);
- });
-
-
-### All videos on the page with the "video-js" class
-
- VideoJS.DOMReady(function(){
- var myManyPlayers = VideoJS.setup("All");
- });
-
-
-### After you have references to your players you can...(example)
-
- VideoJS.DOMReady(function(){
- var myPlayer = VideoJS.setup("example_video_1");
- myPlayer.play(); // Starts playing the video for this player.
- });
-
-
-Setting Options
----------------
-Set options when setting up the videos. The defaults are shown here.
-
- VideoJS.setupAllWhenReady({
- controlsBelow: false, // Display control bar below video instead of in front of
- controlsHiding: true, // Hide controls when mouse is not over the video
- defaultVolume: 0.85, // Will be overridden by user's last volume if available
- flashPlayerVersion: 9, // Required flash version for fallback
- });
-
-### Or as the second option of VideoJS.setup
-
- VideoJS.DOMReady(function(){
- var myPlayer = VideoJS.setup("example_video_1", {
- // Same options
- });
- });
-
-
-Coming Next
------------
-- API to Flash fallback
-
-Changelog
----------
-2.0.3
-
-- Feature: Made returning to the start at the end of the movie an option ("returnToStart").
-- Feature: Added loop option to loop movie ("loop").
-- Feature: Reorganized player API and listeners.
-- Feature: Added option to disable controls. controlsEnabled: false
-- Feature: Setup method now has a callback, so you can more easily work with the player after setup
-- Feature: Added listeners for enter/exit full screen/window.
-- Feature: Added a VideoJS.player(id) function for getting the player for a video ID
-- Changes: setupAllWhenReady is now just setupAll (backward compatible)
-- Fix: Check for Android browser now excludes firefox and opera
-
-2.0.2 (2010-12-10)
-
-- Feature: Rewrote and optimized subtitle code.
-- Feature: Protecting against volume ranges outside of 1 and 0.
-- Fix: Bug in Safari for Mac OS 10.5 (Leopard) that was breaking fullscreen.
-
-2.0.1 (2010-11-22)
-
-- Fix: Issue with big play button when multiple videos are on the page.
-- Fix: Optimized play progress tracking.
-- Fix: Optimized buffer progress checking.
-- Fix: Firefox not showing Flash fallback object.
-
-2.0.0 (2010-11-21)
-
-- Feature: Created "behaviors" concept for adding behaviors to elements
-- Feature: Switched back to divs for controls, for more portable styles
-- Feature: Created playerFallbackOrder array option. ["html5", "flash", "links"]
-- Feature: Created playerType concept, for initializing different platforms
-- Feature: Added play button for Android
-- Feature: Added spinner for iPad (non-fullscreen)
-- Feature: Split into multiple files for easier development
-- Feature: Combined VideoJS & _V_ into the same variable to reduce confusion
-- Fix: Checking for m3u8 files (Apple HTTP Streaming)
-- Fix: Catching error on localStorage full that safari seems to randomly throw
-- Fix: Scrubbing to end doesn't trigger onEnded
-
-1.1.5 (2010-11-09)
-
-- Feature: Switched to track method for setting subtitles. Now works like spec.
-- Feature: Created "players" concept for defining fallbacks and fallback order
-- Fix: Android playback bug.
-- Fix: Massive reorganization of code to make easier to navigate
-
-1.1.4 (2010-11-06)
-
-- Feature: Added loading spinner.
-- Feature: Improved styles loaded checking.
-- Feature: Added volume() function to get and set volume through the player.
-- Fix: Fix issue where FF would loop video in background when ended.
-- Fix: Bug in Chrome that shows poster & plays audio if you set currentTime too quickly.
-- Fix: Bug in Safari where waiting is triggered and shows spinner when not needed
-- Fix: Updated to show links if only unplayable sources and no Flash.
-- Fix: Issue where if play button was loaded after play, it wouldn't hide.
-
-1.1.3 (2010-10-19)
-
-- Feature: Width/Height functions for resizing the player
-- Feature: Made initial click & hold trigger new value on progress and volume
-- Feature: Made controls not hide when hovering over them
-- Feature: Added big play button as default starting control.
-- Fix: Removed trailing comma that was breaking IE7
-- Fix: Removed some vars from global scope
-- Fix: Changed a document.onmousemove to an eventListener to prevent conflicts
-- Fix: Added a unique ID to FlowPlayer demo object to fix a FlowPlayer bug. Thanks @emirpprime.
-- Fix: Safari error on unloaded video
-
-1.1.2 (2010-09-20)
-
-- Added a fix for the poster bug in iPad/iPhone
-- Added more specificity to styles
-
-1.1.1 (2010-09-14)
-
-- First Formally Versioned Release
-
-1.0.0 (2010-05-18)
-
-- First released
View
153 README.md
@@ -0,0 +1,153 @@
+VideoJS - [HTML5 Video Player](http://videojs.com)
+==================================================
+Version 3.0 BETA
+
+---
+BETA NOTES
+Version 3 is almost a complete rewrite of the previous versions of VideoJS. New features includes:
+
+ - HTML/CSS Controls and API now work for both the HTML5 and Flash versions.
+ - Custom Super-lightweight Flash Fallback
+ - Embed Code is much simpler.
+ - No more "vjs-box" div required, just use the video tag.
+ - No more embedding of Flash fallback within the video tag HTML.
+
+---
+
+View [VideoJS.com](http://videojs.com) for a demo and overview.
+
+VideoJS is an HTML5 video player that uses the HTML5 video tag built into modern browsers, and uses javascript to add custom controls, new functionality, and to fix cross browser bugs. For browsers that don't support HTML5, it will fallback to a Flash player.
+
+View demo.html for an example of how to use it.
+
+Originally based on [this tutorial](http://blog.steveheffernan.com/2010/04/how-to-build-an-html5-video-player/).
+
+Contributors (Github Username)
+------------------------------
+heff, dz0ny, sentientbit, tvdeyen, brandonarbini, gordonbrander, Shraymonks, albertogasparin, sandaru1, nicholasbs, majornista, Fredust85, @wonderboymusic, ellis-, emirpprime, eirikb, mbrubeck
+
+
+Getting Started
+---------------
+
+### Step 1: Include the VideoJS Javascript and CSS files in the head of your page.
+Change the file urls to point to the files on your server.
+
+ <script src="video.js"></script>
+ <link href="video-js.css" rel="stylesheet">
+
+
+### Step 2: Add an HTML5 video tag to your page.
+Use the video tag as normal, with a few extra pieces for VideoJS:
+
+ 1. The 'data-setup' Atrribute tells VideoJS to automatically set up the video when the page is ready, and read any options (in JSON format) from the attribute.
+ 2. The 'id' Attribute: Should be used and unique for every video on the same page.
+ 3. The 'class' attribute contains two classes:
+ - 'video-js' applies styles that are required for VideoJS functionality, like fullscreen and subtitles.
+ - 'vjs-default-skin' applies the default skin to the HTML controls, and can be removed or overridden to create your own controls design.
+
+Otherwise include/exclude attributes, settings, sources, and tracks exactly as you would for HTML5 video.
+
+ <video id="example_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="264"
+ poster="http://video-js.zencoder.com/oceans-clip.png"
+ data-setup='{"example_option":true}'>
+ <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
+ <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
+ </video>
+
+
+### Step 3: Nada!
+That's all it take to get started. See the docs for more advanced uses.
+
+
+Coming Next
+-----------
+- Stable Release
+
+Changelog
+---------
+3.0b
+
+- Complete rewrite in progress
+
+2.0.3
+
+- Feature: Made returning to the start at the end of the movie an option ("returnToStart").
+- Feature: Added loop option to loop movie ("loop").
+- Feature: Reorganized player API and listeners.
+- Feature: Added option to disable controls. controlsEnabled: false
+- Feature: Setup method now has a callback, so you can more easily work with the player after setup
+- Feature: Added listeners for enter/exit full screen/window.
+- Feature: Added a VideoJS.player(id) function for getting the player for a video ID
+- Changes: setupAllWhenReady is now just setupAll (backward compatible)
+- Fix: Check for Android browser now excludes firefox and opera
+
+2.0.2 (2010-12-10)
+
+- Feature: Rewrote and optimized subtitle code.
+- Feature: Protecting against volume ranges outside of 1 and 0.
+- Fix: Bug in Safari for Mac OS 10.5 (Leopard) that was breaking fullscreen.
+
+2.0.1 (2010-11-22)
+
+- Fix: Issue with big play button when multiple videos are on the page.
+- Fix: Optimized play progress tracking.
+- Fix: Optimized buffer progress checking.
+- Fix: Firefox not showing Flash fallback object.
+
+2.0.0 (2010-11-21)
+
+- Feature: Created "behaviors" concept for adding behaviors to elements
+- Feature: Switched back to divs for controls, for more portable styles
+- Feature: Created playerFallbackOrder array option. ["html5", "flash", "links"]
+- Feature: Created playerType concept, for initializing different platforms
+- Feature: Added play button for Android
+- Feature: Added spinner for iPad (non-fullscreen)
+- Feature: Split into multiple files for easier development
+- Feature: Combined VideoJS & _V_ into the same variable to reduce confusion
+- Fix: Checking for m3u8 files (Apple HTTP Streaming)
+- Fix: Catching error on localStorage full that safari seems to randomly throw
+- Fix: Scrubbing to end doesn't trigger onEnded
+
+1.1.5 (2010-11-09)
+
+- Feature: Switched to track method for setting subtitles. Now works like spec.
+- Feature: Created "players" concept for defining fallbacks and fallback order
+- Fix: Android playback bug.
+- Fix: Massive reorganization of code to make easier to navigate
+
+1.1.4 (2010-11-06)
+
+- Feature: Added loading spinner.
+- Feature: Improved styles loaded checking.
+- Feature: Added volume() function to get and set volume through the player.
+- Fix: Fix issue where FF would loop video in background when ended.
+- Fix: Bug in Chrome that shows poster & plays audio if you set currentTime too quickly.
+- Fix: Bug in Safari where waiting is triggered and shows spinner when not needed
+- Fix: Updated to show links if only unplayable sources and no Flash.
+- Fix: Issue where if play button was loaded after play, it wouldn't hide.
+
+1.1.3 (2010-10-19)
+
+- Feature: Width/Height functions for resizing the player
+- Feature: Made initial click & hold trigger new value on progress and volume
+- Feature: Made controls not hide when hovering over them
+- Feature: Added big play button as default starting control.
+- Fix: Removed trailing comma that was breaking IE7
+- Fix: Removed some vars from global scope
+- Fix: Changed a document.onmousemove to an eventListener to prevent conflicts
+- Fix: Added a unique ID to FlowPlayer demo object to fix a FlowPlayer bug. Thanks @emirpprime.
+- Fix: Safari error on unloaded video
+
+1.1.2 (2010-09-20)
+
+- Added a fix for the poster bug in iPad/iPhone
+- Added more specificity to styles
+
+1.1.1 (2010-09-14)
+
+- First Formally Versioned Release
+
+1.0.0 (2010-05-18)
+
+- First released
View
@@ -1,13 +0,0 @@
-1
-00:00:02,400 --> 00:00:05,200
-[Background Music Playing]
-
-2
-00:00:15,712 --> 00:00:17,399
-Heay!!
-
-3
-00:00:25,712 --> 00:00:30,399
-[Bird noises]
-
-
Oops, something went wrong.

0 comments on commit 442696c

Please sign in to comment.