mirror of
https://github.com/videojs/video.js.git
synced 2025-01-31 11:26:45 +02:00
Merge pull request #774 from gkatsev/touch
Expand TOUCH_ENABLED and expose it publically
This commit is contained in:
commit
1bef68a60b
@ -30,6 +30,7 @@ goog.exportSymbol('_V_', vjs);
|
||||
|
||||
goog.exportSymbol('videojs.options', vjs.options);
|
||||
goog.exportSymbol('videojs.players', vjs.players);
|
||||
goog.exportSymbol('videojs.TOUCH_ENABLED', vjs.TOUCH_ENABLED);
|
||||
|
||||
// Allow external components to use global 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_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
|
||||
|
@ -44,6 +44,7 @@ test('should export ready api call to 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.Button, 'Button should be public');
|
||||
ok(videojs.PlayToggle, 'PlayToggle should be public');
|
||||
|
Loading…
x
Reference in New Issue
Block a user