mirror of
https://github.com/videojs/video.js.git
synced 2025-02-18 12:24:02 +02:00
Exporting tech.setPoster(). Fixes #1028
This commit is contained in:
parent
d47435a18f
commit
2005fe2136
@ -114,6 +114,8 @@ goog.exportProperty(vjs.MediaTechController.prototype.features, 'volumeControl',
|
|||||||
goog.exportProperty(vjs.MediaTechController.prototype.features, 'fullscreenResize', vjs.MediaTechController.prototype.features.fullscreenResize);
|
goog.exportProperty(vjs.MediaTechController.prototype.features, 'fullscreenResize', vjs.MediaTechController.prototype.features.fullscreenResize);
|
||||||
goog.exportProperty(vjs.MediaTechController.prototype.features, 'progressEvents', vjs.MediaTechController.prototype.features.progressEvents);
|
goog.exportProperty(vjs.MediaTechController.prototype.features, 'progressEvents', vjs.MediaTechController.prototype.features.progressEvents);
|
||||||
goog.exportProperty(vjs.MediaTechController.prototype.features, 'timeupdateEvents', vjs.MediaTechController.prototype.features.timeupdateEvents);
|
goog.exportProperty(vjs.MediaTechController.prototype.features, 'timeupdateEvents', vjs.MediaTechController.prototype.features.timeupdateEvents);
|
||||||
|
goog.exportProperty(vjs.MediaTechController.prototype, 'setPoster', vjs.MediaTechController.prototype.setPoster);
|
||||||
|
|
||||||
|
|
||||||
goog.exportSymbol('videojs.Html5', vjs.Html5);
|
goog.exportSymbol('videojs.Html5', vjs.Html5);
|
||||||
goog.exportProperty(vjs.Html5, 'Events', vjs.Html5.Events);
|
goog.exportProperty(vjs.Html5, 'Events', vjs.Html5.Events);
|
||||||
|
@ -139,6 +139,14 @@ vjs.MediaTechController.prototype.onTap = function(){
|
|||||||
this.player().userActive(!this.player().userActive());
|
this.player().userActive(!this.player().userActive());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provide a default setPoster method for techs
|
||||||
|
*
|
||||||
|
* Poster support for techs should be optional, so we don't want techs to
|
||||||
|
* break if they don't have a way to set a poster.
|
||||||
|
*/
|
||||||
|
vjs.MediaTechController.prototype.setPoster = function(){};
|
||||||
|
|
||||||
vjs.MediaTechController.prototype.features = {
|
vjs.MediaTechController.prototype.features = {
|
||||||
'volumeControl': true,
|
'volumeControl': true,
|
||||||
|
|
||||||
|
@ -83,6 +83,16 @@ test('should be able to access expected component API methods', function() {
|
|||||||
ok(comp.buildCSSClass, 'buildCSSClass exists');
|
ok(comp.buildCSSClass, 'buildCSSClass exists');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should be able to access expected MediaTech API methods', function() {
|
||||||
|
var techProto = videojs.MediaTechController.prototype;
|
||||||
|
var html5Proto = videojs.Html5.prototype;
|
||||||
|
var flashProto = videojs.Flash.prototype;
|
||||||
|
|
||||||
|
ok(techProto.setPoster, 'setPoster should exist on the Media tech');
|
||||||
|
ok(html5Proto.setPoster, 'setPoster should exist on the HTML5 tech');
|
||||||
|
ok(flashProto.setPoster, 'setPoster should exist on the Flash tech');
|
||||||
|
});
|
||||||
|
|
||||||
test('should export ready api call to public', function() {
|
test('should export ready api call to public', function() {
|
||||||
var videoTag = PlayerTest.makeTag();
|
var videoTag = PlayerTest.makeTag();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user