-
+ data-caption-asset-path="/static/subs/"
+ data-autoplay="False"
+ >
diff --git a/common/lib/xmodule/xmodule/js/fixtures/videoalpha_all.html b/common/lib/xmodule/xmodule/js/fixtures/video_all.html
similarity index 100%
rename from common/lib/xmodule/xmodule/js/fixtures/videoalpha_all.html
rename to common/lib/xmodule/xmodule/js/fixtures/video_all.html
diff --git a/common/lib/xmodule/xmodule/js/fixtures/videoalpha_html5.html b/common/lib/xmodule/xmodule/js/fixtures/video_html5.html
similarity index 100%
rename from common/lib/xmodule/xmodule/js/fixtures/videoalpha_html5.html
rename to common/lib/xmodule/xmodule/js/fixtures/video_html5.html
diff --git a/common/lib/xmodule/xmodule/js/fixtures/videoalpha_no_captions.html b/common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html
similarity index 100%
rename from common/lib/xmodule/xmodule/js/fixtures/videoalpha_no_captions.html
rename to common/lib/xmodule/xmodule/js/fixtures/video_no_captions.html
diff --git a/common/lib/xmodule/xmodule/js/fixtures/videoalpha.html b/common/lib/xmodule/xmodule/js/fixtures/videoalpha.html
deleted file mode 100644
index 7e2616521a..0000000000
--- a/common/lib/xmodule/xmodule/js/fixtures/videoalpha.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
\ No newline at end of file
diff --git a/common/lib/xmodule/xmodule/js/spec/.gitignore b/common/lib/xmodule/xmodule/js/spec/.gitignore
index a8db2aae70..138742c14c 100644
--- a/common/lib/xmodule/xmodule/js/spec/.gitignore
+++ b/common/lib/xmodule/xmodule/js/spec/.gitignore
@@ -1,4 +1,4 @@
*.js
-# Tests for videoalpha are written in pure JavaScript.
-!videoalpha/*.js
+# Tests for video are written in pure JavaScript.
+!video/*.js
diff --git a/common/lib/xmodule/xmodule/js/spec/helper.coffee b/common/lib/xmodule/xmodule/js/spec/helper.coffee
index 2524305f10..1dfccdf521 100644
--- a/common/lib/xmodule/xmodule/js/spec/helper.coffee
+++ b/common/lib/xmodule/xmodule/js/spec/helper.coffee
@@ -111,19 +111,18 @@ jasmine.stubYoutubePlayer = ->
obj['getAvailablePlaybackRates'] = jasmine.createSpy('getAvailablePlaybackRates').andReturn [0.75, 1.0, 1.25, 1.5]
obj
-jasmine.stubVideoPlayerAlpha = (context, enableParts, html5=false) ->
- console.log('stubVideoPlayerAlpha called')
+jasmine.stubVideoPlayer = (context, enableParts, html5=false) ->
suite = context.suite
currentPartName = suite.description while suite = suite.parentSuite
if html5 == false
- loadFixtures 'videoalpha.html'
+ loadFixtures 'video.html'
else
- loadFixtures 'videoalpha_html5.html'
+ loadFixtures 'video_html5.html'
jasmine.stubRequests()
YT.Player = undefined
- window.OldVideoPlayerAlpha = undefined
+ window.OldVideoPlayer = undefined
jasmine.stubYoutubePlayer()
- return new VideoAlpha '#example', '.75:7tqY6eQzVhE,1.0:cogebirgzzM'
+ return new Video '#example', '.75:7tqY6eQzVhE,1.0:cogebirgzzM'
# Stub jQuery.cookie
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/general_spec.js b/common/lib/xmodule/xmodule/js/spec/video/general_spec.js
similarity index 87%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/general_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/general_spec.js
index 74abaf6c9e..accfba0dbe 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/general_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/general_spec.js
@@ -1,5 +1,5 @@
(function () {
- xdescribe('VideoAlpha', function () {
+ xdescribe('Video', function () {
var oldOTBD;
beforeEach(function () {
@@ -12,7 +12,7 @@
});
afterEach(function () {
- window.OldVideoPlayerAlpha = undefined;
+ window.OldVideoPlayer = undefined;
window.onYouTubePlayerAPIReady = undefined;
window.onHTML5PlayerAPIReady = undefined;
$('source').remove();
@@ -22,13 +22,13 @@
describe('constructor', function () {
describe('YT', function () {
beforeEach(function () {
- loadFixtures('videoalpha.html');
+ loadFixtures('video.html');
$.cookie.andReturn('0.75');
});
describe('by default', function () {
beforeEach(function () {
- this.state = new window.VideoAlpha('#example');
+ this.state = new window.Video('#example');
});
it('check videoType', function () {
@@ -36,7 +36,7 @@
});
it('reset the current video player', function () {
- expect(window.OldVideoPlayerAlpha).toBeUndefined();
+ expect(window.OldVideoPlayer).toBeUndefined();
});
it('set the elements', function () {
@@ -64,14 +64,14 @@
var state;
beforeEach(function () {
- loadFixtures('videoalpha_html5.html');
- this.stubVideoPlayerAlpha = jasmine.createSpy('VideoPlayerAlpha');
+ loadFixtures('video_html5.html');
+ this.stubVideoPlayer = jasmine.createSpy('VideoPlayer');
$.cookie.andReturn('0.75');
});
describe('by default', function () {
beforeEach(function () {
- state = new window.VideoAlpha('#example');
+ state = new window.Video('#example');
});
afterEach(function () {
@@ -83,7 +83,7 @@
});
it('reset the current video player', function () {
- expect(window.OldVideoPlayerAlpha).toBeUndefined();
+ expect(window.OldVideoPlayer).toBeUndefined();
});
it('set the elements', function () {
@@ -104,8 +104,8 @@
it('parse the videos if subtitles do not exist', function () {
var sub = '';
- $('#example').find('.videoalpha').data('sub', '');
- state = new window.VideoAlpha('#example');
+ $('#example').find('.video').data('sub', '');
+ state = new window.Video('#example');
expect(state.videos).toEqual({
'0.75': sub,
@@ -142,7 +142,7 @@
// is required.
describe('HTML5 API is available', function () {
beforeEach(function () {
- state = new VideoAlpha('#example');
+ state = new Video('#example');
});
afterEach(function () {
@@ -158,9 +158,9 @@
describe('youtubeId', function () {
beforeEach(function () {
- loadFixtures('videoalpha.html');
+ loadFixtures('video.html');
$.cookie.andReturn('1.0');
- state = new VideoAlpha('#example');
+ state = new Video('#example');
});
describe('with speed', function () {
@@ -180,8 +180,8 @@
describe('setSpeed', function () {
describe('YT', function () {
beforeEach(function () {
- loadFixtures('videoalpha.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video.html');
+ state = new Video('#example');
});
describe('when new speed is available', function () {
@@ -214,8 +214,8 @@
describe('HTML5', function () {
beforeEach(function () {
- loadFixtures('videoalpha_html5.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_html5.html');
+ state = new Video('#example');
});
describe('when new speed is available', function () {
@@ -249,8 +249,8 @@
describe('getDuration', function () {
beforeEach(function () {
- loadFixtures('videoalpha.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video.html');
+ state = new Video('#example');
});
it('return duration for current video', function () {
@@ -260,8 +260,8 @@
describe('log', function () {
beforeEach(function () {
- loadFixtures('videoalpha_html5.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_html5.html');
+ state = new Video('#example');
spyOn(Logger, 'log');
state.videoPlayer.log('someEvent', {
currentTime: 25,
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/html5_video_spec.js b/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js
similarity index 98%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/html5_video_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js
index 9a6c44052c..3c7f66a089 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/html5_video_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js
@@ -1,10 +1,10 @@
(function () {
- xdescribe('VideoAlpha HTML5Video', function () {
+ xdescribe('Video HTML5Video', function () {
var state, player, oldOTBD, playbackRates = [0.75, 1.0, 1.25, 1.5];
function initialize() {
- loadFixtures('videoalpha_html5.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_html5.html');
+ state = new Video('#example');
player = state.videoPlayer.player;
}
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/readme.md b/common/lib/xmodule/xmodule/js/spec/video/readme.md
similarity index 100%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/readme.md
rename to common/lib/xmodule/xmodule/js/spec/video/readme.md
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_caption_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js
similarity index 98%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/video_caption_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js
index 07c6c196c9..49e5df0e9a 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_caption_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js
@@ -1,10 +1,10 @@
(function() {
- xdescribe('VideoCaptionAlpha', function() {
+ xdescribe('VideoCaption', function() {
var state, videoPlayer, videoCaption, videoSpeedControl, oldOTBD;
function initialize() {
- loadFixtures('videoalpha_all.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_all.html');
+ state = new Video('#example');
videoPlayer = state.videoPlayer;
videoCaption = state.videoCaption;
videoSpeedControl = state.videoSpeedControl;
@@ -33,11 +33,11 @@
});
it('create the caption element', function() {
- expect($('.videoalpha')).toContain('ol.subtitles');
+ expect($('.video')).toContain('ol.subtitles');
});
it('add caption control to video player', function() {
- expect($('.videoalpha')).toContain('a.hide-subtitles');
+ expect($('.video')).toContain('a.hide-subtitles');
});
it('fetch the caption', function() {
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_control_spec.js
similarity index 96%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/video_control_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/video_control_spec.js
index b98fd1e413..d56af0febc 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_control_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/video_control_spec.js
@@ -1,10 +1,10 @@
(function() {
- xdescribe('VideoControlAlpha', function() {
+ xdescribe('VideoControl', function() {
var state, videoControl, oldOTBD;
function initialize() {
- loadFixtures('videoalpha_all.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_all.html');
+ state = new Video('#example');
videoControl = state.videoControl;
}
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_player_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
similarity index 98%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/video_player_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
index 5e4e40cdec..e92f251f70 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_player_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
@@ -1,15 +1,15 @@
(function() {
- xdescribe('VideoPlayerAlpha', function() {
+ xdescribe('VideoPlayer', function() {
var state, videoPlayer, player, videoControl, videoCaption, videoProgressSlider, videoSpeedControl, videoVolumeControl, oldOTBD;
function initialize(fixture) {
if (typeof fixture === 'undefined') {
- loadFixtures('videoalpha_all.html');
+ loadFixtures('video_all.html');
} else {
loadFixtures(fixture);
}
- state = new VideoAlpha('#example');
+ state = new Video('#example');
videoPlayer = state.videoPlayer;
player = videoPlayer.player;
videoControl = state.videoControl;
@@ -20,7 +20,7 @@
}
function initializeYouTube() {
- initialize('videoalpha.html');
+ initialize('video.html');
}
beforeEach(function () {
@@ -71,9 +71,9 @@
expect(videoProgressSlider.el).toHaveClass('slider');
});
- // All the toHandleWith() expect tests are not necessary for this version of Video Alpha.
+ // All the toHandleWith() expect tests are not necessary for this version of Video.
// jQuery event system is not used to trigger and invoke methods. This is an artifact from
- // previous version of Video Alpha.
+ // previous version of Video.
});
it('create Youtube player', function() {
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_progress_slider_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_progress_slider_spec.js
similarity index 95%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/video_progress_slider_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/video_progress_slider_spec.js
index f0e177d5d7..b5d0ae029c 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_progress_slider_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/video_progress_slider_spec.js
@@ -1,10 +1,10 @@
(function() {
- xdescribe('VideoProgressSliderAlpha', function() {
+ xdescribe('VideoProgressSlider', function() {
var state, videoPlayer, videoProgressSlider, oldOTBD;
function initialize() {
- loadFixtures('videoalpha_all.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_all.html');
+ state = new Video('#example');
videoPlayer = state.videoPlayer;
videoProgressSlider = state.videoProgressSlider;
}
@@ -53,7 +53,7 @@
expect(videoProgressSlider.slider).toBeUndefined();
// We can't expect $.fn.slider not to have been called,
- // because sliders are used in other parts of VideoAlpha.
+ // because sliders are used in other parts of Video.
});
});
});
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_quality_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js
similarity index 87%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/video_quality_control_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js
index 7126dc5921..988e28b74f 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_quality_control_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/video_quality_control_spec.js
@@ -1,10 +1,10 @@
(function() {
- xdescribe('VideoQualityControlAlpha', function() {
+ xdescribe('VideoQualityControl', function() {
var state, videoControl, videoQualityControl, oldOTBD;
function initialize() {
- loadFixtures('videoalpha.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video.html');
+ state = new Video('#example');
videoControl = state.videoControl;
videoQualityControl = state.videoQualityControl;
}
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_speed_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
similarity index 96%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/video_speed_control_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
index c40a9c7295..21d65fbc5b 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_speed_control_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/video_speed_control_spec.js
@@ -1,10 +1,10 @@
(function() {
- xdescribe('VideoSpeedControlAlpha', function() {
+ xdescribe('VideoSpeedControl', function() {
var state, videoPlayer, videoControl, videoSpeedControl;
function initialize() {
- loadFixtures('videoalpha_all.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_all.html');
+ state = new Video('#example');
videoPlayer = state.videoPlayer;
videoControl = state.videoControl;
videoSpeedControl = state.videoSpeedControl;
diff --git a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_volume_control_spec.js b/common/lib/xmodule/xmodule/js/spec/video/video_volume_control_spec.js
similarity index 96%
rename from common/lib/xmodule/xmodule/js/spec/videoalpha/video_volume_control_spec.js
rename to common/lib/xmodule/xmodule/js/spec/video/video_volume_control_spec.js
index 872b1fe18e..17e6d82c12 100644
--- a/common/lib/xmodule/xmodule/js/spec/videoalpha/video_volume_control_spec.js
+++ b/common/lib/xmodule/xmodule/js/spec/video/video_volume_control_spec.js
@@ -1,10 +1,10 @@
(function() {
- xdescribe('VideoVolumeControlAlpha', function() {
+ xdescribe('VideoVolumeControl', function() {
var state, videoControl, videoVolumeControl, oldOTBD;
function initialize() {
- loadFixtures('videoalpha_all.html');
- state = new VideoAlpha('#example');
+ loadFixtures('video_all.html');
+ state = new Video('#example');
videoControl = state.videoControl;
videoVolumeControl = state.videoVolumeControl;
}