mirror of
https://github.com/videojs/video.js.git
synced 2025-03-05 15:16:06 +02:00
Merge pull request #702 from dmlap/feature/expose-volume-menu
Feature/expose volume menu
This commit is contained in:
commit
6418531d0c
@ -85,6 +85,7 @@ goog.exportSymbol('videojs.SeekHandle', vjs.SeekHandle);
|
||||
goog.exportSymbol('videojs.VolumeControl', vjs.VolumeControl);
|
||||
goog.exportSymbol('videojs.VolumeBar', vjs.VolumeBar);
|
||||
goog.exportSymbol('videojs.VolumeLevel', vjs.VolumeLevel);
|
||||
goog.exportSymbol('videojs.VolumeMenuButton', vjs.VolumeMenuButton);
|
||||
goog.exportSymbol('videojs.VolumeHandle', vjs.VolumeHandle);
|
||||
goog.exportSymbol('videojs.MuteToggle', vjs.MuteToggle);
|
||||
goog.exportSymbol('videojs.PosterImage', vjs.PosterImage);
|
||||
|
@ -41,6 +41,35 @@ test('should export ready api call to public', function() {
|
||||
player.dispose();
|
||||
});
|
||||
|
||||
test('should export useful components to the public', function () {
|
||||
ok(videojs.ControlBar, 'ControlBar should be public');
|
||||
ok(videojs.Button, 'Button should be public');
|
||||
ok(videojs.PlayToggle, 'PlayToggle should be public');
|
||||
ok(videojs.FullscreenToggle, 'FullscreenToggle should be public');
|
||||
ok(videojs.BigPlayButton, 'BigPlayButton should be public');
|
||||
ok(videojs.LoadingSpinner, 'LoadingSpinner should be public');
|
||||
ok(videojs.CurrentTimeDisplay, 'CurrentTimeDisplay should be public');
|
||||
ok(videojs.DurationDisplay, 'DurationDisplay should be public');
|
||||
ok(videojs.TimeDivider, 'TimeDivider should be public');
|
||||
ok(videojs.RemainingTimeDisplay, 'RemainingTimeDisplay should be public');
|
||||
ok(videojs.Slider, 'Slider should be public');
|
||||
ok(videojs.ProgressControl, 'ProgressControl should be public');
|
||||
ok(videojs.SeekBar, 'SeekBar should be public');
|
||||
ok(videojs.LoadProgressBar, 'LoadProgressBar should be public');
|
||||
ok(videojs.PlayProgressBar, 'PlayProgressBar should be public');
|
||||
ok(videojs.SeekHandle, 'SeekHandle should be public');
|
||||
ok(videojs.VolumeControl, 'VolumeControl should be public');
|
||||
ok(videojs.VolumeBar, 'VolumeBar should be public');
|
||||
ok(videojs.VolumeLevel, 'VolumeLevel should be public');
|
||||
ok(videojs.VolumeMenuButton, 'VolumeMenuButton should be public');
|
||||
ok(videojs.VolumeHandle, 'VolumeHandle should be public');
|
||||
ok(videojs.MuteToggle, 'MuteToggle should be public');
|
||||
ok(videojs.PosterImage, 'PosterImage should be public');
|
||||
ok(videojs.Menu, 'Menu should be public');
|
||||
ok(videojs.MenuItem, 'MenuItem should be public');
|
||||
ok(videojs.MenuButton, 'MenuButton should be public');
|
||||
});
|
||||
|
||||
test('should be able to initialize player twice on the same tag using string reference', function() {
|
||||
var videoTag = PlayerTest.makeTag();
|
||||
var id = videoTag.id;
|
||||
|
@ -130,8 +130,10 @@ test('should get the right style values for an element', function(){
|
||||
el.style.height = '100%';
|
||||
el.style.width = '123px';
|
||||
|
||||
ok(vjs.getComputedDimension(el, 'height') === '1000px');
|
||||
ok(vjs.getComputedDimension(el, 'width') === '123px');
|
||||
// integer px values may get translated int very-close floats in Chrome/OS X
|
||||
// so round the dimensions to ignore this
|
||||
equal(Math.round(parseFloat(vjs.getComputedDimension(el, 'height'))), 1000, 'the computed height is equal');
|
||||
equal(Math.round(parseFloat(vjs.getComputedDimension(el, 'width'))), 123, 'the computed width is equal');
|
||||
});
|
||||
|
||||
test('should insert an element first in another', function(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user