romo-av 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/assets/js/romo-av/dropdown_video.js +154 -176
- data/assets/js/romo-av/modal_video.js +160 -182
- data/assets/js/romo-av/video.js +172 -181
- data/lib/romo-av/version.rb +1 -1
- data/romo-av.gemspec +1 -1
- metadata +3 -3
@@ -1,312 +1,290 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
return new RomoModalVideo(element);
|
4
|
-
});
|
5
|
-
}
|
1
|
+
var RomoModalVideo = RomoComponent(function(elem) {
|
2
|
+
this.elem = elem;
|
6
3
|
|
7
|
-
|
8
|
-
this.
|
4
|
+
this.doInit();
|
5
|
+
this._bindElem();
|
9
6
|
|
10
|
-
this.
|
11
|
-
|
7
|
+
Romo.trigger(this.elem, 'romoModalVideo:ready', [this]);
|
8
|
+
});
|
12
9
|
|
13
|
-
|
14
|
-
this.doBindVideo();
|
15
|
-
this.elem.on('modal:loadBodySuccess', $.proxy(function(e, data, modal) {
|
16
|
-
this.doBindVideo();
|
17
|
-
}, this));
|
10
|
+
// private
|
18
11
|
|
19
|
-
|
20
|
-
this.
|
21
|
-
|
12
|
+
RomoModalVideo.prototype._bindElem = function() {
|
13
|
+
this._bindModal();
|
14
|
+
this._bindVideo();
|
22
15
|
|
23
|
-
|
24
|
-
|
16
|
+
Romo.on(this.elem, 'romoModal:loadBodySuccess', Romo.proxy(function(e, data, romoModal) {
|
17
|
+
this._bindVideo();
|
18
|
+
}, this));
|
25
19
|
}
|
26
20
|
|
27
|
-
RomoModalVideo.prototype.
|
28
|
-
if (this.elem
|
29
|
-
this.elem
|
21
|
+
RomoModalVideo.prototype._bindModal = function() {
|
22
|
+
if (Romo.data(this.elem, 'romo-modal-clear-content') === undefined) {
|
23
|
+
Romo.setData(this.elem, 'romo-modal-clear-content', 'true');
|
30
24
|
}
|
31
25
|
|
32
|
-
|
26
|
+
this.romoModal = new RomoModal(this.elem);
|
33
27
|
|
34
|
-
|
35
|
-
this.modal.doPlacePopupElem();
|
36
|
-
}, this));
|
28
|
+
// modal/video interactions
|
37
29
|
|
38
|
-
this.elem
|
39
|
-
|
40
|
-
// mode, we don't care about them
|
41
|
-
setTimeout($.proxy(function() {
|
42
|
-
this.modal.doUnBindWindowBodyClick();
|
43
|
-
this.modal.doUnBindWindowBodyKeyUp();
|
44
|
-
this.modal.doUnBindElemKeyUp();
|
45
|
-
}, this), 1000);
|
46
|
-
}, this));
|
47
|
-
this.elem.on('modalVideo:video:exitFullscreen', $.proxy(function(e, videoObj, video, modalVideo) {
|
48
|
-
// wait 1 sec then turn on modal body elem events - since we are no longer
|
49
|
-
// in fullscreen mode, we need to care about them again
|
50
|
-
setTimeout($.proxy(function() {
|
51
|
-
this.modal.doBindWindowBodyClick();
|
52
|
-
this.modal.doBindWindowBodyKeyUp();
|
53
|
-
this.modal.doBindElemKeyUp();
|
54
|
-
}, this), 1000);
|
30
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:loadedmetadata', Romo.proxy(function(e, videoObj, romoVideo, romoModalVideo) {
|
31
|
+
this.romoModal.doPlacePopupElem();
|
55
32
|
}, this));
|
56
33
|
|
57
34
|
// event proxies
|
58
35
|
|
59
|
-
this.elem
|
60
|
-
this.elem
|
36
|
+
Romo.on(this.elem, 'romoModal:ready', Romo.proxy(function(e, romoModal) {
|
37
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:ready', [romoModal, this]);
|
61
38
|
}, this));
|
62
|
-
this.elem
|
63
|
-
this.elem
|
39
|
+
Romo.on(this.elem, 'romoModal:toggle', Romo.proxy(function(e, romoModal) {
|
40
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:toggle', [romoModal, this]);
|
64
41
|
}, this));
|
65
|
-
this.elem
|
66
|
-
this.elem
|
42
|
+
Romo.on(this.elem, 'romoModal:popupOpen', Romo.proxy(function(e, romoModal) {
|
43
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:popupOpen', [romoModal, this]);
|
67
44
|
}, this));
|
68
|
-
this.elem
|
69
|
-
this.elem
|
45
|
+
Romo.on(this.elem, 'romoModal:popupClose', Romo.proxy(function(e, romoModal) {
|
46
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:popupClose', [romoModal, this]);
|
70
47
|
}, this));
|
71
|
-
this.elem
|
72
|
-
this.elem
|
48
|
+
Romo.on(this.elem, 'romoModal:dragStart', Romo.proxy(function(e, romoModal) {
|
49
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:dragStart', [romoModal, this]);
|
73
50
|
}, this));
|
74
|
-
this.elem
|
75
|
-
this.elem
|
51
|
+
Romo.on(this.elem, 'romoModal:dragMove', Romo.proxy(function(e, placeX, placeY, romoModal) {
|
52
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:dragMove', [placeX, placeY, romoModal, this]);
|
76
53
|
}, this));
|
77
|
-
this.elem
|
78
|
-
this.elem
|
54
|
+
Romo.on(this.elem, 'romoModal:dragStop', Romo.proxy(function(e, romoModal) {
|
55
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:dragStop', [romoModal, this]);
|
79
56
|
}, this));
|
80
|
-
this.elem
|
81
|
-
this.elem
|
57
|
+
Romo.on(this.elem, 'romoModal:loadBodyStart', Romo.proxy(function(e, romoModal) {
|
58
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:loadBodyStart', [romoModal, this]);
|
82
59
|
}, this));
|
83
|
-
this.elem
|
84
|
-
this.elem
|
60
|
+
Romo.on(this.elem, 'romoModal:loadBodySuccess', Romo.proxy(function(e, data, romoModal) {
|
61
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:loadBodySuccess', [data, romoModal, this]);
|
85
62
|
}, this));
|
86
|
-
this.elem
|
87
|
-
this.elem
|
63
|
+
Romo.on(this.elem, 'romoModal:loadBodyError', Romo.proxy(function(e, xhr, romoModal) {
|
64
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:loadBodyError', [xhr, romoModal, this]);
|
88
65
|
}, this));
|
89
|
-
this.elem
|
90
|
-
this.elem
|
66
|
+
Romo.on(this.elem, 'romoModal:dismiss', Romo.proxy(function(e, romoModal) {
|
67
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoModal:dismiss', [romoModal, this]);
|
91
68
|
}, this));
|
92
69
|
}
|
93
70
|
|
94
|
-
RomoModalVideo.prototype.
|
95
|
-
|
71
|
+
RomoModalVideo.prototype._bindVideo = function() {
|
72
|
+
this.romoVideo = undefined;
|
96
73
|
|
97
|
-
this.
|
98
|
-
|
74
|
+
var videoElem = Romo.find(this.romoModal.popupElem, '[data-romo-video-auto="modalVideo"]')[0];
|
75
|
+
if (videoElem !== undefined) {
|
76
|
+
this._bindVideoElemEvents(videoElem);
|
77
|
+
this._bindModalVideoTriggerEvents();
|
99
78
|
|
100
|
-
|
79
|
+
this.romoVideo = new RomoVideo(videoElem);
|
80
|
+
}
|
101
81
|
}
|
102
82
|
|
103
|
-
// private
|
104
|
-
|
105
83
|
RomoModalVideo.prototype._bindVideoElemEvents = function(videoElem) {
|
106
84
|
// playback events
|
107
85
|
|
108
|
-
|
109
|
-
this.elem
|
86
|
+
Romo.on(videoElem, 'romoVideo:play', Romo.proxy(function(e, videoObj, romoVideo) {
|
87
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:play', [videoObj, romoVideo, this]);
|
110
88
|
}, this));
|
111
|
-
|
112
|
-
this.elem
|
89
|
+
Romo.on(videoElem, 'romoVideo:pause', Romo.proxy(function(e, videoObj, romoVideo) {
|
90
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:pause', [videoObj, romoVideo, this]);
|
113
91
|
}, this));
|
114
92
|
|
115
93
|
// state events
|
116
94
|
|
117
|
-
|
118
|
-
this.elem
|
95
|
+
Romo.on(videoElem, 'romoVideo:playing', Romo.proxy(function(e, videoObj, romoVideo) {
|
96
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:playing', [videoObj, romoVideo, this]);
|
119
97
|
}, this));
|
120
|
-
|
121
|
-
this.elem
|
98
|
+
Romo.on(videoElem, 'romoVideo:waiting', Romo.proxy(function(e, videoObj, romoVideo) {
|
99
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:waiting', [videoObj, romoVideo, this]);
|
122
100
|
}, this));
|
123
|
-
|
124
|
-
this.elem
|
101
|
+
Romo.on(videoElem, 'romoVideo:ended', Romo.proxy(function(e, videoObj, romoVideo) {
|
102
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:ended', [videoObj, romoVideo, this]);
|
125
103
|
}, this));
|
126
|
-
|
127
|
-
this.elem
|
104
|
+
Romo.on(videoElem, 'romoVideo:emptied', Romo.proxy(function(e, videoObj, romoVideo) {
|
105
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:emptied', [videoObj, romoVideo, this]);
|
128
106
|
}, this));
|
129
|
-
|
130
|
-
this.elem
|
107
|
+
Romo.on(videoElem, 'romoVideo:error', Romo.proxy(function(e, videoObj, romoVideo) {
|
108
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:error', [videoObj, romoVideo, this]);
|
131
109
|
}, this));
|
132
|
-
|
133
|
-
this.elem
|
110
|
+
Romo.on(videoElem, 'romoVideo:stalled', Romo.proxy(function(e, videoObj, romoVideo) {
|
111
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:stalled', [videoObj, romoVideo, this]);
|
134
112
|
}, this));
|
135
|
-
|
136
|
-
this.elem
|
113
|
+
Romo.on(videoElem, 'romoVideo:suspend', Romo.proxy(function(e, videoObj, romoVideo) {
|
114
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:suspend', [videoObj, romoVideo, this]);
|
137
115
|
}, this));
|
138
116
|
|
139
117
|
// status events
|
140
118
|
|
141
|
-
|
142
|
-
this.elem
|
119
|
+
Romo.on(videoElem, 'romoVideo:progress', Romo.proxy(function(e, videoObj, romoVideo) {
|
120
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:progress', [videoObj, romoVideo, this]);
|
143
121
|
}, this));
|
144
|
-
|
145
|
-
this.elem
|
122
|
+
Romo.on(videoElem, 'romoVideo:timeupdate', Romo.proxy(function(e, videoObj, romoVideo) {
|
123
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:timeupdate', [videoObj, romoVideo, this]);
|
146
124
|
}, this));
|
147
125
|
|
148
126
|
// settings events
|
149
127
|
|
150
|
-
|
151
|
-
this.elem
|
128
|
+
Romo.on(videoElem, 'romoVideo:volumechange', Romo.proxy(function(e, videoObj, romoVideo) {
|
129
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:volumechange', [videoObj, romoVideo, this]);
|
152
130
|
}, this));
|
153
|
-
|
154
|
-
this.elem
|
131
|
+
Romo.on(videoElem, 'romoVideo:durationchange', Romo.proxy(function(e, videoObj, romoVideo) {
|
132
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:durationchange', [videoObj, romoVideo, this]);
|
155
133
|
}, this));
|
156
|
-
|
157
|
-
this.elem
|
134
|
+
Romo.on(videoElem, 'romoVideo:ratechange', Romo.proxy(function(e, videoObj, romoVideo) {
|
135
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:ratechange', [videoObj, romoVideo, this]);
|
158
136
|
}, this));
|
159
137
|
|
160
138
|
// fullscreen events
|
161
139
|
|
162
|
-
|
163
|
-
this.elem
|
140
|
+
Romo.on(videoElem, 'romoVideo:enterFullscreen', Romo.proxy(function(e, videoObj, romoVideo) {
|
141
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:enterFullscreen', [videoObj, romoVideo, this]);
|
164
142
|
}, this));
|
165
|
-
|
166
|
-
this.elem
|
143
|
+
Romo.on(videoElem, 'romoVideo:exitFullscreen', Romo.proxy(function(e, videoObj, romoVideo) {
|
144
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:exitFullscreen', [videoObj, romoVideo, this]);
|
167
145
|
}, this));
|
168
|
-
|
169
|
-
this.elem
|
146
|
+
Romo.on(videoElem, 'romoVideo:fullscreenChange', Romo.proxy(function(e, videoObj, romoVideo) {
|
147
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:fullscreenChange', [videoObj, romoVideo, this]);
|
170
148
|
}, this));
|
171
149
|
|
172
150
|
// load events
|
173
151
|
|
174
|
-
|
175
|
-
this.elem
|
152
|
+
Romo.on(videoElem, 'romoVideo:loadstart', Romo.proxy(function(e, videoObj, romoVideo) {
|
153
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:loadstart', [videoObj, romoVideo, this]);
|
176
154
|
}, this));
|
177
|
-
|
178
|
-
this.elem
|
155
|
+
Romo.on(videoElem, 'romoVideo:loadedmetadata', Romo.proxy(function(e, videoObj, romoVideo) {
|
156
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:loadedmetadata', [videoObj, romoVideo, this]);
|
179
157
|
}, this));
|
180
|
-
|
181
|
-
this.elem
|
158
|
+
Romo.on(videoElem, 'romoVideo:loadeddata', Romo.proxy(function(e, videoObj, romoVideo) {
|
159
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:loadeddata', [videoObj, romoVideo, this]);
|
182
160
|
}, this));
|
183
|
-
|
184
|
-
this.elem
|
161
|
+
Romo.on(videoElem, 'romoVideo:canplay', Romo.proxy(function(e, videoObj, romoVideo) {
|
162
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:canplay', [videoObj, romoVideo, this]);
|
185
163
|
}, this));
|
186
|
-
|
187
|
-
this.elem
|
164
|
+
Romo.on(videoElem, 'romoVideo:canplaythrough', Romo.proxy(function(e, videoObj, romoVideo) {
|
165
|
+
Romo.trigger(this.elem, 'romoModalVideo:romoVideo:canplaythrough', [videoObj, romoVideo, this]);
|
188
166
|
}, this));
|
189
167
|
}
|
190
168
|
|
191
169
|
RomoModalVideo.prototype._bindModalVideoTriggerEvents = function() {
|
192
170
|
// playback triggers
|
193
171
|
|
194
|
-
this.elem
|
195
|
-
if (this.
|
196
|
-
this.
|
172
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerPlay', Romo.proxy(function(e) {
|
173
|
+
if (this.romoVideo != undefined) {
|
174
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerPlay', []);
|
197
175
|
}
|
198
176
|
}, this));
|
199
|
-
this.elem
|
200
|
-
if (this.
|
201
|
-
this.
|
177
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerPause', Romo.proxy(function(e) {
|
178
|
+
if (this.romoVideo != undefined) {
|
179
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerPause', []);
|
202
180
|
}
|
203
181
|
}, this));
|
204
|
-
this.elem
|
205
|
-
if (this.
|
206
|
-
this.
|
182
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerTogglePlay', Romo.proxy(function(e) {
|
183
|
+
if (this.romoVideo != undefined) {
|
184
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerTogglePlay', []);
|
207
185
|
}
|
208
186
|
}, this));
|
209
|
-
this.elem
|
210
|
-
if (this.
|
211
|
-
this.
|
187
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerSetPlaybackToTime', Romo.proxy(function(e, secondNum) {
|
188
|
+
if (this.romoVideo != undefined) {
|
189
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerSetPlaybackToTime', [secondNum]);
|
212
190
|
}
|
213
191
|
}, this));
|
214
|
-
this.elem
|
215
|
-
if (this.
|
216
|
-
this.
|
192
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerSetPlaybackToFrame', Romo.proxy(function(e, frameNum) {
|
193
|
+
if (this.romoVideo != undefined) {
|
194
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerSetPlaybackToFrame', [frameNum]);
|
217
195
|
}
|
218
196
|
}, this));
|
219
|
-
this.elem
|
220
|
-
if (this.
|
221
|
-
this.
|
197
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerSetPlaybackToPercent', Romo.proxy(function(e, percent) {
|
198
|
+
if (this.romoVideo != undefined) {
|
199
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerSetPlaybackToPercent', [percent]);
|
222
200
|
}
|
223
201
|
}, this));
|
224
|
-
this.elem
|
225
|
-
if (this.
|
226
|
-
this.
|
202
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerModPlaybackByTime', Romo.proxy(function(e, secondsCount) {
|
203
|
+
if (this.romoVideo != undefined) {
|
204
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerModPlaybackByTime', [secondsCount]);
|
227
205
|
}
|
228
206
|
}, this));
|
229
|
-
this.elem
|
230
|
-
if (this.
|
231
|
-
this.
|
207
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerModPlaybackByFrames', Romo.proxy(function(e, frameCount) {
|
208
|
+
if (this.romoVideo != undefined) {
|
209
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerModPlaybackByFrames', [frameCount]);
|
232
210
|
}
|
233
211
|
}, this));
|
234
|
-
this.elem
|
235
|
-
if (this.
|
236
|
-
this.
|
212
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerModPlaybackByPercent', Romo.proxy(function(e, percent) {
|
213
|
+
if (this.romoVideo != undefined) {
|
214
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerModPlaybackByPercent', [percent]);
|
237
215
|
}
|
238
216
|
}, this));
|
239
217
|
|
240
218
|
// settings triggers
|
241
219
|
|
242
|
-
this.elem
|
243
|
-
if (this.
|
244
|
-
this.
|
220
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerMute', Romo.proxy(function(e) {
|
221
|
+
if (this.romoVideo != undefined) {
|
222
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerMute', []);
|
245
223
|
}
|
246
224
|
}, this));
|
247
|
-
this.elem
|
248
|
-
if (this.
|
249
|
-
this.
|
225
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerUnmute', Romo.proxy(function(e) {
|
226
|
+
if (this.romoVideo != undefined) {
|
227
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerUnmute', []);
|
250
228
|
}
|
251
229
|
}, this));
|
252
|
-
this.elem
|
253
|
-
if (this.
|
254
|
-
this.
|
230
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerToggleMute', Romo.proxy(function(e) {
|
231
|
+
if (this.romoVideo != undefined) {
|
232
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerToggleMute', []);
|
255
233
|
}
|
256
234
|
}, this));
|
257
|
-
this.elem
|
258
|
-
if (this.
|
259
|
-
this.
|
235
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerSetVolumeToPercent', Romo.proxy(function(e, percent) {
|
236
|
+
if (this.romoVideo != undefined) {
|
237
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerSetVolumeToPercent', [percent]);
|
260
238
|
}
|
261
239
|
}, this));
|
262
|
-
this.elem
|
263
|
-
if (this.
|
264
|
-
this.
|
240
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerModVolumeByPercent', Romo.proxy(function(e, percent) {
|
241
|
+
if (this.romoVideo != undefined) {
|
242
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerModVolumeByPercent', [percent]);
|
265
243
|
}
|
266
244
|
}, this));
|
267
|
-
this.elem
|
268
|
-
if (this.
|
269
|
-
this.
|
245
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerSetPlaybackRate', Romo.proxy(function(e, rate) {
|
246
|
+
if (this.romoVideo != undefined) {
|
247
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerSetPlaybackRate', [rate]);
|
270
248
|
}
|
271
249
|
}, this));
|
272
|
-
this.elem
|
273
|
-
if (this.
|
274
|
-
this.
|
250
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerModPlaybackRate', Romo.proxy(function(e, rate) {
|
251
|
+
if (this.romoVideo != undefined) {
|
252
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerModPlaybackRate', [rate]);
|
275
253
|
}
|
276
254
|
}, this));
|
277
255
|
|
278
256
|
// fullscreen triggers
|
279
257
|
|
280
|
-
this.elem
|
281
|
-
if (this.
|
282
|
-
this.
|
258
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerEnterFullscreen', Romo.proxy(function(e) {
|
259
|
+
if (this.romoVideo != undefined) {
|
260
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerEnterFullscreen', []);
|
283
261
|
}
|
284
262
|
}, this));
|
285
|
-
this.elem
|
286
|
-
if (this.
|
287
|
-
this.
|
263
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerExitFullscreen', Romo.proxy(function(e) {
|
264
|
+
if (this.romoVideo != undefined) {
|
265
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerExitFullscreen', []);
|
288
266
|
}
|
289
267
|
}, this));
|
290
|
-
this.elem
|
291
|
-
if (this.
|
292
|
-
this.
|
268
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerToggleFullscreen', Romo.proxy(function(e) {
|
269
|
+
if (this.romoVideo != undefined) {
|
270
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerToggleFullscreen', []);
|
293
271
|
}
|
294
272
|
}, this));
|
295
273
|
|
296
274
|
// load triggers
|
297
275
|
|
298
|
-
this.elem
|
299
|
-
if (this.
|
300
|
-
this.
|
276
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerLoad', Romo.proxy(function(e) {
|
277
|
+
if (this.romoVideo != undefined) {
|
278
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerLoad', []);
|
301
279
|
}
|
302
280
|
}, this));
|
303
|
-
this.elem
|
304
|
-
if (this.
|
305
|
-
this.
|
281
|
+
Romo.on(this.elem, 'romoModalVideo:romoVideo:triggerModSource', Romo.proxy(function(e, source) {
|
282
|
+
if (this.romoVideo != undefined) {
|
283
|
+
Romo.trigger(this.romoVideo.elem, 'romoVideo:triggerModSource', [source]);
|
306
284
|
}
|
307
285
|
}, this));
|
308
286
|
}
|
309
287
|
|
310
|
-
|
311
|
-
|
312
|
-
|
288
|
+
// init
|
289
|
+
|
290
|
+
Romo.addElemsInitSelector('[data-romo-modalVideo-auto="true"]', RomoModalVideo);
|