mirror of
https://github.com/videojs/video.js.git
synced 2025-02-12 12:16:27 +02:00
Expand TOUCH_ENABLED and expose it publically
This commit is contained in:
parent
61bc016637
commit
c5a8cff129
@ -30,6 +30,7 @@ goog.exportSymbol('_V_', vjs);
|
|||||||
|
|
||||||
goog.exportSymbol('videojs.options', vjs.options);
|
goog.exportSymbol('videojs.options', vjs.options);
|
||||||
goog.exportSymbol('videojs.players', vjs.players);
|
goog.exportSymbol('videojs.players', vjs.players);
|
||||||
|
goog.exportSymbol('videojs.TOUCH_ENABLED', vjs.TOUCH_ENABLED);
|
||||||
|
|
||||||
// Allow external components to use global cache
|
// Allow external components to use global cache
|
||||||
goog.exportSymbol('videojs.cache', vjs.cache);
|
goog.exportSymbol('videojs.cache', vjs.cache);
|
||||||
|
@ -348,7 +348,7 @@ vjs.IS_OLD_ANDROID = vjs.IS_ANDROID && (/webkit/i).test(vjs.USER_AGENT) && vjs.A
|
|||||||
vjs.IS_FIREFOX = (/Firefox/i).test(vjs.USER_AGENT);
|
vjs.IS_FIREFOX = (/Firefox/i).test(vjs.USER_AGENT);
|
||||||
vjs.IS_CHROME = (/Chrome/i).test(vjs.USER_AGENT);
|
vjs.IS_CHROME = (/Chrome/i).test(vjs.USER_AGENT);
|
||||||
|
|
||||||
vjs.TOUCH_ENABLED = ('ontouchstart' in window);
|
vjs.TOUCH_ENABLED = (('ontouchstart' in window) || window.DocumentTouch && document instanceof window.DocumentTouch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get an element's attribute values, as defined on the HTML tag
|
* Get an element's attribute values, as defined on the HTML tag
|
||||||
|
@ -44,6 +44,7 @@ test('should export ready api call to public', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should export useful components to the public', function () {
|
test('should export useful components to the public', function () {
|
||||||
|
ok(videojs.TOUCH_ENABLED, 'Touch detection should be public');
|
||||||
ok(videojs.ControlBar, 'ControlBar should be public');
|
ok(videojs.ControlBar, 'ControlBar should be public');
|
||||||
ok(videojs.Button, 'Button should be public');
|
ok(videojs.Button, 'Button should be public');
|
||||||
ok(videojs.PlayToggle, 'PlayToggle should be public');
|
ok(videojs.PlayToggle, 'PlayToggle should be public');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user