1
0
mirror of https://github.com/videojs/video.js.git synced 2025-04-09 07:23:57 +02:00

Added captions file to release files. Added caption to demo.

Changed demo URLs to be local, so that they work with current release file, not old release on server.
This commit is contained in:
Steve Heffernan 2012-03-20 10:28:10 -07:00
parent 0657d3d118
commit df72cc6eb1
3 changed files with 33 additions and 89 deletions

View File

@ -4,63 +4,6 @@ require 'httparty'
namespace :build do
task :special do
Rake::Log["Building Version: " << version_number]
if File.exist?("dist")
Rake::Shell["rm -r dist"]
end
# Make distribution folder
Rake::Shell["mkdir dist"]
Rake::Log["Combining source files"]
combined = ""
first_files = [ '_begin.js', 'core.js', 'lib.js' ]
exclude_files = ['.', '..', '.DS_Store', 'setup.js', 'tracks.js', 'json.js', 'controls.js', '_end.js']
first_files.each do |item|
Rake::Log[item]
combined << File.read("src/#{item}")
end
Dir.foreach('src') do |item|
next if (exclude_files + first_files).include? item
combined << File.read("src/#{item}")
end
# combined << File.read("flash/swfobject.js")
# combined << File.read("src/setup.js")
combined << File.read("src/_end.js")
Rake::Log["Adding version number"]
combined = combined.gsub('GENERATED_AT_BUILD', version_number)
File.open('dist/video.js', "w+") do |file|
file.puts "" << combined
end
Rake::Log["Copying CSS and updated version"]
File.open('dist/video-js.css', "w+") do |file|
file.puts File.read("design/video-js.css").gsub('GENERATED_AT_BUILD', version_number)
end
Rake::Log["Copying suppporting files"]
Rake::Shell["cp design/video-js.png dist/video-js.png"]
Rake::Shell["cp flash/video-js.swf dist/video-js.swf"]
Rake::Log["Minimizing JavaScript"]
Rake::Shell["java -jar build/lib/yuicompressor-2.4.7.jar dist/video.js -o dist/video.min.js"]
Rake::Log["Minimizing CSS"]
Rake::Shell["java -jar build/lib/yuicompressor-2.4.7.jar dist/video-js.css -o dist/video-js.min.css"]
# Rake::Shell["cd dist && gzip video.min.js && cd .."]
Rake::Log[version_number << " Built"]
end
desc "Build version for current '/c/' CDN copy and locked in version"
task :current do
Rake::Task["build:source"].execute
@ -78,6 +21,7 @@ namespace :build do
Rake::Shell["cp dist/video-js.swf dist/#{vsn}/video-js.swf"]
Rake::Shell["cp dist/video-js.png dist/#{vsn}/video-js.png"]
Rake::Shell["cp dist/demo.html dist/#{vsn}/demo.html"]
Rake::Shell["cp dist/captions.vtt dist/#{vsn}/captions.vtt"]
end
Rake::Shell["mkdir dist/video-js"]
@ -95,6 +39,7 @@ namespace :build do
Rake::Shell["cp dist/video-js.swf dist/video-js/video-js.swf"]
Rake::Shell["cp dist/video-js.png dist/video-js/video-js.png"]
Rake::Shell["cp dist/demo.html dist/video-js/demo.html"]
Rake::Shell["cp dist/captions.vtt dist/video-js/captions.vtt"]
Rake::Shell["cd dist && zip -r video-js-#{version_number}.zip video-js && cd .."]
@ -151,6 +96,7 @@ namespace :build do
Rake::Shell["cp build/release-files/README.md dist/README.md"]
Rake::Shell["cp build/release-files/demo.html dist/demo.html"]
Rake::Shell["cp build/release-files/captions.vtt dist/captions.vtt"]
Rake::Shell["cp LGPLv3-LICENSE.txt dist/LGPLv3-LICENSE.txt"]
Rake::Log["Minimizing JavaScript"]

View File

@ -1,44 +1,41 @@
WEBVTT
00:00.000 --> 00:01.110
(Heroic music playing for a seagull)
00:00.700 --> 00:04.110
Captions describe all relevant audio for the hearing impaired.
[ Heroic music playing for a seagull ]
00:01.110 --> 00:04.743
(Splash!!!)
00:04.500 --> 00:05.000
[ Splash!!! ]
00:04.743 --> 00:06.790
(Sploosh!!!)
00:05.100 --> 00:06.000
[ Sploosh!!! ]
00:06.790 --> 00:09.225
(Splash...splash...splash splash splash)
00:08.000 --> 00:09.225
[ Splash...splash...splash splash splash ]
00:09.225 --> 00:11.255
(Splash, Sploosh again)
00:10.525 --> 00:11.255
[ Splash, Sploosh again ]
00:11.255 --> 00:13.138
(splash splash)
00:13.500 --> 00:14.984
Dolphin: eeeEEEEEeeee!
00:13.138 --> 00:14.984
Dolphin Sqauck
00:14.984 --> 00:16.984
Dolphin: Squawk! eeeEEE?
00:14.984 --> 00:23.802
Splash splash sploosh
00:25.000 --> 00:28.284
[ A whole ton of splashes ]
00:23.802 --> 00:28.284
A whole ton of splashes
00:29.500 --> 00:31.000
Mine. Mine. Mine.
00:28.284 --> 00:32.550
sploosh sploosh wooosh
00:34.300 --> 00:36.000
Shark: Chomp
00:32.550 --> 00:35.203
CHOMP!!!
00:36.800 --> 00:37.900
Shark: CHOMP!!!
00:35.203 --> 00:37.861
chomp over there
00:37.861 --> 00:39.193
00:37.861 --> 00:41.193
EEEEEEOOOOOOOOOOWHALENOISE
00:39.193 --> 00:42.611
BIG SPLASH
00:42.593 --> 00:45.611
[ BIG SPLASH ]

View File

@ -3,10 +3,10 @@
<head>
<title>Video.js | HTML5 Video Player</title>
<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet" type="text/css">
<!-- Chang 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="http://vjs.zencdn.net/c/video.js"></script>
<script src="video.js"></script>
</head>
<body>
@ -17,6 +17,7 @@
<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' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<track kind="captions" src="captions.vtt" srclang="en" label="English" default>
</video>
</body>