-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdom.js
More file actions
120 lines (105 loc) · 3.8 KB
/
dom.js
File metadata and controls
120 lines (105 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
"use strict";
(function() {
window.dom = {
window: $( window ),
doc: $( document ),
body: $( document.body ),
title: $( "title" ),
// Main
fileplayer: $( ".fileplayer" ),
// Screen
screen: $( ".screen" ),
// Image
screenImage: $( ".screen .image" ),
screenBrightness: $( ".screen .brightnessWrapper" ),
screenVideo: $( ".screen video.webaudio" ),
screenVideoDistant: $( ".screen video:not(.webaudio)" ),
screenCanvas2d: $( ".screen canvas.2d" ),
screenCanvasWebgl: $( ".screen canvas.webgl" ),
// Filename, subtitle's cues, shortcut description
screenFilename: $( ".screen .filenameWrapper" ),
screenFilenameText: $( ".screen .filename" ),
screenShortcutText: $( ".screen .shortcutDesc" ),
screenCueWrapper: $( ".screen .cues" ),
screenCue: $( ".screen .cues > *" ),
numVersion: $( ".screen .num" ),
// Playlist
playlist: $( ".playlist" ),
playlistExtendWidth: $( ".playlist .extendWidth" ),
playlistContent: $( ".playlist .content" ),
playlistList: $( ".playlist .list" ),
playlistInputFile: $( ".playlist input[type='file']" ),
// Nav
playlistNav: $( ".playlist nav" ),
playlistNavIndex: $( ".playlist nav .current" ),
playlistNavTotal: $( ".playlist nav .total" ),
playlistForm: $( ".playlist nav form" ),
playlistInputURL: $( ".playlist nav input" ),
playlistShuffleBtn: $( ".playlist nav .shuffle" ),
playlistRepeatBtn: $( ".playlist nav .repeat" ),
playlistCloseBtn: $( ".playlist nav .close" ),
// ctrl
ctrl: $( ".ctrl" ),
// Slider position
// CurrentTime
ctrlCutesliderPosition: $( ".ctrl .cuteslider.position" ),
ctrlSliderPosTrack: $( ".ctrl .cuteslider.position .cuteslider-track" ),
ctrlInputRangePosition: $( ".ctrl .cuteslider.position input" ),
// Thumbnail
ctrlThumbnail: $( ".ctrl .thumbnail" ),
ctrlThumbnailVideo: $( ".ctrl .thumbnail video" ),
ctrlThumbnailCanvas: $( ".ctrl .thumbnail canvas" ),
// Left
// Open, stop, prev, play/pause, next
ctrlOpenBtn: $( ".ctrl .open" ),
ctrlPlayBtn: $( ".ctrl .play" ),
ctrlStopBtn: $( ".ctrl .stop" ),
ctrlPrevBtn: $( ".ctrl .prev" ),
ctrlNextBtn: $( ".ctrl .next" ),
// Volume
ctrlVolumeIcon: $( ".ctrl .volume .fa" ),
ctrlVolumeSlider: $( ".ctrl .volume input" ),
// Time
ctrlTimeText: $( ".ctrl .txt.position" ),
ctrlTimeCurrent: $( ".ctrl .position .current" ),
ctrlTimeRemaining: $( ".ctrl .position .remaining" ),
ctrlTimeDuration: $( ".ctrl .position .duration" ),
// Right
// Video 360
ctrl360Btn: $( ".ctrl .btn.video360" ),
// Frame capture
ctrlCaptureBtn: $( ".ctrl .btn.capture" ),
// Visualisations
ctrlVisualBtn: $( ".ctrl .btn.visu" ),
ctrlVisualIcon: $( ".ctrl .visu .fa" ),
ctrlVisualToggle: $( ".ctrl .visu .slidebutton" ),
ctrlVisualCheckbox: $( ".ctrl .visu input" ),
ctrlVisualList: $( ".ctrl .visu ul" ),
// Brightness
ctrlBrightnessIcon: $( ".ctrl .brightness > .fa" ),
ctrlBrightnessSlider: $( ".ctrl .brightness input" ),
ctrlBrightnessValue: $( ".ctrl .brightness .val" ),
// Speed
ctrlSpeedIcon: $( ".ctrl .speed > .fa" ),
ctrlSpeedSlider: $( ".ctrl .speed input" ),
ctrlSpeedValue: $( ".ctrl .speed .val" ),
// Subtitles
ctrlSubtitlesBtn: $( ".ctrl .btn.subtitles" ),
ctrlSubtitlesIcon: $( ".ctrl .subtitles .fa" ),
ctrlSubtitlesToggle: $( ".ctrl .subtitles .slidebutton" ),
ctrlSubtitlesCheckbox: $( ".ctrl .subtitles input" ),
ctrlSubtitlesList: $( ".ctrl .subtitles ul" ),
// Playlist toggle button
ctrlPlaylistBtn: $( ".ctrl .btn-playlist" ),
// Fullscreen
ctrlFullscreenBtn: $( ".ctrl .btn.fullscreen" )
};
// Make sure all the selections above works.
for ( var key in dom ) {
if ( dom[ key ].length === 0 ) {
console.error( "dom." + key + " is empty." );
}
}
// This can be considered like NULL for jQuery.
dom.empty = $();
})();