2013-06-24 22:47:47 +03:00
|
|
|
var PlayerTest = {
|
|
|
|
makeTag: function(){
|
|
|
|
var videoTag = document.createElement('video');
|
|
|
|
videoTag.id = 'example_1';
|
|
|
|
videoTag.className = 'video-js vjs-default-skin';
|
|
|
|
return videoTag;
|
|
|
|
},
|
2013-11-27 03:53:23 +03:00
|
|
|
makePlayer: function(playerOptions, videoTag){
|
2013-06-24 22:47:47 +03:00
|
|
|
var player;
|
2013-11-27 03:53:23 +03:00
|
|
|
|
|
|
|
videoTag = videoTag || PlayerTest.makeTag();
|
2013-06-24 22:47:47 +03:00
|
|
|
|
|
|
|
var fixture = document.getElementById('qunit-fixture');
|
|
|
|
fixture.appendChild(videoTag);
|
|
|
|
|
|
|
|
playerOptions = playerOptions || {};
|
2014-09-02 22:39:08 +03:00
|
|
|
playerOptions['techOrder'] = playerOptions['techOrder'] || ['mediaFaker'];
|
2013-06-24 22:47:47 +03:00
|
|
|
|
|
|
|
return player = new videojs.Player(videoTag, playerOptions);
|
|
|
|
}
|
2013-11-27 03:53:23 +03:00
|
|
|
};
|
2014-10-16 22:59:41 +03:00
|
|
|
|
|
|
|
var TestHelpers = {
|
|
|
|
getComputedStyle: function(el, rule){
|
|
|
|
var val;
|
|
|
|
|
|
|
|
if(window.getComputedStyle){
|
|
|
|
val = window.getComputedStyle(el, null).getPropertyValue(rule);
|
|
|
|
// IE8
|
|
|
|
} else if(el.currentStyle){
|
|
|
|
val = el.currentStyle[rule];
|
|
|
|
}
|
|
|
|
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
};
|