@twab/visualization 0.9.5 → 0.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/asset-125afa63 +1 -0
- package/dist/visualization.umd.js +2393 -12577
- package/package.json +10 -11
- package/dist/css/15.90e920d4.css +0 -340
- package/dist/css/895.5b845685.css +0 -1
- package/dist/css/96.90e920d4.css +0 -340
- package/dist/demo.html +0 -1
- package/dist/img/1x1.f865594b.svg +0 -1
- package/dist/img/2x1.6bc80fec.svg +0 -1
- package/dist/img/3x1.8fe1c055.svg +0 -1
- package/dist/img/3x2.f5153612.svg +0 -1
- package/dist/img/4x1.22f434b0.svg +0 -1
- package/dist/img/4x2.3810a721.svg +0 -1
- package/dist/img/5x1.c0878e49.svg +0 -1
- package/dist/img/5x2.b70b5289.svg +0 -1
- package/dist/img/6x1.28b9840c.svg +0 -1
- package/dist/img/6x2.6b117ba7.svg +0 -1
- package/dist/img/dummy.ec1ab0d6.svg +0 -1
- package/dist/visualization.common.15.js +0 -3125
- package/dist/visualization.common.15.js.map +0 -1
- package/dist/visualization.common.913.js +0 -9642
- package/dist/visualization.common.913.js.map +0 -1
- package/dist/visualization.common.js +0 -12637
- package/dist/visualization.common.js.map +0 -1
- package/dist/visualization.umd.653.js +0 -9642
- package/dist/visualization.umd.653.js.map +0 -1
- package/dist/visualization.umd.96.js +0 -3125
- package/dist/visualization.umd.96.js.map +0 -1
- package/dist/visualization.umd.js.map +0 -1
- package/dist/visualization.umd.min.116.js +0 -8
- package/dist/visualization.umd.min.116.js.map +0 -1
- package/dist/visualization.umd.min.895.js +0 -2
- package/dist/visualization.umd.min.895.js.map +0 -1
- package/dist/visualization.umd.min.js +0 -27
- package/dist/visualization.umd.min.js.map +0 -1
|
@@ -1,3125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
((typeof self !== 'undefined' ? self : this)["webpackChunk_twab_visualization"] = (typeof self !== 'undefined' ? self : this)["webpackChunk_twab_visualization"] || []).push([[15],{
|
|
3
|
-
|
|
4
|
-
/***/ 311:
|
|
5
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
|
-
|
|
7
|
-
// ESM COMPAT FLAG
|
|
8
|
-
__webpack_require__.r(__webpack_exports__);
|
|
9
|
-
|
|
10
|
-
// EXPORTS
|
|
11
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
-
"default": function() { return /* binding */ Visualization; }
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/Visualization.vue?vue&type=template&id=38edcc3f&scoped=true&
|
|
16
|
-
var render = function render() {
|
|
17
|
-
var _vm = this,
|
|
18
|
-
_c = _vm._self._c;
|
|
19
|
-
return _c('div', {
|
|
20
|
-
staticClass: "visualization-row",
|
|
21
|
-
attrs: {
|
|
22
|
-
"id": "visualization-container"
|
|
23
|
-
},
|
|
24
|
-
on: {
|
|
25
|
-
"click": _vm.framesClicked
|
|
26
|
-
}
|
|
27
|
-
}, [_vm.active && _vm.canInsertTime && _vm.settingsClosed ? _c('GlobalEvents', {
|
|
28
|
-
on: {
|
|
29
|
-
"keydown": [function ($event) {
|
|
30
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 45) return null;
|
|
31
|
-
return _vm.insertTime.apply(null, arguments);
|
|
32
|
-
}, function ($event) {
|
|
33
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 46) return null;
|
|
34
|
-
return _vm.insertTime.apply(null, arguments);
|
|
35
|
-
}]
|
|
36
|
-
}
|
|
37
|
-
}) : _vm._e(), _vm.active && _vm.settingsClosed ? _c('GlobalEvents', {
|
|
38
|
-
on: {
|
|
39
|
-
"keydown": [function ($event) {
|
|
40
|
-
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "left", 37, $event.key, ["Left", "ArrowLeft"])) return null;
|
|
41
|
-
if ('button' in $event && $event.button !== 0) return null;
|
|
42
|
-
$event.preventDefault();
|
|
43
|
-
return _vm.arrowLeft.apply(null, arguments);
|
|
44
|
-
}, function ($event) {
|
|
45
|
-
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "right", 39, $event.key, ["Right", "ArrowRight"])) return null;
|
|
46
|
-
if ('button' in $event && $event.button !== 2) return null;
|
|
47
|
-
$event.preventDefault();
|
|
48
|
-
return _vm.arrowRight.apply(null, arguments);
|
|
49
|
-
}, function ($event) {
|
|
50
|
-
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "page-down", undefined, $event.key, undefined)) return null;
|
|
51
|
-
if (!$event.shiftKey) return null;
|
|
52
|
-
$event.preventDefault();
|
|
53
|
-
return _vm.nextLoopActivate.apply(null, arguments);
|
|
54
|
-
}, function ($event) {
|
|
55
|
-
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "page-down", undefined, $event.key, undefined)) return null;
|
|
56
|
-
$event.preventDefault();
|
|
57
|
-
return _vm.next.apply(null, arguments);
|
|
58
|
-
}, function ($event) {
|
|
59
|
-
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "page-up", undefined, $event.key, undefined)) return null;
|
|
60
|
-
$event.preventDefault();
|
|
61
|
-
return _vm.prev.apply(null, arguments);
|
|
62
|
-
}, function ($event) {
|
|
63
|
-
if (!$event.type.indexOf('key') && _vm._k($event.keyCode, "page-up", undefined, $event.key, undefined)) return null;
|
|
64
|
-
if (!$event.shiftKey) return null;
|
|
65
|
-
$event.preventDefault();
|
|
66
|
-
return _vm.prevLoopActivate.apply(null, arguments);
|
|
67
|
-
}, function ($event) {
|
|
68
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 83) return null;
|
|
69
|
-
$event.preventDefault();
|
|
70
|
-
return _vm.setHourIni.apply(null, arguments);
|
|
71
|
-
}, function ($event) {
|
|
72
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 69) return null;
|
|
73
|
-
$event.preventDefault();
|
|
74
|
-
return _vm.setHourEnd.apply(null, arguments);
|
|
75
|
-
}, function ($event) {
|
|
76
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 36) return null;
|
|
77
|
-
$event.preventDefault();
|
|
78
|
-
return _vm.goToFirstFrame.apply(null, arguments);
|
|
79
|
-
}, function ($event) {
|
|
80
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 35) return null;
|
|
81
|
-
$event.preventDefault();
|
|
82
|
-
return _vm.goToLastFrame.apply(null, arguments);
|
|
83
|
-
}, function ($event) {
|
|
84
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 71) return null;
|
|
85
|
-
$event.preventDefault();
|
|
86
|
-
_vm.dialogs.goTo = true;
|
|
87
|
-
}, function ($event) {
|
|
88
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 73) return null;
|
|
89
|
-
$event.preventDefault();
|
|
90
|
-
_vm.dialogs.secondsPerFrame = true;
|
|
91
|
-
}, function ($event) {
|
|
92
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 76) return null;
|
|
93
|
-
$event.preventDefault();
|
|
94
|
-
_vm.dialogs.frames = true;
|
|
95
|
-
}, function ($event) {
|
|
96
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 49 && $event.keyCode !== 97) return null;
|
|
97
|
-
return (() => _vm.secondsPerFrame = 1).apply(null, arguments);
|
|
98
|
-
}, function ($event) {
|
|
99
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 50 && $event.keyCode !== 98) return null;
|
|
100
|
-
return (() => _vm.secondsPerFrame = 2).apply(null, arguments);
|
|
101
|
-
}, function ($event) {
|
|
102
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 51 && $event.keyCode !== 99) return null;
|
|
103
|
-
return (() => _vm.secondsPerFrame = 3).apply(null, arguments);
|
|
104
|
-
}, function ($event) {
|
|
105
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 52 && $event.keyCode !== 100) return null;
|
|
106
|
-
return (() => _vm.secondsPerFrame = 4).apply(null, arguments);
|
|
107
|
-
}, function ($event) {
|
|
108
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 53 && $event.keyCode !== 101) return null;
|
|
109
|
-
return (() => _vm.secondsPerFrame = 5).apply(null, arguments);
|
|
110
|
-
}]
|
|
111
|
-
}
|
|
112
|
-
}) : _vm._e(), _vm.prevLoop || _vm.nextLoop ? _c('GlobalEvents', {
|
|
113
|
-
on: {
|
|
114
|
-
"keydown": _vm.breakLoop,
|
|
115
|
-
"click": _vm.breakLoop
|
|
116
|
-
}
|
|
117
|
-
}) : _vm._e(), _vm.active ? _c('settings', {
|
|
118
|
-
attrs: {
|
|
119
|
-
"dialogs-visibility": _vm.dialogs,
|
|
120
|
-
"playback-rate": _vm.playbackRate,
|
|
121
|
-
"seconds-per-frame": _vm.secondsPerFrame,
|
|
122
|
-
"frames-per-row": _vm.framesPerRow,
|
|
123
|
-
"number-of-rows": _vm.numberOfRows
|
|
124
|
-
},
|
|
125
|
-
on: {
|
|
126
|
-
"change-playback-rate": value => _vm.playbackRate = value,
|
|
127
|
-
"change-go-to": _vm.changeHour,
|
|
128
|
-
"change-seconds-per-frame": value => _vm.secondsPerFrame = value,
|
|
129
|
-
"set-frames-selection": _vm.setFrameSelection,
|
|
130
|
-
"close": dialog => _vm.dialogs[dialog] = false
|
|
131
|
-
}
|
|
132
|
-
}) : _vm._e(), _c('div', {
|
|
133
|
-
class: {
|
|
134
|
-
'visualization-card': true,
|
|
135
|
-
'active-tab': _vm.active
|
|
136
|
-
},
|
|
137
|
-
staticStyle: {
|
|
138
|
-
"width": "100%",
|
|
139
|
-
"padding": "0"
|
|
140
|
-
}
|
|
141
|
-
}, [_c('command-bar', {
|
|
142
|
-
directives: [{
|
|
143
|
-
name: "show",
|
|
144
|
-
rawName: "v-show",
|
|
145
|
-
value: _vm.commandBarShow,
|
|
146
|
-
expression: "commandBarShow"
|
|
147
|
-
}],
|
|
148
|
-
attrs: {
|
|
149
|
-
"video-playing": _vm.videoPlaying,
|
|
150
|
-
"video-paused": _vm.paused,
|
|
151
|
-
"insert-time": _vm.canInsertTime,
|
|
152
|
-
"hour-ini-selected": !!_vm.hourIniSelected,
|
|
153
|
-
"hour-end-selected": !!_vm.hourEndSelected
|
|
154
|
-
},
|
|
155
|
-
on: {
|
|
156
|
-
"prev-loop-activate": _vm.prevLoopActivate,
|
|
157
|
-
"next-loop-activate": _vm.nextLoopActivate,
|
|
158
|
-
"prev": _vm.prev,
|
|
159
|
-
"next": _vm.next,
|
|
160
|
-
"go-to": function ($event) {
|
|
161
|
-
_vm.dialogs.goTo = true;
|
|
162
|
-
},
|
|
163
|
-
"open-frame-selection": function ($event) {
|
|
164
|
-
_vm.dialogs.frames = true;
|
|
165
|
-
},
|
|
166
|
-
"open-frames-per-second": function ($event) {
|
|
167
|
-
_vm.dialogs.secondsPerFrame = true;
|
|
168
|
-
},
|
|
169
|
-
"open-blocks": _vm.openBlocks,
|
|
170
|
-
"open-playback-rate": function ($event) {
|
|
171
|
-
_vm.dialogs.playbackRate = true;
|
|
172
|
-
},
|
|
173
|
-
"play-or-pause": _vm.playOrPause,
|
|
174
|
-
"stop-playing": _vm.stopPlayingBar,
|
|
175
|
-
"set-hour-ini": _vm.setHourIni,
|
|
176
|
-
"set-hour-end": _vm.setHourEnd,
|
|
177
|
-
"insert-time": _vm.insertTime
|
|
178
|
-
}
|
|
179
|
-
}), _vm.videoProgressBar ? _c('video-progress', {
|
|
180
|
-
directives: [{
|
|
181
|
-
name: "show",
|
|
182
|
-
rawName: "v-show",
|
|
183
|
-
value: _vm.videoPlaying,
|
|
184
|
-
expression: "videoPlaying"
|
|
185
|
-
}],
|
|
186
|
-
attrs: {
|
|
187
|
-
"video-time": _vm.videoTime
|
|
188
|
-
}
|
|
189
|
-
}) : _vm._e(), _c('info-bar', {
|
|
190
|
-
attrs: {
|
|
191
|
-
"playback-rate": _vm.playbackRate,
|
|
192
|
-
"seconds-per-frame": _vm.secondsPerFrame,
|
|
193
|
-
"commands-show": _vm.commandBarShow,
|
|
194
|
-
"cache": _vm.useCache,
|
|
195
|
-
"block-start-time": _vm.blockStartTime,
|
|
196
|
-
"video-total-duration": _vm.videoSliderTotalDuration,
|
|
197
|
-
"alternative-server": _vm.alternativeServer,
|
|
198
|
-
"frames-per-row": _vm.framesPerRow,
|
|
199
|
-
"number-of-rows": _vm.numberOfRows,
|
|
200
|
-
"hour-ini": _vm.hourIniSelected,
|
|
201
|
-
"hour-end": _vm.hourEndSelected
|
|
202
|
-
},
|
|
203
|
-
on: {
|
|
204
|
-
"toogle-commands-visibility": function ($event) {
|
|
205
|
-
_vm.commandBarShow = !_vm.commandBarShow;
|
|
206
|
-
},
|
|
207
|
-
"toogle-cache": function ($event) {
|
|
208
|
-
_vm.useCache = !_vm.useCache;
|
|
209
|
-
},
|
|
210
|
-
"change-server": _vm.changeServerClick
|
|
211
|
-
}
|
|
212
|
-
}), _vm._l(_vm.numberOfRows, function (rowNumber) {
|
|
213
|
-
return _c('div', {
|
|
214
|
-
key: 'row-' + rowNumber,
|
|
215
|
-
staticClass: "visualization-row",
|
|
216
|
-
staticStyle: {
|
|
217
|
-
"padding": "12px"
|
|
218
|
-
},
|
|
219
|
-
attrs: {
|
|
220
|
-
"id": 'row-' + rowNumber
|
|
221
|
-
}
|
|
222
|
-
}, [_vm._l(_vm.previousFrames, function (frame, frameNumber) {
|
|
223
|
-
return _c('div', {
|
|
224
|
-
key: _vm.numberOfRows + '-' + _vm.framesPerRow + '-' + _vm.getIndex(rowNumber, frameNumber, _vm.Positions.previous),
|
|
225
|
-
staticStyle: {
|
|
226
|
-
"display": "none"
|
|
227
|
-
}
|
|
228
|
-
}, [_c('span', {
|
|
229
|
-
domProps: {
|
|
230
|
-
"innerHTML": _vm._s(frame.img)
|
|
231
|
-
}
|
|
232
|
-
})]);
|
|
233
|
-
}), _vm._l(_vm.nextFrames, function (frame, frameNumber) {
|
|
234
|
-
return _c('div', {
|
|
235
|
-
key: _vm.numberOfRows + '-' + _vm.framesPerRow + '-' + _vm.getIndex(rowNumber, frameNumber, _vm.Positions.next),
|
|
236
|
-
staticStyle: {
|
|
237
|
-
"display": "none"
|
|
238
|
-
}
|
|
239
|
-
}, [_c('span', {
|
|
240
|
-
domProps: {
|
|
241
|
-
"innerHTML": _vm._s(frame.img)
|
|
242
|
-
}
|
|
243
|
-
})]);
|
|
244
|
-
}), _vm._l(_vm.frames.slice(_vm.framesPerRow * (rowNumber - 1), _vm.framesPerRow * rowNumber), function (frame, frameNumber) {
|
|
245
|
-
return _c('div', {
|
|
246
|
-
key: 'row-' + rowNumber + '-frame-' + frameNumber,
|
|
247
|
-
staticClass: "visualization-col",
|
|
248
|
-
class: {
|
|
249
|
-
loaderImg: !!frame.img
|
|
250
|
-
},
|
|
251
|
-
attrs: {
|
|
252
|
-
"id": `frame-${_vm.getIndex(rowNumber, frameNumber, _vm.Positions.current)}`
|
|
253
|
-
},
|
|
254
|
-
on: {
|
|
255
|
-
"click": function ($event) {
|
|
256
|
-
frame.time ? _vm.selectFrame(_vm.getIndex(rowNumber, frameNumber, _vm.Positions.current), frame) : null;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}, [_c('span', {
|
|
260
|
-
staticStyle: {
|
|
261
|
-
"padding-left": "4px"
|
|
262
|
-
},
|
|
263
|
-
attrs: {
|
|
264
|
-
"id": _vm.activeFrame ? 'aa' : 0
|
|
265
|
-
}
|
|
266
|
-
}, [_c('b', [_vm._v(" " + _vm._s(_vm.getAudienceTime(frame.time, rowNumber, frameNumber, _vm.Positions.current)) + " ")])]), _c('frame', {
|
|
267
|
-
ref: "frames",
|
|
268
|
-
refInFor: true,
|
|
269
|
-
staticStyle: {
|
|
270
|
-
"margin": "0 auto"
|
|
271
|
-
},
|
|
272
|
-
attrs: {
|
|
273
|
-
"frame": frame,
|
|
274
|
-
"index": _vm.getIndex(rowNumber, frameNumber, _vm.Positions.current),
|
|
275
|
-
"grid-settings": {
|
|
276
|
-
numberOfRows: _vm.numberOfRows,
|
|
277
|
-
framesPerRow: _vm.framesPerRow
|
|
278
|
-
},
|
|
279
|
-
"initialTime": frame.time === _vm.hourIniSelected,
|
|
280
|
-
"endTime": frame.time === _vm.hourEndSelected,
|
|
281
|
-
"betweenTime": frame.time > _vm.hourIniSelected && frame.time < _vm.hourEndSelected,
|
|
282
|
-
"active": _vm.getIndex(rowNumber, frameNumber, _vm.Positions.current) === _vm.activeFrame,
|
|
283
|
-
"activeTab": _vm.active,
|
|
284
|
-
"videoUrl": _vm.fInterface ? _vm.fInterface.getVideoUrl(frame) : '',
|
|
285
|
-
"playback-rate": _vm.playbackRate
|
|
286
|
-
},
|
|
287
|
-
on: {
|
|
288
|
-
"startPlaying": _vm.startPlaying,
|
|
289
|
-
"stopPlaying": _vm.stopPlaying,
|
|
290
|
-
"playPauseStatus": _vm.changePlayPause,
|
|
291
|
-
"updateSlider": _vm.updateSlider
|
|
292
|
-
}
|
|
293
|
-
})], 1);
|
|
294
|
-
})], 2);
|
|
295
|
-
})], 2)], 1);
|
|
296
|
-
};
|
|
297
|
-
var staticRenderFns = [];
|
|
298
|
-
|
|
299
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Frame.vue?vue&type=template&id=20a23fbe&scoped=true&
|
|
300
|
-
var Framevue_type_template_id_20a23fbe_scoped_true_render = function render() {
|
|
301
|
-
var _vm = this,
|
|
302
|
-
_c = _vm._self._c;
|
|
303
|
-
return _c('div', {
|
|
304
|
-
class: {
|
|
305
|
-
'frame-container': true,
|
|
306
|
-
'initial-time': _vm.initialTime,
|
|
307
|
-
'end-time': _vm.endTime,
|
|
308
|
-
'between-time': _vm.betweenTime,
|
|
309
|
-
active: _vm.active
|
|
310
|
-
},
|
|
311
|
-
style: {
|
|
312
|
-
maxHeight: `${_vm.maxHeight}px`,
|
|
313
|
-
width: '100%',
|
|
314
|
-
position: 'relative'
|
|
315
|
-
}
|
|
316
|
-
}, [_vm.active && _vm.activeTab && _vm.parentComponent.settingsClosed ? _c('GlobalEvents', {
|
|
317
|
-
on: {
|
|
318
|
-
"keydown": [function ($event) {
|
|
319
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 32) return null;
|
|
320
|
-
$event.preventDefault();
|
|
321
|
-
return _vm.playOrPause.apply(null, arguments);
|
|
322
|
-
}, function ($event) {
|
|
323
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 27) return null;
|
|
324
|
-
$event.preventDefault();
|
|
325
|
-
return _vm.stop.apply(null, arguments);
|
|
326
|
-
}, function ($event) {
|
|
327
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 79) return null;
|
|
328
|
-
return _vm.toogleDetailFrame.apply(null, arguments);
|
|
329
|
-
}, function ($event) {
|
|
330
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 13) return null;
|
|
331
|
-
$event.preventDefault();
|
|
332
|
-
return _vm.jumpFrameToStart.apply(null, arguments);
|
|
333
|
-
}]
|
|
334
|
-
}
|
|
335
|
-
}) : _vm._e(), _vm.showFrame ? _c('GlobalEvents', {
|
|
336
|
-
on: {
|
|
337
|
-
"keydown": [function ($event) {
|
|
338
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 27) return null;
|
|
339
|
-
$event.preventDefault();
|
|
340
|
-
return _vm.toogleDetailFrame.apply(null, arguments);
|
|
341
|
-
}, function ($event) {
|
|
342
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 13) return null;
|
|
343
|
-
$event.preventDefault();
|
|
344
|
-
return _vm.toogleDetailFrame.apply(null, arguments);
|
|
345
|
-
}]
|
|
346
|
-
}
|
|
347
|
-
}) : _vm._e(), _c('vue-loading', {
|
|
348
|
-
staticStyle: {
|
|
349
|
-
"z-index": "0"
|
|
350
|
-
},
|
|
351
|
-
attrs: {
|
|
352
|
-
"active": (!_vm.frame.image || !_vm.frame.time) && _vm.frame.title !== -1 || _vm.loading || _vm.videoIsLoading,
|
|
353
|
-
"spinner": "ring",
|
|
354
|
-
"color": "#1565c0",
|
|
355
|
-
"background-color": "#ededed",
|
|
356
|
-
"text": _vm.videoIsLoading ? _vm.$('infoBar.createVideo') : ''
|
|
357
|
-
}
|
|
358
|
-
}), _c('div', {
|
|
359
|
-
staticStyle: {
|
|
360
|
-
"background-color": "black"
|
|
361
|
-
}
|
|
362
|
-
}, [!_vm.loading ? _c('div', {
|
|
363
|
-
class: {
|
|
364
|
-
'frame-content': _vm.frame.title === -1 || _vm.videoStatus !== _vm.Status.stopped
|
|
365
|
-
},
|
|
366
|
-
style: {
|
|
367
|
-
maxHeight: `${_vm.height}px`,
|
|
368
|
-
maxWidth: `${_vm.width}px`,
|
|
369
|
-
color: 'white'
|
|
370
|
-
},
|
|
371
|
-
on: {
|
|
372
|
-
"dblclick": _vm.playOrPause
|
|
373
|
-
}
|
|
374
|
-
}, [_vm.frame.image && _vm.videoStatus === _vm.Status.stopped ? _c('div', {
|
|
375
|
-
class: {
|
|
376
|
-
'dummy-frame': _vm.frame.title === -1
|
|
377
|
-
},
|
|
378
|
-
staticStyle: {
|
|
379
|
-
"width": "100%",
|
|
380
|
-
"height": "100%"
|
|
381
|
-
},
|
|
382
|
-
domProps: {
|
|
383
|
-
"innerHTML": _vm._s(_vm.frame.image)
|
|
384
|
-
}
|
|
385
|
-
}) : _vm._e(), _vm.videoStatus !== _vm.Status.stopped && !_vm.videoIsLoading ? _c('video', {
|
|
386
|
-
ref: "videoPlayer",
|
|
387
|
-
staticStyle: {
|
|
388
|
-
"width": "100%",
|
|
389
|
-
"aspect-ratio": "11/9"
|
|
390
|
-
},
|
|
391
|
-
attrs: {
|
|
392
|
-
"maxHeight": `${_vm.height}px`,
|
|
393
|
-
"maxWidth": `${_vm.width}px`,
|
|
394
|
-
"src": _vm.videoUrlString,
|
|
395
|
-
"preload": "none",
|
|
396
|
-
"autoplay": ""
|
|
397
|
-
},
|
|
398
|
-
on: {
|
|
399
|
-
"timeupdate": _vm.updateTimeLabel,
|
|
400
|
-
"ended": _vm.videoEnded,
|
|
401
|
-
"click": _vm.playOrPause
|
|
402
|
-
}
|
|
403
|
-
}) : _vm._e(), _c('div', {
|
|
404
|
-
staticClass: "overlay"
|
|
405
|
-
})]) : _vm._e()]), _c('dialog', {
|
|
406
|
-
ref: "imageDetailsDialog",
|
|
407
|
-
class: {
|
|
408
|
-
'dummy-frame': _vm.frame.title === -1
|
|
409
|
-
},
|
|
410
|
-
staticStyle: {
|
|
411
|
-
"width": "100vh",
|
|
412
|
-
"border": "none",
|
|
413
|
-
"background": "none"
|
|
414
|
-
},
|
|
415
|
-
domProps: {
|
|
416
|
-
"innerHTML": _vm._s(_vm.frame.image)
|
|
417
|
-
}
|
|
418
|
-
})], 1);
|
|
419
|
-
};
|
|
420
|
-
var Framevue_type_template_id_20a23fbe_scoped_true_staticRenderFns = [];
|
|
421
|
-
|
|
422
|
-
// EXTERNAL MODULE: ./node_modules/vue-loading-twa/lib/vue-loading-twa.min.js
|
|
423
|
-
var vue_loading_twa_min = __webpack_require__(3093);
|
|
424
|
-
var vue_loading_twa_min_default = /*#__PURE__*/__webpack_require__.n(vue_loading_twa_min);
|
|
425
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Frame.vue?vue&type=script&lang=js&
|
|
426
|
-
|
|
427
|
-
const Status = Object.freeze({
|
|
428
|
-
stopped: 0,
|
|
429
|
-
playing: 1,
|
|
430
|
-
paused: 2
|
|
431
|
-
});
|
|
432
|
-
/* harmony default export */ var Framevue_type_script_lang_js_ = ({
|
|
433
|
-
components: {
|
|
434
|
-
VueLoading: (vue_loading_twa_min_default())
|
|
435
|
-
},
|
|
436
|
-
name: 'frame-component',
|
|
437
|
-
props: {
|
|
438
|
-
frame: {
|
|
439
|
-
type: [Object, Number],
|
|
440
|
-
required: true
|
|
441
|
-
},
|
|
442
|
-
index: {
|
|
443
|
-
type: Number,
|
|
444
|
-
required: true
|
|
445
|
-
},
|
|
446
|
-
loading: {
|
|
447
|
-
type: Boolean,
|
|
448
|
-
default: false
|
|
449
|
-
},
|
|
450
|
-
gridSettings: {
|
|
451
|
-
type: Object,
|
|
452
|
-
required: true
|
|
453
|
-
},
|
|
454
|
-
initialTime: {
|
|
455
|
-
type: Boolean,
|
|
456
|
-
default: false
|
|
457
|
-
},
|
|
458
|
-
endTime: {
|
|
459
|
-
type: Boolean,
|
|
460
|
-
default: false
|
|
461
|
-
},
|
|
462
|
-
betweenTime: {
|
|
463
|
-
type: Boolean,
|
|
464
|
-
default: false
|
|
465
|
-
},
|
|
466
|
-
active: {
|
|
467
|
-
type: Boolean,
|
|
468
|
-
default: false
|
|
469
|
-
},
|
|
470
|
-
activeTab: {
|
|
471
|
-
type: Boolean,
|
|
472
|
-
default: false
|
|
473
|
-
},
|
|
474
|
-
videoUrl: {
|
|
475
|
-
type: [String, Promise],
|
|
476
|
-
required: true
|
|
477
|
-
},
|
|
478
|
-
playbackRate: {
|
|
479
|
-
type: Number,
|
|
480
|
-
default: 1
|
|
481
|
-
}
|
|
482
|
-
},
|
|
483
|
-
data() {
|
|
484
|
-
return {
|
|
485
|
-
Status,
|
|
486
|
-
aspectRatio: 11 / 9,
|
|
487
|
-
width: 0,
|
|
488
|
-
height: 0,
|
|
489
|
-
maxWidth: 0,
|
|
490
|
-
fullMaxWidth: 0,
|
|
491
|
-
maxHeight: 0,
|
|
492
|
-
showFrame: false,
|
|
493
|
-
videoStatus: Status.stopped,
|
|
494
|
-
videoStartTime: null,
|
|
495
|
-
videoCurrentTime: null,
|
|
496
|
-
videoUrlString: '',
|
|
497
|
-
parentComponent: null,
|
|
498
|
-
videoIsLoading: false,
|
|
499
|
-
currentBlock: null,
|
|
500
|
-
lastTimeEnterPressed: null
|
|
501
|
-
};
|
|
502
|
-
},
|
|
503
|
-
created() {
|
|
504
|
-
this.parentComponent = this.$parent;
|
|
505
|
-
},
|
|
506
|
-
watch: {
|
|
507
|
-
playbackRate(val) {
|
|
508
|
-
if (this.videoStatus === Status.playing || this.videoStatus === Status.paused) {
|
|
509
|
-
this.$refs.videoPlayer.playbackRate = val;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
},
|
|
513
|
-
methods: {
|
|
514
|
-
jumpFrameToStart() {
|
|
515
|
-
if (this.active) {
|
|
516
|
-
const currentTime = new Date().getTime();
|
|
517
|
-
if (currentTime - this.lastTimeEnterPressed <= 500) {
|
|
518
|
-
this.parentComponent.changeHour(this.parentComponent.convertToAudienceTime(this.frame.time));
|
|
519
|
-
}
|
|
520
|
-
this.lastTimeEnterPressed = currentTime;
|
|
521
|
-
}
|
|
522
|
-
},
|
|
523
|
-
changeSettings(value) {
|
|
524
|
-
this.videoCurrentTime = value;
|
|
525
|
-
},
|
|
526
|
-
toogleDetailFrame() {
|
|
527
|
-
if (this.showFrame) {
|
|
528
|
-
this.$refs.imageDetailsDialog.close();
|
|
529
|
-
} else {
|
|
530
|
-
this.$refs.imageDetailsDialog.showModal();
|
|
531
|
-
}
|
|
532
|
-
this.showFrame = !this.showFrame;
|
|
533
|
-
},
|
|
534
|
-
getMaxWidth() {
|
|
535
|
-
const commandBarSize = document.getElementById('command-bar');
|
|
536
|
-
return commandBarSize?.clientWidth;
|
|
537
|
-
},
|
|
538
|
-
resize(height) {
|
|
539
|
-
const commandBarSize = document.getElementById('command-bar');
|
|
540
|
-
const infoBarSize = document.getElementById('info-bar');
|
|
541
|
-
this.fullMaxWidth = commandBarSize?.clientWidth;
|
|
542
|
-
this.maxWidth = (commandBarSize?.clientWidth - this.gridSettings.framesPerRow * 10) / this.gridSettings.framesPerRow;
|
|
543
|
-
const heightAvailable = height - commandBarSize?.offsetHeight - infoBarSize?.offsetHeight - 47 * this.gridSettings.numberOfRows;
|
|
544
|
-
this.maxHeight = this.gridSettings.numberOfRows === 2 ? (heightAvailable - 12) / 2 : heightAvailable;
|
|
545
|
-
this.maxHeight = this.maxHeight >= 75 ? this.maxHeight : 75;
|
|
546
|
-
if (this.maxWidth / this.aspectRatio > this.maxHeight) {
|
|
547
|
-
this.height = this.maxHeight;
|
|
548
|
-
this.width = this.maxHeight * this.aspectRatio;
|
|
549
|
-
} else {
|
|
550
|
-
this.width = this.maxWidth;
|
|
551
|
-
this.height = this.maxWidth / this.aspectRatio;
|
|
552
|
-
}
|
|
553
|
-
this.maxHeight = this.height;
|
|
554
|
-
},
|
|
555
|
-
async playOrPause() {
|
|
556
|
-
switch (this.videoStatus) {
|
|
557
|
-
case Status.stopped:
|
|
558
|
-
this.videoIsLoading = true;
|
|
559
|
-
try {
|
|
560
|
-
this.videoUrlString = await this.videoUrl;
|
|
561
|
-
const blockInfo = await this.parentComponent.fInterface?.getVideoStartTime(this.frame);
|
|
562
|
-
this.videoStartTime = blockInfo.start;
|
|
563
|
-
this.videoUrlString = this.parentComponent.fInterface.getVideoRequestByUrl(blockInfo.url, this.frame.number);
|
|
564
|
-
} catch (error) {
|
|
565
|
-
console.log(error);
|
|
566
|
-
}
|
|
567
|
-
this.videoIsLoading = false;
|
|
568
|
-
this.videoStatus = Status.playing;
|
|
569
|
-
this.$nextTick(() => {
|
|
570
|
-
this.$refs.videoPlayer.onloadedmetadata = e => {
|
|
571
|
-
this.$refs.videoPlayer.playbackRate = this.playbackRate;
|
|
572
|
-
// * atualizar slider
|
|
573
|
-
this.$emit('updateSlider', this.videoStartTime, this.frame.time);
|
|
574
|
-
//*
|
|
575
|
-
this.$emit('startPlaying', this.frame, e.target.duration);
|
|
576
|
-
this.$emit('playPauseStatus', true);
|
|
577
|
-
};
|
|
578
|
-
});
|
|
579
|
-
break;
|
|
580
|
-
case Status.paused:
|
|
581
|
-
this.$refs.videoPlayer.play();
|
|
582
|
-
this.$refs.videoPlayer.playbackRate = this.playbackRate;
|
|
583
|
-
this.videoStatus = Status.playing;
|
|
584
|
-
this.$emit('playPauseStatus', true);
|
|
585
|
-
break;
|
|
586
|
-
case Status.playing:
|
|
587
|
-
this.$refs.videoPlayer.pause();
|
|
588
|
-
this.videoStatus = Status.paused;
|
|
589
|
-
this.$emit('playPauseStatus', false);
|
|
590
|
-
break;
|
|
591
|
-
}
|
|
592
|
-
},
|
|
593
|
-
stop() {
|
|
594
|
-
let jump = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
595
|
-
if (this.videoStatus === Status.playing || this.videoStatus === Status.paused) {
|
|
596
|
-
if (jump) {
|
|
597
|
-
this.parentComponent.changeHour(this.parentComponent.convertToAudienceTime(parseInt(this.videoCurrentTime)));
|
|
598
|
-
}
|
|
599
|
-
this.videoStatus = Status.stopped;
|
|
600
|
-
this.videoUrlString = null;
|
|
601
|
-
this.videoCurrentTime = null;
|
|
602
|
-
this.videoStartTime = null;
|
|
603
|
-
}
|
|
604
|
-
this.$emit('stopPlaying');
|
|
605
|
-
},
|
|
606
|
-
//eslint-disable-next-line
|
|
607
|
-
videoJumpTo(time) {
|
|
608
|
-
this.videoCurrentTime = this.videoStartTime + time;
|
|
609
|
-
this.$refs.videoPlayer.currentTime = time;
|
|
610
|
-
},
|
|
611
|
-
async videoJumpToTimeStamp(time) {
|
|
612
|
-
let frame = {
|
|
613
|
-
time: time
|
|
614
|
-
};
|
|
615
|
-
if (!time) return;
|
|
616
|
-
if (!(this.currentBlock && time >= this.currentBlock.start && time <= this.currentBlock.end)) {
|
|
617
|
-
this.currentBlock = await this.parentComponent.fInterface?.getBlockInfo(frame);
|
|
618
|
-
this.videoStartTime = this.currentBlock.start;
|
|
619
|
-
this.videoUrlString = this.parentComponent.fInterface.getVideoUrlForTime(this.videoStartTime);
|
|
620
|
-
}
|
|
621
|
-
this.videoCurrentTime = time - this.videoStartTime;
|
|
622
|
-
this.$refs.videoPlayer.currentTime = this.videoCurrentTime;
|
|
623
|
-
},
|
|
624
|
-
updateTimeLabel(e) {
|
|
625
|
-
this.videoCurrentTime = this.videoStartTime + e.target.currentTime;
|
|
626
|
-
this.parentComponent.updateVideoTime(this.index, this.videoCurrentTime);
|
|
627
|
-
this.parentComponent.updateVideoStatus(e.target.currentTime);
|
|
628
|
-
},
|
|
629
|
-
async videoEnded() {
|
|
630
|
-
this.videoStartTime = await this.parentComponent.fInterface?.getNextVideoStartTime(this.frame.time);
|
|
631
|
-
this.videoUrlString = this.parentComponent.fInterface.getVideoUrlForTime(this.videoStartTime);
|
|
632
|
-
// * Ao acabar o vídeo tenho de mandar atualizar slider
|
|
633
|
-
// * aqui o video current time tambem vai ser o videoStartTime
|
|
634
|
-
this.$emit('updateSlider', this.videoStartTime, this.videoStartTime);
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
;// CONCATENATED MODULE: ./src/components/Frame.vue?vue&type=script&lang=js&
|
|
639
|
-
/* harmony default export */ var components_Framevue_type_script_lang_js_ = (Framevue_type_script_lang_js_);
|
|
640
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Frame.vue?vue&type=style&index=0&id=20a23fbe&prod&scoped=true&lang=css&
|
|
641
|
-
// extracted by mini-css-extract-plugin
|
|
642
|
-
|
|
643
|
-
;// CONCATENATED MODULE: ./src/components/Frame.vue?vue&type=style&index=0&id=20a23fbe&prod&scoped=true&lang=css&
|
|
644
|
-
|
|
645
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
646
|
-
var componentNormalizer = __webpack_require__(1001);
|
|
647
|
-
;// CONCATENATED MODULE: ./src/components/Frame.vue
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
;
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
/* normalize component */
|
|
655
|
-
|
|
656
|
-
var component = (0,componentNormalizer/* default */.Z)(
|
|
657
|
-
components_Framevue_type_script_lang_js_,
|
|
658
|
-
Framevue_type_template_id_20a23fbe_scoped_true_render,
|
|
659
|
-
Framevue_type_template_id_20a23fbe_scoped_true_staticRenderFns,
|
|
660
|
-
false,
|
|
661
|
-
null,
|
|
662
|
-
"20a23fbe",
|
|
663
|
-
null
|
|
664
|
-
|
|
665
|
-
)
|
|
666
|
-
|
|
667
|
-
/* harmony default export */ var Frame = (component.exports);
|
|
668
|
-
// EXTERNAL MODULE: ./node_modules/axios/lib/axios.js + 40 modules
|
|
669
|
-
var axios = __webpack_require__(4161);
|
|
670
|
-
;// CONCATENATED MODULE: ./src/services/FramesService.js
|
|
671
|
-
|
|
672
|
-
const Api = axios/* default */.Z.create({
|
|
673
|
-
//baseURL: process.env.VUE_APP_FRAMES_SERVER,
|
|
674
|
-
baseURL: sessionStorage.getItem('base_url')
|
|
675
|
-
});
|
|
676
|
-
Api.interceptors.request.use(config => {
|
|
677
|
-
config.params = config.params || {};
|
|
678
|
-
config.params.Client = sessionStorage.getItem('client') || 'UNKNOWN';
|
|
679
|
-
if (sessionStorage.getItem('server') === 'alternative') {
|
|
680
|
-
config.params.BlockPathConfig = 'AlernativeTvConfig';
|
|
681
|
-
}
|
|
682
|
-
return config;
|
|
683
|
-
});
|
|
684
|
-
/* harmony default export */ var FramesService = ({
|
|
685
|
-
getBlockRequest() {
|
|
686
|
-
let {
|
|
687
|
-
direction,
|
|
688
|
-
channel,
|
|
689
|
-
split,
|
|
690
|
-
time,
|
|
691
|
-
quality,
|
|
692
|
-
factor,
|
|
693
|
-
useCache = true,
|
|
694
|
-
signal
|
|
695
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
696
|
-
return Api.get(`Get${direction}FramesBlockInFiles`, {
|
|
697
|
-
params: {
|
|
698
|
-
Channel: channel,
|
|
699
|
-
Split: split,
|
|
700
|
-
UseCache: useCache,
|
|
701
|
-
Time: time,
|
|
702
|
-
Step: 0,
|
|
703
|
-
JpegQuality: quality,
|
|
704
|
-
JpegSizeFactor: factor
|
|
705
|
-
},
|
|
706
|
-
signal
|
|
707
|
-
});
|
|
708
|
-
},
|
|
709
|
-
getSmallBlockRequest() {
|
|
710
|
-
let {
|
|
711
|
-
channel,
|
|
712
|
-
split,
|
|
713
|
-
time,
|
|
714
|
-
quality,
|
|
715
|
-
factor,
|
|
716
|
-
size,
|
|
717
|
-
useCache = true,
|
|
718
|
-
signal
|
|
719
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
720
|
-
return Api.get('GetSmallFramesBlockInFiles', {
|
|
721
|
-
params: {
|
|
722
|
-
Channel: channel,
|
|
723
|
-
Split: split,
|
|
724
|
-
UseCache: useCache,
|
|
725
|
-
Time: time,
|
|
726
|
-
Step: 0,
|
|
727
|
-
JpegQuality: quality,
|
|
728
|
-
JpegSizeFactor: factor,
|
|
729
|
-
Size: size
|
|
730
|
-
},
|
|
731
|
-
signal
|
|
732
|
-
});
|
|
733
|
-
},
|
|
734
|
-
getFileInfoRequest() {
|
|
735
|
-
let {
|
|
736
|
-
direction,
|
|
737
|
-
channel,
|
|
738
|
-
split,
|
|
739
|
-
time,
|
|
740
|
-
step,
|
|
741
|
-
signal
|
|
742
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
743
|
-
return Api.get(`Get${direction}BlockFileInformation`, {
|
|
744
|
-
params: {
|
|
745
|
-
Channel: channel,
|
|
746
|
-
Split: split,
|
|
747
|
-
Time: time,
|
|
748
|
-
Step: step
|
|
749
|
-
},
|
|
750
|
-
signal
|
|
751
|
-
});
|
|
752
|
-
},
|
|
753
|
-
getNextAvailableBlock() {
|
|
754
|
-
let {
|
|
755
|
-
channel,
|
|
756
|
-
time,
|
|
757
|
-
signal
|
|
758
|
-
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
759
|
-
// process.env.VUE_APP_NEXT_AVAILABLE_BLOCK
|
|
760
|
-
|
|
761
|
-
return Api.get(`GetPreviousAvailableBlockFileInformation`, {
|
|
762
|
-
params: {
|
|
763
|
-
Channel: channel,
|
|
764
|
-
Split: 1,
|
|
765
|
-
Time: time,
|
|
766
|
-
Step: 0
|
|
767
|
-
},
|
|
768
|
-
signal
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
// getVideoRequestQuery(direction, channel, split, time, step) {
|
|
773
|
-
// return (
|
|
774
|
-
// this.serverUrl +
|
|
775
|
-
// 'Get' + direction + 'Video' +
|
|
776
|
-
// '?Client=' +
|
|
777
|
-
// client +
|
|
778
|
-
// '&Channel=' +
|
|
779
|
-
// channel +
|
|
780
|
-
// '&Split=' +
|
|
781
|
-
// split +
|
|
782
|
-
// '&Time=' +
|
|
783
|
-
// time +
|
|
784
|
-
// '&Step=' +
|
|
785
|
-
// step +
|
|
786
|
-
// this.serverUrlExtraParams
|
|
787
|
-
// )
|
|
788
|
-
// }
|
|
789
|
-
|
|
790
|
-
// getVideoRequestByTime(channel, time) {
|
|
791
|
-
// return (
|
|
792
|
-
// this.serverUrl +
|
|
793
|
-
// 'GetVideo?channel=' +
|
|
794
|
-
// channel +
|
|
795
|
-
// '&time=' +
|
|
796
|
-
// time +
|
|
797
|
-
// this.serverUrlExtraParams
|
|
798
|
-
// )
|
|
799
|
-
// }
|
|
800
|
-
});
|
|
801
|
-
;// CONCATENATED MODULE: ./src/utils/Enum.js
|
|
802
|
-
/* harmony default export */ var Enum = ({
|
|
803
|
-
MinBlockSizes: Object.freeze({
|
|
804
|
-
1: 3600,
|
|
805
|
-
2: 3600,
|
|
806
|
-
3: 3600,
|
|
807
|
-
4: 3600,
|
|
808
|
-
5: 3600
|
|
809
|
-
}),
|
|
810
|
-
MinBlockSizesBack: Object.freeze({
|
|
811
|
-
1: 1800,
|
|
812
|
-
2: 1800,
|
|
813
|
-
3: 1800,
|
|
814
|
-
4: 1800,
|
|
815
|
-
5: 1800
|
|
816
|
-
}),
|
|
817
|
-
Direction: Object.freeze({
|
|
818
|
-
Next: 'Next',
|
|
819
|
-
Previous: 'Previous',
|
|
820
|
-
Self: ''
|
|
821
|
-
}),
|
|
822
|
-
JpegQuality: Object.freeze({
|
|
823
|
-
LowestQuality: '1',
|
|
824
|
-
LowQuality: '25',
|
|
825
|
-
MediumQuality: '50',
|
|
826
|
-
HighQuality: '75',
|
|
827
|
-
HighestQuality: '100'
|
|
828
|
-
}),
|
|
829
|
-
ResponseStatus: Object.freeze({
|
|
830
|
-
Ok: 1,
|
|
831
|
-
UnknownError: -1,
|
|
832
|
-
VideoBlockNotFound: -2,
|
|
833
|
-
InvalidRequest: -3,
|
|
834
|
-
ClientNotAllowed: -4,
|
|
835
|
-
AuthenticationProblem: -5
|
|
836
|
-
}),
|
|
837
|
-
StepsQuality: Object.freeze({
|
|
838
|
-
1: '50',
|
|
839
|
-
// 50 -> MediumQuality of JpegQuality
|
|
840
|
-
2: '50',
|
|
841
|
-
// 50 -> MediumQuality of JpegQuality
|
|
842
|
-
3: '50',
|
|
843
|
-
// 50 -> MediumQuality of JpegQuality
|
|
844
|
-
4: '50',
|
|
845
|
-
// 50 -> MediumQuality of JpegQuality
|
|
846
|
-
5: '50' // 50 -> MediumQuality of JpegQuality
|
|
847
|
-
}),
|
|
848
|
-
|
|
849
|
-
SizeQuality: Object.freeze({
|
|
850
|
-
1: '100'
|
|
851
|
-
}),
|
|
852
|
-
// 100 -> HighestQuality of JpegQuality
|
|
853
|
-
|
|
854
|
-
StepsFactor: Object.freeze({
|
|
855
|
-
1: 1,
|
|
856
|
-
2: 1,
|
|
857
|
-
3: 1,
|
|
858
|
-
4: 1,
|
|
859
|
-
5: 1
|
|
860
|
-
}),
|
|
861
|
-
SmallBlockSize: Object.freeze({
|
|
862
|
-
1: 1,
|
|
863
|
-
2: 1,
|
|
864
|
-
3: 1,
|
|
865
|
-
4: 1,
|
|
866
|
-
5: 1
|
|
867
|
-
})
|
|
868
|
-
});
|
|
869
|
-
;// CONCATENATED MODULE: ./src/utils/FramesManager.js
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
function FramesManager(channel, size, currentTime, startAudienceTime) {
|
|
873
|
-
let useCache = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
|
|
874
|
-
this.channel = channel;
|
|
875
|
-
this.size = size;
|
|
876
|
-
this.currentTime = currentTime;
|
|
877
|
-
this.useCache = useCache;
|
|
878
|
-
this.startAudienceTime = startAudienceTime;
|
|
879
|
-
this.firstFrameTime = currentTime;
|
|
880
|
-
this.buffer = [];
|
|
881
|
-
this.requests = {};
|
|
882
|
-
this.currentStep = 1;
|
|
883
|
-
this.currentPosition = 0;
|
|
884
|
-
this.smallBlockSizeFactor = 2;
|
|
885
|
-
this.startCheckingQualityStep = 1;
|
|
886
|
-
this.startCheckingQualitySize = 1;
|
|
887
|
-
this.numberOfSmallBlocksCheck = 3;
|
|
888
|
-
}
|
|
889
|
-
FramesManager.prototype.goTo = async function (time) {
|
|
890
|
-
this.cancelAllPendingRequests();
|
|
891
|
-
this.currentTime = time || this.currentTime;
|
|
892
|
-
const frameIndex = this.findFrameIndexByTime(this.currentTime);
|
|
893
|
-
if (frameIndex >= 0) {
|
|
894
|
-
this.currentPosition = frameIndex;
|
|
895
|
-
} else {
|
|
896
|
-
this.buffer = [];
|
|
897
|
-
await this.getSmallBlock(this.currentTime, this.channel, 1);
|
|
898
|
-
}
|
|
899
|
-
};
|
|
900
|
-
FramesManager.prototype.getSmallBlock = async function (time, channel, split) {
|
|
901
|
-
let add = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
902
|
-
const requestId = `smallBlock_${time}`;
|
|
903
|
-
try {
|
|
904
|
-
if (!this.requests[requestId]) {
|
|
905
|
-
this.requests[requestId] = new AbortController();
|
|
906
|
-
let response = (await FramesService.getSmallBlockRequest({
|
|
907
|
-
channel,
|
|
908
|
-
split,
|
|
909
|
-
time,
|
|
910
|
-
size: this.size * 15,
|
|
911
|
-
quality: Enum.StepsQuality[this.currentStep],
|
|
912
|
-
factor: Enum.StepsFactor[this.currentStep],
|
|
913
|
-
signal: this.requests[requestId].signal
|
|
914
|
-
})).data;
|
|
915
|
-
if (!this.requests[requestId]) {
|
|
916
|
-
throw 'Response not needed anymore';
|
|
917
|
-
}
|
|
918
|
-
if (response.status !== Enum.ResponseStatus.Ok) {
|
|
919
|
-
await this.getBlock(time, channel, split, Enum.Direction.Previous, true);
|
|
920
|
-
await this.getBlock(time, channel, split, Enum.Direction.Next, true);
|
|
921
|
-
throw response?.message || 'Unknown error';
|
|
922
|
-
}
|
|
923
|
-
response = response.data;
|
|
924
|
-
const images = response.frames;
|
|
925
|
-
this.requests[`block_${Enum.Direction.Next}_${response.end}`] = true;
|
|
926
|
-
this.getBlock(time, this.channel, 1, Enum.Direction.Self, true, true);
|
|
927
|
-
if (!add) {
|
|
928
|
-
const firstFrameTime = images[0].time;
|
|
929
|
-
const lastFrameTime = images[images.length - 1].time;
|
|
930
|
-
if (lastFrameTime === response.end) {
|
|
931
|
-
await this.getSmallBlock(lastFrameTime + 1, this.channel, 1, true);
|
|
932
|
-
} else if (this.timestampToTimeString(firstFrameTime) !== this.startAudienceTime && firstFrameTime === response.start) {
|
|
933
|
-
await this.getSmallBlock(firstFrameTime - this.currentStep * this.size, this.channel, 1, true);
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
this.orderFramesBlock(images);
|
|
937
|
-
this.currentPosition = this.findFrameIndexByTime(this.currentTime);
|
|
938
|
-
delete this.requests[`block_${Enum.Direction.Next}_${response.end}`];
|
|
939
|
-
delete this.requests[requestId];
|
|
940
|
-
return true;
|
|
941
|
-
}
|
|
942
|
-
console.error(`Frames Manager (GetSmallBlock): Request blocked by another equal request occurring`);
|
|
943
|
-
return false;
|
|
944
|
-
} catch (err) {
|
|
945
|
-
console.error(`Frames Manager (GetSmallBlock): ${err}`);
|
|
946
|
-
delete this.requests[requestId];
|
|
947
|
-
return false;
|
|
948
|
-
}
|
|
949
|
-
};
|
|
950
|
-
FramesManager.prototype.getBlock = async function (time, channel, split, direction, checkMinBlock) {
|
|
951
|
-
let substituition = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;
|
|
952
|
-
const requestId = `block_${direction}_${time}`;
|
|
953
|
-
try {
|
|
954
|
-
if (!this.requests[requestId]) {
|
|
955
|
-
this.requests[requestId] = new AbortController();
|
|
956
|
-
let response = (await FramesService.getBlockRequest({
|
|
957
|
-
direction,
|
|
958
|
-
channel,
|
|
959
|
-
split,
|
|
960
|
-
time,
|
|
961
|
-
quality: Enum.StepsQuality[this.currentStep],
|
|
962
|
-
factor: Enum.StepsFactor[this.currentStep],
|
|
963
|
-
signal: this.requests[requestId].signal
|
|
964
|
-
})).data;
|
|
965
|
-
if (!this.requests[requestId]) {
|
|
966
|
-
throw 'Response not needed anymore';
|
|
967
|
-
}
|
|
968
|
-
if (response.status !== Enum.ResponseStatus.Ok) {
|
|
969
|
-
throw response?.message || 'Unknown error';
|
|
970
|
-
}
|
|
971
|
-
this.orderFramesBlock(response.data.frames);
|
|
972
|
-
this.currentPosition = this.findFrameIndexByTime(this.currentTime);
|
|
973
|
-
if (checkMinBlock) {
|
|
974
|
-
await this.checkMinBlockSize(!substituition);
|
|
975
|
-
}
|
|
976
|
-
delete this.requests[requestId];
|
|
977
|
-
return true;
|
|
978
|
-
}
|
|
979
|
-
console.error(`Frames Manager (GetBlock ${direction}): Request blocked by another equal request occurring`);
|
|
980
|
-
return false;
|
|
981
|
-
} catch (err) {
|
|
982
|
-
console.error(`Frames Manager (GetBlock ${direction}): ${err}`);
|
|
983
|
-
delete this.requests[requestId];
|
|
984
|
-
return false;
|
|
985
|
-
}
|
|
986
|
-
};
|
|
987
|
-
FramesManager.prototype.checkMinBlockSize = async function (checkMinBlock) {
|
|
988
|
-
if (this.checkFramesBackward()) {
|
|
989
|
-
await this.getBlock(this.buffer.length === 0 ? this.currentTime : this.buffer[0].time, this.channel, 1, Enum.Direction[this.buffer.length === 0 ? 'Self' : 'Previous'], checkMinBlock, (this.buffer[0]?.number || 0) !== 0);
|
|
990
|
-
}
|
|
991
|
-
if (this.checkFramesForward()) {
|
|
992
|
-
await this.getBlock(this.buffer.length === 0 ? this.currentTime : this.buffer[this.buffer.length - 1].time, this.channel, 1, Enum.Direction[this.buffer.length === 0 ? 'Self' : 'Next'], checkMinBlock);
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
FramesManager.prototype.checkFramesForward = function () {
|
|
996
|
-
return this.buffer.length - this.currentPosition < Enum.MinBlockSizes[this.currentStep] * (this.size / 6);
|
|
997
|
-
};
|
|
998
|
-
FramesManager.prototype.checkFramesBackward = function () {
|
|
999
|
-
return this.currentPosition < Enum.MinBlockSizesBack[this.currentStep];
|
|
1000
|
-
};
|
|
1001
|
-
FramesManager.prototype.orderFramesBlock = function (images) {
|
|
1002
|
-
if (this.buffer.length > 0) {
|
|
1003
|
-
const bufferFistTime = this.buffer[0].time;
|
|
1004
|
-
const bufferLastTime = this.buffer[this.buffer.length - 1].time;
|
|
1005
|
-
const beforeImages = images.filter(image => image.time < bufferFistTime);
|
|
1006
|
-
const afterImages = images.filter(image => image.time > bufferLastTime);
|
|
1007
|
-
this.buffer = [...beforeImages, ...this.buffer, ...afterImages];
|
|
1008
|
-
} else {
|
|
1009
|
-
this.buffer = images;
|
|
1010
|
-
}
|
|
1011
|
-
};
|
|
1012
|
-
FramesManager.prototype.findFrameIndexByTime = function (time) {
|
|
1013
|
-
return this.buffer.findIndex(frame => frame.time === time);
|
|
1014
|
-
};
|
|
1015
|
-
FramesManager.prototype.cancelAllPendingRequests = function () {
|
|
1016
|
-
for (const request in this.requests) {
|
|
1017
|
-
const value = this.requests[request];
|
|
1018
|
-
if (typeof value === 'object' && 'signal' in value) {
|
|
1019
|
-
value.abort();
|
|
1020
|
-
}
|
|
1021
|
-
delete this.requests[request];
|
|
1022
|
-
}
|
|
1023
|
-
};
|
|
1024
|
-
FramesManager.prototype.timestampToTimeString = function (timestamp) {
|
|
1025
|
-
return new Date(timestamp * 1000).toISOString().substring(11, 19).replace(/:/g, '');
|
|
1026
|
-
};
|
|
1027
|
-
FramesManager.prototype.getPrevImages = function () {
|
|
1028
|
-
if (this.timestampToTimeString(this.currentTime) === this.startAudienceTime) {
|
|
1029
|
-
return null;
|
|
1030
|
-
}
|
|
1031
|
-
return this.getBufferSlice(this.currentPosition - this.size * this.currentStep, this.currentPosition);
|
|
1032
|
-
};
|
|
1033
|
-
FramesManager.prototype.getCurrentImages = function () {
|
|
1034
|
-
return this.getBufferSlice(this.currentPosition, this.currentPosition + this.size * this.currentStep);
|
|
1035
|
-
};
|
|
1036
|
-
FramesManager.prototype.getNextImages = function () {
|
|
1037
|
-
return this.getBufferSlice(this.currentPosition + this.size * this.currentStep, this.currentPosition + this.size * 2 * this.currentStep);
|
|
1038
|
-
};
|
|
1039
|
-
FramesManager.prototype.getBufferSlice = function (start, end) {
|
|
1040
|
-
let slice = this.buffer.slice(start, end);
|
|
1041
|
-
if (this.currentStep !== 1) {
|
|
1042
|
-
slice = slice.filter((f, i) => i % this.currentStep === 0);
|
|
1043
|
-
}
|
|
1044
|
-
if (slice.length < this.size) {
|
|
1045
|
-
return null;
|
|
1046
|
-
}
|
|
1047
|
-
return slice;
|
|
1048
|
-
};
|
|
1049
|
-
FramesManager.prototype.next = function () {
|
|
1050
|
-
const newPosition = this.currentPosition + this.currentStep * this.size;
|
|
1051
|
-
this.currentPosition = newPosition < this.buffer.length ? newPosition : this.currentPosition;
|
|
1052
|
-
this.currentTime = this.buffer[this.currentPosition]?.time || this.currentTime;
|
|
1053
|
-
this.checkMinBlockSize(true);
|
|
1054
|
-
};
|
|
1055
|
-
FramesManager.prototype.previous = function () {
|
|
1056
|
-
const newPosition = this.currentPosition - this.size * this.currentStep;
|
|
1057
|
-
this.currentPosition = newPosition > 0 ? newPosition : 0;
|
|
1058
|
-
this.currentTime = this.buffer[this.currentPosition]?.time || this.currentTime;
|
|
1059
|
-
this.checkMinBlockSize(true);
|
|
1060
|
-
};
|
|
1061
|
-
FramesManager.prototype.getFileInfo = async function (time, step) {
|
|
1062
|
-
if (time) {
|
|
1063
|
-
let response = (await FramesService.getFileInfoRequest({
|
|
1064
|
-
direction: Enum.Direction.Self,
|
|
1065
|
-
channel: this.channel,
|
|
1066
|
-
split: this.currentStep,
|
|
1067
|
-
time: time,
|
|
1068
|
-
step: step
|
|
1069
|
-
})).data;
|
|
1070
|
-
if (response.status == Enum.ResponseStatus.Ok) {
|
|
1071
|
-
return response.data;
|
|
1072
|
-
} else {
|
|
1073
|
-
return null;
|
|
1074
|
-
}
|
|
1075
|
-
} else {
|
|
1076
|
-
return null;
|
|
1077
|
-
}
|
|
1078
|
-
};
|
|
1079
|
-
FramesManager.prototype.getNextFileInfo = async function (time, step) {
|
|
1080
|
-
let response = (await FramesService.getFileInfoRequest({
|
|
1081
|
-
direction: Enum.Direction.Next,
|
|
1082
|
-
channel: this.channel,
|
|
1083
|
-
split: this.currentStep,
|
|
1084
|
-
time: time,
|
|
1085
|
-
step: step
|
|
1086
|
-
})).data;
|
|
1087
|
-
if (response.status == Enum.ResponseStatus.Ok) {
|
|
1088
|
-
return response.data;
|
|
1089
|
-
} else {
|
|
1090
|
-
return null;
|
|
1091
|
-
}
|
|
1092
|
-
};
|
|
1093
|
-
/* harmony default export */ var utils_FramesManager = (FramesManager);
|
|
1094
|
-
;// CONCATENATED MODULE: ./src/utils/FramesInterface.js
|
|
1095
|
-
|
|
1096
|
-
const server = sessionStorage.getItem('server');
|
|
1097
|
-
function getServerUrlWithParams() {
|
|
1098
|
-
return {
|
|
1099
|
-
url: sessionStorage.getItem('base_url'),
|
|
1100
|
-
params: server === 'alternative' ? '&BlockPathConfig=AlernativeTvConfig' : ''
|
|
1101
|
-
};
|
|
1102
|
-
}
|
|
1103
|
-
function FramesInterface(channel, numberOfRows, framesPerRow, currentTime, startAudienceTime) {
|
|
1104
|
-
let useCache = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;
|
|
1105
|
-
this.channel = channel;
|
|
1106
|
-
this.numberOfRows = numberOfRows;
|
|
1107
|
-
this.framesPerRow = framesPerRow;
|
|
1108
|
-
this.currentTime = currentTime;
|
|
1109
|
-
this.firstFrameTime = currentTime;
|
|
1110
|
-
this.startAudienceTime = startAudienceTime;
|
|
1111
|
-
this.useCache = useCache;
|
|
1112
|
-
}
|
|
1113
|
-
FramesInterface.prototype.init = async function () {
|
|
1114
|
-
this.framesManager = await new utils_FramesManager(this.channel, this.numberOfRows * this.framesPerRow, this.currentTime, this.startAudienceTime, this.useCache);
|
|
1115
|
-
await this.framesManager.goTo();
|
|
1116
|
-
await this.loadFrames();
|
|
1117
|
-
};
|
|
1118
|
-
FramesInterface.prototype.initLight = async function () {
|
|
1119
|
-
this.framesManager = await new utils_FramesManager(this.channel, this.numberOfRows * this.framesPerRow, this.currentTime, this.startAudienceTime, this.useCache);
|
|
1120
|
-
};
|
|
1121
|
-
FramesInterface.prototype.changeTime = async function (time) {
|
|
1122
|
-
await this.framesManager.goTo(time);
|
|
1123
|
-
await this.loadFrames();
|
|
1124
|
-
};
|
|
1125
|
-
FramesInterface.prototype.loadFrames = async function () {
|
|
1126
|
-
let prev = (await this.framesManager.getPrevImages()) || [];
|
|
1127
|
-
let next = (await this.framesManager.getNextImages()) || [];
|
|
1128
|
-
let current = (await this.framesManager.getCurrentImages()) || [];
|
|
1129
|
-
prev = await this.constructImagesComponent(prev);
|
|
1130
|
-
current = await this.constructImagesComponent(current);
|
|
1131
|
-
next = await this.constructImagesComponent(next);
|
|
1132
|
-
this.frames = {
|
|
1133
|
-
prev,
|
|
1134
|
-
current,
|
|
1135
|
-
next
|
|
1136
|
-
};
|
|
1137
|
-
};
|
|
1138
|
-
FramesInterface.prototype.loadNextFrames = async function () {
|
|
1139
|
-
this.framesManager.next();
|
|
1140
|
-
let next = (await this.framesManager.getNextImages()) || [];
|
|
1141
|
-
next = await this.constructImagesComponent(next);
|
|
1142
|
-
this.frames.prev = this.frames.current;
|
|
1143
|
-
this.frames.current = this.frames.next;
|
|
1144
|
-
this.frames.next = next;
|
|
1145
|
-
};
|
|
1146
|
-
FramesInterface.prototype.loadPrevFrames = async function () {
|
|
1147
|
-
this.framesManager.previous();
|
|
1148
|
-
console.log(this.framesManager.currentTime, this.firstFrameTime);
|
|
1149
|
-
if (this.framesManager.currentTime < this.firstFrameTime) {
|
|
1150
|
-
await this.framesManager.goTo(this.firstFrameTime);
|
|
1151
|
-
await this.loadFrames();
|
|
1152
|
-
return;
|
|
1153
|
-
}
|
|
1154
|
-
let prev = (await this.framesManager.getPrevImages()) || [];
|
|
1155
|
-
prev = await this.constructImagesComponent(prev);
|
|
1156
|
-
this.frames.next = this.frames.current;
|
|
1157
|
-
this.frames.current = this.frames.prev;
|
|
1158
|
-
this.frames.prev = prev;
|
|
1159
|
-
};
|
|
1160
|
-
FramesInterface.prototype.constructImagesComponent = async function (array) {
|
|
1161
|
-
const Semaphor = [];
|
|
1162
|
-
for (let frame of array) {
|
|
1163
|
-
const image = document.createElement('img');
|
|
1164
|
-
image.src = frame.title === -1 ? __webpack_require__(9583) : `${sessionStorage.getItem('base_url')}frames/${frame.title}${server == 'alternative' ? '?server=alt' : ''}`;
|
|
1165
|
-
image.style.maxWidth = frame.title === -1 ? '80%' : '100%';
|
|
1166
|
-
image.style.contain = 'true';
|
|
1167
|
-
Semaphor.push(new Promise(resolve => {
|
|
1168
|
-
image.addEventListener('load', () => {
|
|
1169
|
-
resolve();
|
|
1170
|
-
});
|
|
1171
|
-
}));
|
|
1172
|
-
frame['image'] = image.outerHTML;
|
|
1173
|
-
}
|
|
1174
|
-
await Promise.all(Semaphor);
|
|
1175
|
-
return array;
|
|
1176
|
-
};
|
|
1177
|
-
FramesInterface.prototype.getFrames = function (position) {
|
|
1178
|
-
const positions = ['prev', 'current', 'next'];
|
|
1179
|
-
const images = this.frames[positions[position]];
|
|
1180
|
-
if (images && images.length > 0) {
|
|
1181
|
-
return images;
|
|
1182
|
-
}
|
|
1183
|
-
return Array.from(Array(this.numberOfRows * this.framesPerRow).keys());
|
|
1184
|
-
};
|
|
1185
|
-
FramesInterface.prototype.getCurrentTime = function () {
|
|
1186
|
-
return this.framesManager.currentTime;
|
|
1187
|
-
};
|
|
1188
|
-
FramesInterface.prototype.getVideoUrl = function (frame) {
|
|
1189
|
-
let {
|
|
1190
|
-
url,
|
|
1191
|
-
params
|
|
1192
|
-
} = getServerUrlWithParams();
|
|
1193
|
-
return url + 'GetVideo?Client=' + sessionStorage.getItem('client') + '&Channel=' + this.channel + '&Time=' + frame.time + params + '#t=' + frame.number;
|
|
1194
|
-
};
|
|
1195
|
-
FramesInterface.prototype.getVideoUrlForTime = function (time) {
|
|
1196
|
-
let {
|
|
1197
|
-
url,
|
|
1198
|
-
params
|
|
1199
|
-
} = getServerUrlWithParams();
|
|
1200
|
-
return url + 'GetVideo?Client=' + sessionStorage.getItem('client') + '&Channel=' + this.channel + '&Time=' + time + params;
|
|
1201
|
-
};
|
|
1202
|
-
FramesInterface.prototype.getVideoStartTime = async function (frame) {
|
|
1203
|
-
try {
|
|
1204
|
-
const block = await this.framesManager.getFileInfo(frame.time, 0);
|
|
1205
|
-
return block;
|
|
1206
|
-
} catch (err) {
|
|
1207
|
-
console.log(err);
|
|
1208
|
-
}
|
|
1209
|
-
};
|
|
1210
|
-
FramesInterface.prototype.getBlockInfo = async function (frame) {
|
|
1211
|
-
try {
|
|
1212
|
-
const block = await this.framesManager.getFileInfo(frame.time, 0);
|
|
1213
|
-
return block;
|
|
1214
|
-
} catch (err) {
|
|
1215
|
-
console.log(err);
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
FramesInterface.prototype.getNextVideoStartTime = async function (time) {
|
|
1219
|
-
try {
|
|
1220
|
-
const block = await this.framesManager.getNextFileInfo(time, 0);
|
|
1221
|
-
return block.start;
|
|
1222
|
-
} catch (err) {
|
|
1223
|
-
console.log(err);
|
|
1224
|
-
}
|
|
1225
|
-
};
|
|
1226
|
-
FramesInterface.prototype.setCurrentStep = function (step) {
|
|
1227
|
-
this.framesManager.currentStep = step;
|
|
1228
|
-
};
|
|
1229
|
-
FramesInterface.prototype.changeSize = async function (numberOfRows, framesPerRow) {
|
|
1230
|
-
this.numberOfRows = numberOfRows;
|
|
1231
|
-
this.framesPerRow = framesPerRow;
|
|
1232
|
-
this.framesManager.size = this.numberOfRows * this.framesPerRow;
|
|
1233
|
-
await this.loadFrames();
|
|
1234
|
-
};
|
|
1235
|
-
FramesInterface.prototype.getVideoRequestByUrl = function (url_path, t) {
|
|
1236
|
-
const {
|
|
1237
|
-
url,
|
|
1238
|
-
params
|
|
1239
|
-
} = getServerUrlWithParams();
|
|
1240
|
-
return url + 'StreamFromVideo?url=' + url_path + params + '#t=' + t;
|
|
1241
|
-
};
|
|
1242
|
-
/* harmony default export */ var utils_FramesInterface = (FramesInterface);
|
|
1243
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Commands.vue?vue&type=template&id=28a1997b&
|
|
1244
|
-
var Commandsvue_type_template_id_28a1997b_render = function render() {
|
|
1245
|
-
var _vm = this,
|
|
1246
|
-
_c = _vm._self._c;
|
|
1247
|
-
return _c('div', {
|
|
1248
|
-
staticClass: "visualization-col pa-0",
|
|
1249
|
-
staticStyle: {
|
|
1250
|
-
"border-top-right-radius": "6px"
|
|
1251
|
-
},
|
|
1252
|
-
attrs: {
|
|
1253
|
-
"id": "command-bar"
|
|
1254
|
-
}
|
|
1255
|
-
}, [_vm.commandBarShow ? _c('div', {
|
|
1256
|
-
staticClass: "visualization-row visualization-justify-center"
|
|
1257
|
-
}, _vm._l(_vm.commandBarBtns, function (btn, index) {
|
|
1258
|
-
return _c('div', {
|
|
1259
|
-
key: 'command-btn-' + index
|
|
1260
|
-
}, [!btn ? _c('hr', {
|
|
1261
|
-
staticClass: "visualization-divider vertical",
|
|
1262
|
-
staticStyle: {
|
|
1263
|
-
"margin": "0 4px"
|
|
1264
|
-
}
|
|
1265
|
-
}) : _vm._e(), btn && (btn.condition ? btn.condition() : true) ? _c('button', {
|
|
1266
|
-
directives: [{
|
|
1267
|
-
name: "tooltip",
|
|
1268
|
-
rawName: "v-tooltip",
|
|
1269
|
-
value: btn.text && typeof btn.text === 'function' ? btn.text() : btn.text,
|
|
1270
|
-
expression: "\n btn.text && typeof btn.text === 'function' ? btn.text() : btn.text\n "
|
|
1271
|
-
}],
|
|
1272
|
-
staticClass: "command-bar-btn",
|
|
1273
|
-
style: {
|
|
1274
|
-
color: btn.color && typeof btn.color === 'function' ? btn.color() : 'black'
|
|
1275
|
-
},
|
|
1276
|
-
on: {
|
|
1277
|
-
"click": btn.fnc
|
|
1278
|
-
}
|
|
1279
|
-
}, [_c('font-awesome-icon', {
|
|
1280
|
-
attrs: {
|
|
1281
|
-
"id": btn.id,
|
|
1282
|
-
"icon": 'fa-solid ' + (btn.icon && typeof btn.icon === 'function' ? btn.icon() : btn.icon)
|
|
1283
|
-
}
|
|
1284
|
-
})], 1) : _vm._e()]);
|
|
1285
|
-
}), 0) : _vm._e(), _c('hr', {
|
|
1286
|
-
staticClass: "visualization-divider"
|
|
1287
|
-
})]);
|
|
1288
|
-
};
|
|
1289
|
-
var Commandsvue_type_template_id_28a1997b_staticRenderFns = [];
|
|
1290
|
-
|
|
1291
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Commands.vue?vue&type=script&lang=js&
|
|
1292
|
-
/* harmony default export */ var Commandsvue_type_script_lang_js_ = ({
|
|
1293
|
-
props: {
|
|
1294
|
-
videoPlaying: {
|
|
1295
|
-
type: Boolean,
|
|
1296
|
-
default: false
|
|
1297
|
-
},
|
|
1298
|
-
videoPaused: {
|
|
1299
|
-
type: Boolean,
|
|
1300
|
-
default: false
|
|
1301
|
-
},
|
|
1302
|
-
insertTime: {
|
|
1303
|
-
type: Boolean,
|
|
1304
|
-
default: false
|
|
1305
|
-
},
|
|
1306
|
-
hourIniSelected: {
|
|
1307
|
-
type: Boolean,
|
|
1308
|
-
default: false
|
|
1309
|
-
},
|
|
1310
|
-
hourEndSelected: {
|
|
1311
|
-
type: Boolean,
|
|
1312
|
-
default: false
|
|
1313
|
-
}
|
|
1314
|
-
},
|
|
1315
|
-
data() {
|
|
1316
|
-
return {
|
|
1317
|
-
commandBarShow: true,
|
|
1318
|
-
commandBarBtns: [{
|
|
1319
|
-
fnc: () => this.$emit('prev-loop-activate'),
|
|
1320
|
-
icon: 'fa-backward',
|
|
1321
|
-
text: 'Fast Backward',
|
|
1322
|
-
id: 'Fast Backward'
|
|
1323
|
-
}, {
|
|
1324
|
-
fnc: () => this.$emit('prev'),
|
|
1325
|
-
icon: 'fa-step-backward',
|
|
1326
|
-
text: 'Step Backward',
|
|
1327
|
-
id: 'Step Backward'
|
|
1328
|
-
}, {
|
|
1329
|
-
fnc: () => this.$emit('go-to'),
|
|
1330
|
-
icon: 'fa-clock',
|
|
1331
|
-
text: this.$i18n.t('infoBar.setHour'),
|
|
1332
|
-
id: 'Definir Hora'
|
|
1333
|
-
}, {
|
|
1334
|
-
fnc: () => this.$emit('next'),
|
|
1335
|
-
icon: 'fa-step-forward',
|
|
1336
|
-
text: 'Step Forward',
|
|
1337
|
-
id: 'Step Forward'
|
|
1338
|
-
}, {
|
|
1339
|
-
fnc: () => this.$emit('next-loop-activate'),
|
|
1340
|
-
icon: 'fa-forward',
|
|
1341
|
-
text: 'Fast Forward',
|
|
1342
|
-
id: 'Fast Forward'
|
|
1343
|
-
}, {
|
|
1344
|
-
fnc: () => this.$emit('play-or-pause'),
|
|
1345
|
-
icon: () => {
|
|
1346
|
-
return this.videoPlaying && !this.videoPaused ? 'fa-pause' : 'fa-play';
|
|
1347
|
-
},
|
|
1348
|
-
text: () => {
|
|
1349
|
-
return this.videoPlaying && !this.videoPaused ? 'Pause' : 'Play';
|
|
1350
|
-
},
|
|
1351
|
-
id: 'playOrPause'
|
|
1352
|
-
}, {
|
|
1353
|
-
fnc: () => this.$emit('stop-playing'),
|
|
1354
|
-
icon: 'fa-stop',
|
|
1355
|
-
text: 'Stop',
|
|
1356
|
-
id: 'Stop'
|
|
1357
|
-
}, null, {
|
|
1358
|
-
fnc: () => this.$emit('open-frame-selection'),
|
|
1359
|
-
icon: 'fa-border-all',
|
|
1360
|
-
text: this.$i18n.t('infoBar.gridForm'),
|
|
1361
|
-
id: 'Formato da grelha'
|
|
1362
|
-
}, {
|
|
1363
|
-
fnc: () => this.$emit('open-frames-per-second'),
|
|
1364
|
-
icon: 'fa-sliders-h',
|
|
1365
|
-
text: this.$i18n.t('infoBar.secondImage'),
|
|
1366
|
-
id: 'Segundos por Imagem'
|
|
1367
|
-
},
|
|
1368
|
-
// {
|
|
1369
|
-
// fnc: () => this.$emit('open-blocks'),
|
|
1370
|
-
// icon: 'fa-cut',
|
|
1371
|
-
// text: 'Escolher intervalo de blocos',
|
|
1372
|
-
// id: 'Escolher intervalo de blocos',
|
|
1373
|
-
// },
|
|
1374
|
-
{
|
|
1375
|
-
fnc: () => this.$emit('open-playback-rate'),
|
|
1376
|
-
icon: 'fa-tachometer-alt',
|
|
1377
|
-
text: this.$i18n.t('infoBar.chooseVelocity'),
|
|
1378
|
-
id: 'Escolher velocidade de reprodução'
|
|
1379
|
-
},
|
|
1380
|
-
// {
|
|
1381
|
-
// fnc: () => this.$emit('insert-time-force'),
|
|
1382
|
-
// icon: 'fa-arrow-turn-down',
|
|
1383
|
-
// text: 'Recuperar Notícia',
|
|
1384
|
-
// id: 'Recuperar Notícia',
|
|
1385
|
-
// condition: () => {
|
|
1386
|
-
// return this.insertTime
|
|
1387
|
-
// },
|
|
1388
|
-
// },
|
|
1389
|
-
null, {
|
|
1390
|
-
fnc: () => this.$emit('set-hour-ini'),
|
|
1391
|
-
icon: 'fa-hourglass-start',
|
|
1392
|
-
text: this.$i18n.t('form.inicialHour'),
|
|
1393
|
-
id: 'Hora Inicial',
|
|
1394
|
-
color: () => {
|
|
1395
|
-
return this.hourIniSelected ? 'var(--visualization-start)' : 'black';
|
|
1396
|
-
}
|
|
1397
|
-
}, {
|
|
1398
|
-
fnc: () => this.$emit('insert-time'),
|
|
1399
|
-
icon: 'fa-arrow-circle-down',
|
|
1400
|
-
text: this.$i18n.t('infoBar.insert'),
|
|
1401
|
-
id: 'insert',
|
|
1402
|
-
condition: () => {
|
|
1403
|
-
return this.insertTime;
|
|
1404
|
-
}
|
|
1405
|
-
}, {
|
|
1406
|
-
fnc: () => this.$emit('set-hour-end'),
|
|
1407
|
-
icon: 'fa-hourglass-end',
|
|
1408
|
-
text: this.$i18n.t('form.endHour'),
|
|
1409
|
-
id: 'Hora Final',
|
|
1410
|
-
color: () => {
|
|
1411
|
-
return this.hourEndSelected ? 'var(--visualization-end)' : 'black';
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
// {
|
|
1415
|
-
// fnc: () => this.$emit('check-available-block'),
|
|
1416
|
-
// icon: 'fa-video',
|
|
1417
|
-
// text: 'Próximo bloco disponível',
|
|
1418
|
-
// id: 'Próximo bloco disponível',
|
|
1419
|
-
// },
|
|
1420
|
-
]
|
|
1421
|
-
};
|
|
1422
|
-
}
|
|
1423
|
-
});
|
|
1424
|
-
;// CONCATENATED MODULE: ./src/components/Commands.vue?vue&type=script&lang=js&
|
|
1425
|
-
/* harmony default export */ var components_Commandsvue_type_script_lang_js_ = (Commandsvue_type_script_lang_js_);
|
|
1426
|
-
;// CONCATENATED MODULE: ./src/components/Commands.vue
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
/* normalize component */
|
|
1433
|
-
;
|
|
1434
|
-
var Commands_component = (0,componentNormalizer/* default */.Z)(
|
|
1435
|
-
components_Commandsvue_type_script_lang_js_,
|
|
1436
|
-
Commandsvue_type_template_id_28a1997b_render,
|
|
1437
|
-
Commandsvue_type_template_id_28a1997b_staticRenderFns,
|
|
1438
|
-
false,
|
|
1439
|
-
null,
|
|
1440
|
-
null,
|
|
1441
|
-
null
|
|
1442
|
-
|
|
1443
|
-
)
|
|
1444
|
-
|
|
1445
|
-
/* harmony default export */ var Commands = (Commands_component.exports);
|
|
1446
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Infos.vue?vue&type=template&id=68da7f95&
|
|
1447
|
-
var Infosvue_type_template_id_68da7f95_render = function render() {
|
|
1448
|
-
var _vm = this,
|
|
1449
|
-
_c = _vm._self._c;
|
|
1450
|
-
return _c('div', {
|
|
1451
|
-
staticClass: "visualization-row visualization-justify-center visualization-align-center",
|
|
1452
|
-
style: !_vm.commandsShow ? 'border-top-right-radius: 6px; padding: 4px' : 'padding: 4px',
|
|
1453
|
-
attrs: {
|
|
1454
|
-
"id": "info-bar"
|
|
1455
|
-
}
|
|
1456
|
-
}, [_c('span', [_vm._v(" " + _vm._s(_vm.playbackRate) + "x ")]), _c('hr', {
|
|
1457
|
-
staticClass: "visualization-divider vertical",
|
|
1458
|
-
staticStyle: {
|
|
1459
|
-
"margin": "0 8px"
|
|
1460
|
-
}
|
|
1461
|
-
}), _c('span', [_vm._v(" " + _vm._s(_vm.$t('infoBar.selected', {
|
|
1462
|
-
seconds: _vm.hourEnd && _vm.hourIni ? _vm.hourEnd - _vm.hourIni + 1 : 0,
|
|
1463
|
-
hour_ini: _vm.convertToAudienceTime(_vm.hourIni),
|
|
1464
|
-
hour_end: _vm.convertToAudienceTime(_vm.hourEnd)
|
|
1465
|
-
})) + " ")]), _c('hr', {
|
|
1466
|
-
staticClass: "visualization-divider vertical",
|
|
1467
|
-
staticStyle: {
|
|
1468
|
-
"margin": "0 8px"
|
|
1469
|
-
}
|
|
1470
|
-
}), _c('span', [_vm._v(" " + _vm._s(_vm.$t('infoBar.interval', {
|
|
1471
|
-
seconds: _vm.secondsPerFrame
|
|
1472
|
-
})) + " ")]), _c('hr', {
|
|
1473
|
-
staticClass: "visualization-divider vertical",
|
|
1474
|
-
staticStyle: {
|
|
1475
|
-
"margin": "0 8px"
|
|
1476
|
-
}
|
|
1477
|
-
}), _c('span', [_vm._v(" " + _vm._s(_vm.$t('infoBar.block', {
|
|
1478
|
-
time1: _vm.convertToAudienceTime(_vm.blockStartTime),
|
|
1479
|
-
time2: _vm.convertToAudienceTime(_vm.blockTotalTime)
|
|
1480
|
-
})) + " ")]), _c('hr', {
|
|
1481
|
-
staticClass: "visualization-divider vertical",
|
|
1482
|
-
staticStyle: {
|
|
1483
|
-
"margin": "0 8px"
|
|
1484
|
-
}
|
|
1485
|
-
}), _vm._v(" " + _vm._s(_vm.framesPerRow * _vm.numberOfRows) + " "), _c('hr', {
|
|
1486
|
-
staticClass: "visualization-divider vertical",
|
|
1487
|
-
staticStyle: {
|
|
1488
|
-
"margin": "0 8px"
|
|
1489
|
-
}
|
|
1490
|
-
}), _vm._v(" " + _vm._s(_vm.framesPerRow + '*' + _vm.numberOfRows) + " "), _vm.alternativeServer || !_vm.cache ? _c('span', {
|
|
1491
|
-
staticClass: "visualization-divider vertical",
|
|
1492
|
-
staticStyle: {
|
|
1493
|
-
"margin": "0 8px"
|
|
1494
|
-
}
|
|
1495
|
-
}) : _vm._e(), _vm.alternativeServer ? _c('span', [_c('v-icon', {
|
|
1496
|
-
attrs: {
|
|
1497
|
-
"color": "error",
|
|
1498
|
-
"small": "",
|
|
1499
|
-
"left": ""
|
|
1500
|
-
}
|
|
1501
|
-
}, [_vm._v("fa-exclamation-triangle")]), _c('strong', [_vm._v(_vm._s(_vm.$t('infoBar.alternativeServer')))])], 1) : _vm._e(), _vm.alternativeServer && !_vm.cache ? _c('span', {
|
|
1502
|
-
staticClass: "visualization-divider vertical",
|
|
1503
|
-
staticStyle: {
|
|
1504
|
-
"margin": "0 8px"
|
|
1505
|
-
}
|
|
1506
|
-
}) : _vm._e(), !_vm.cache ? _c('span', [_c('v-icon', {
|
|
1507
|
-
attrs: {
|
|
1508
|
-
"color": "warning",
|
|
1509
|
-
"small": "",
|
|
1510
|
-
"left": ""
|
|
1511
|
-
}
|
|
1512
|
-
}, [_vm._v("fa-exclamation-circle")]), _c('strong', [_vm._v(_vm._s(_vm.$t('infoBar.notUsingCache')))])], 1) : _vm._e(), _c('div', {
|
|
1513
|
-
staticClass: "settings-container"
|
|
1514
|
-
}, [_c('font-awesome-icon', {
|
|
1515
|
-
directives: [{
|
|
1516
|
-
name: "tooltip",
|
|
1517
|
-
rawName: "v-tooltip",
|
|
1518
|
-
value: _vm.alternativeServer ? _vm.$t('infoBar.changeServer') : _vm.$t('infoBar.changeServer'),
|
|
1519
|
-
expression: "\n alternativeServer\n ? $t('infoBar.changeServer')\n : $t('infoBar.changeServer')\n "
|
|
1520
|
-
}],
|
|
1521
|
-
attrs: {
|
|
1522
|
-
"icon": "fa-solid fa-server"
|
|
1523
|
-
},
|
|
1524
|
-
on: {
|
|
1525
|
-
"click": function ($event) {
|
|
1526
|
-
return _vm.$emit('change-server');
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
}), _c('font-awesome-icon', {
|
|
1530
|
-
directives: [{
|
|
1531
|
-
name: "tooltip",
|
|
1532
|
-
rawName: "v-tooltip",
|
|
1533
|
-
value: _vm.commandsShow ? _vm.$t('moduletelentry.hideButtons') : _vm.$t('moduletelentry.showButtons'),
|
|
1534
|
-
expression: "\n commandsShow\n ? $t('moduletelentry.hideButtons')\n : $t('moduletelentry.showButtons')\n "
|
|
1535
|
-
}],
|
|
1536
|
-
attrs: {
|
|
1537
|
-
"icon": _vm.commandsShow ? 'fa-solid fa-eye' : 'fa-solid fa-eye-slash'
|
|
1538
|
-
},
|
|
1539
|
-
on: {
|
|
1540
|
-
"click": function ($event) {
|
|
1541
|
-
return _vm.$emit('toogle-commands-visibility');
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
}), _c('font-awesome-icon', {
|
|
1545
|
-
directives: [{
|
|
1546
|
-
name: "tooltip",
|
|
1547
|
-
rawName: "v-tooltip",
|
|
1548
|
-
value: _vm.cache ? _vm.$t('infoBar.disableCache') : _vm.$t('infoBar.activateCache'),
|
|
1549
|
-
expression: "\n cache ? $t('infoBar.disableCache') : $t('infoBar.activateCache')\n "
|
|
1550
|
-
}],
|
|
1551
|
-
attrs: {
|
|
1552
|
-
"icon": _vm.cache ? 'fa-solid fa-ban' : 'fa-solid fa-sync'
|
|
1553
|
-
},
|
|
1554
|
-
on: {
|
|
1555
|
-
"click": function ($event) {
|
|
1556
|
-
return _vm.$emit('toogle-cache');
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
})], 1)]);
|
|
1560
|
-
};
|
|
1561
|
-
var Infosvue_type_template_id_68da7f95_staticRenderFns = [];
|
|
1562
|
-
|
|
1563
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Infos.vue?vue&type=script&lang=js&
|
|
1564
|
-
/* harmony default export */ var Infosvue_type_script_lang_js_ = ({
|
|
1565
|
-
props: {
|
|
1566
|
-
playbackRate: {
|
|
1567
|
-
type: Number,
|
|
1568
|
-
required: true
|
|
1569
|
-
},
|
|
1570
|
-
secondsPerFrame: {
|
|
1571
|
-
type: Number,
|
|
1572
|
-
required: true
|
|
1573
|
-
},
|
|
1574
|
-
commandsShow: {
|
|
1575
|
-
type: Boolean,
|
|
1576
|
-
required: true
|
|
1577
|
-
},
|
|
1578
|
-
cache: {
|
|
1579
|
-
type: Boolean,
|
|
1580
|
-
required: true
|
|
1581
|
-
},
|
|
1582
|
-
blockStartTime: {
|
|
1583
|
-
type: Number,
|
|
1584
|
-
required: true
|
|
1585
|
-
},
|
|
1586
|
-
videoTotalDuration: {
|
|
1587
|
-
type: Number,
|
|
1588
|
-
required: true
|
|
1589
|
-
},
|
|
1590
|
-
alternativeServer: {
|
|
1591
|
-
type: Boolean,
|
|
1592
|
-
required: true
|
|
1593
|
-
},
|
|
1594
|
-
framesPerRow: {
|
|
1595
|
-
type: Number,
|
|
1596
|
-
required: true
|
|
1597
|
-
},
|
|
1598
|
-
numberOfRows: {
|
|
1599
|
-
type: Number,
|
|
1600
|
-
required: true
|
|
1601
|
-
},
|
|
1602
|
-
hourIni: {
|
|
1603
|
-
type: [Number, Boolean]
|
|
1604
|
-
},
|
|
1605
|
-
hourEnd: {
|
|
1606
|
-
type: [Number, Boolean]
|
|
1607
|
-
}
|
|
1608
|
-
},
|
|
1609
|
-
data() {
|
|
1610
|
-
return {};
|
|
1611
|
-
},
|
|
1612
|
-
computed: {
|
|
1613
|
-
blockTotalTime() {
|
|
1614
|
-
return this.videoTotalDuration + this.blockStartTime;
|
|
1615
|
-
}
|
|
1616
|
-
},
|
|
1617
|
-
methods: {
|
|
1618
|
-
convertToAudienceTime(time) {
|
|
1619
|
-
let separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ':';
|
|
1620
|
-
const d = this.getDateParts();
|
|
1621
|
-
const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
|
|
1622
|
-
let hour = this.dateInUtc(time * 1000).toTimeString().split(' ')[0].split(':').map(Number);
|
|
1623
|
-
if (time > limit && time <= limit + this.startAudienceSeconds) {
|
|
1624
|
-
hour[0] = 24 + hour[0];
|
|
1625
|
-
}
|
|
1626
|
-
return hour.map(part => part > 9 ? part.toString() : '0' + part).join(separator);
|
|
1627
|
-
},
|
|
1628
|
-
getDateParts() {
|
|
1629
|
-
let date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.date;
|
|
1630
|
-
const d = new Date(date);
|
|
1631
|
-
return {
|
|
1632
|
-
year: d.getFullYear(),
|
|
1633
|
-
month: d.getMonth(),
|
|
1634
|
-
day: d.getDate()
|
|
1635
|
-
};
|
|
1636
|
-
},
|
|
1637
|
-
dateInUtc(miliSeconds) {
|
|
1638
|
-
var date = new Date(miliSeconds);
|
|
1639
|
-
var utc = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
|
|
1640
|
-
return utc;
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
;// CONCATENATED MODULE: ./src/components/Infos.vue?vue&type=script&lang=js&
|
|
1645
|
-
/* harmony default export */ var components_Infosvue_type_script_lang_js_ = (Infosvue_type_script_lang_js_);
|
|
1646
|
-
;// CONCATENATED MODULE: ./src/components/Infos.vue
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
/* normalize component */
|
|
1653
|
-
;
|
|
1654
|
-
var Infos_component = (0,componentNormalizer/* default */.Z)(
|
|
1655
|
-
components_Infosvue_type_script_lang_js_,
|
|
1656
|
-
Infosvue_type_template_id_68da7f95_render,
|
|
1657
|
-
Infosvue_type_template_id_68da7f95_staticRenderFns,
|
|
1658
|
-
false,
|
|
1659
|
-
null,
|
|
1660
|
-
null,
|
|
1661
|
-
null
|
|
1662
|
-
|
|
1663
|
-
)
|
|
1664
|
-
|
|
1665
|
-
/* harmony default export */ var Infos = (Infos_component.exports);
|
|
1666
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/VideoProgress.vue?vue&type=template&id=7fe6f244&scoped=true&
|
|
1667
|
-
var VideoProgressvue_type_template_id_7fe6f244_scoped_true_render = function render() {
|
|
1668
|
-
var _vm = this,
|
|
1669
|
-
_c = _vm._self._c;
|
|
1670
|
-
return _c('div', [_c('div', {
|
|
1671
|
-
staticClass: "visualization-row",
|
|
1672
|
-
attrs: {
|
|
1673
|
-
"id": "progress"
|
|
1674
|
-
},
|
|
1675
|
-
on: {
|
|
1676
|
-
"mousedown": _vm.progressMouseDown
|
|
1677
|
-
}
|
|
1678
|
-
}, [_c('span', {
|
|
1679
|
-
staticClass: "progressLabel"
|
|
1680
|
-
}, [_vm._v(" " + _vm._s(_vm.convertToAudienceTime(_vm.videoTime)) + " ")]), _c('span', {
|
|
1681
|
-
staticClass: "progressBar"
|
|
1682
|
-
})]), _c('hr', {
|
|
1683
|
-
staticClass: "visualization-divider"
|
|
1684
|
-
})]);
|
|
1685
|
-
};
|
|
1686
|
-
var VideoProgressvue_type_template_id_7fe6f244_scoped_true_staticRenderFns = [];
|
|
1687
|
-
|
|
1688
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/VideoProgress.vue?vue&type=script&lang=js&
|
|
1689
|
-
/* harmony default export */ var VideoProgressvue_type_script_lang_js_ = ({
|
|
1690
|
-
props: {
|
|
1691
|
-
videoTime: {
|
|
1692
|
-
type: Number,
|
|
1693
|
-
required: true
|
|
1694
|
-
}
|
|
1695
|
-
},
|
|
1696
|
-
methods: {
|
|
1697
|
-
progressMouseDown(e) {
|
|
1698
|
-
this.progressVideoDrag = true;
|
|
1699
|
-
const array = this.$refs.frames.filter(fc => fc.videoStatus === fc.Status.playing);
|
|
1700
|
-
if (array.length === 1) {
|
|
1701
|
-
const frame = array[0];
|
|
1702
|
-
frame.playOrPause();
|
|
1703
|
-
}
|
|
1704
|
-
this.updateProgress(e);
|
|
1705
|
-
window.addEventListener('mouseup', this.progressMouseUp);
|
|
1706
|
-
window.addEventListener('mousemove', this.progressMouseMove);
|
|
1707
|
-
},
|
|
1708
|
-
progressMouseUp(e) {
|
|
1709
|
-
if (this.progressVideoDrag) {
|
|
1710
|
-
const array = this.$refs.frames.filter(fc => fc.videoStatus === fc.Status.paused);
|
|
1711
|
-
if (array.length === 1) {
|
|
1712
|
-
const frame = array[0];
|
|
1713
|
-
frame.playOrPause();
|
|
1714
|
-
}
|
|
1715
|
-
this.updateProgress(e);
|
|
1716
|
-
}
|
|
1717
|
-
window.removeEventListener('mouseup', this.progressMouseUp);
|
|
1718
|
-
window.removeEventListener('mousemove', this.progressMouseMove);
|
|
1719
|
-
this.progressVideoDrag = false;
|
|
1720
|
-
},
|
|
1721
|
-
progressMouseMove(e) {
|
|
1722
|
-
if (this.progressVideoDrag) {
|
|
1723
|
-
this.updateProgress(e);
|
|
1724
|
-
}
|
|
1725
|
-
},
|
|
1726
|
-
updateProgress(e, time) {
|
|
1727
|
-
let percentage;
|
|
1728
|
-
const element = document.getElementById('progress');
|
|
1729
|
-
const elementBar = element.getElementsByClassName('progressBar')[0];
|
|
1730
|
-
let frames = this.$refs.frames.filter(fc => fc.videoStatus === fc.Status.playing || fc.videoStatus === fc.Status.paused);
|
|
1731
|
-
let frame = frames.length === 1 ? frames[0] : null;
|
|
1732
|
-
if (time && frame) {
|
|
1733
|
-
let timeInSeconds = frame.videoCurrentTime - this.sliderStartTime;
|
|
1734
|
-
percentage = timeInSeconds / this.videoSliderTotalDuration * 100;
|
|
1735
|
-
} else if (e) {
|
|
1736
|
-
const rect = element.getBoundingClientRect();
|
|
1737
|
-
const max = Math.round(rect.width);
|
|
1738
|
-
const pos = e.pageX - Math.round(rect.left);
|
|
1739
|
-
percentage = pos / max * 100 <= 100 ? pos / max * 100 : 100;
|
|
1740
|
-
if (frame) {
|
|
1741
|
-
let targetInSeconds = this.videoSliderTotalDuration * (percentage / 100);
|
|
1742
|
-
let timeStampToJump = parseInt(this.sliderStartTime + targetInSeconds);
|
|
1743
|
-
frame.videoJumpToTimeStamp(timeStampToJump);
|
|
1744
|
-
}
|
|
1745
|
-
} else {
|
|
1746
|
-
percentage = 0;
|
|
1747
|
-
}
|
|
1748
|
-
elementBar.style.width = `${percentage}%`;
|
|
1749
|
-
},
|
|
1750
|
-
getDateParts() {
|
|
1751
|
-
let date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.date;
|
|
1752
|
-
const d = new Date(date);
|
|
1753
|
-
return {
|
|
1754
|
-
year: d.getFullYear(),
|
|
1755
|
-
month: d.getMonth(),
|
|
1756
|
-
day: d.getDate()
|
|
1757
|
-
};
|
|
1758
|
-
},
|
|
1759
|
-
dateInUtc(miliSeconds) {
|
|
1760
|
-
var date = new Date(miliSeconds);
|
|
1761
|
-
var utc = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
|
|
1762
|
-
return utc;
|
|
1763
|
-
},
|
|
1764
|
-
convertToAudienceTime(time) {
|
|
1765
|
-
let separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ':';
|
|
1766
|
-
const d = this.getDateParts();
|
|
1767
|
-
const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
|
|
1768
|
-
let hour = this.dateInUtc(time * 1000).toTimeString().split(' ')[0].split(':').map(Number);
|
|
1769
|
-
if (time > limit && time <= limit + this.startAudienceSeconds) {
|
|
1770
|
-
hour[0] = 24 + hour[0];
|
|
1771
|
-
}
|
|
1772
|
-
return hour.map(part => part > 9 ? part.toString() : '0' + part).join(separator);
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
});
|
|
1776
|
-
;// CONCATENATED MODULE: ./src/components/VideoProgress.vue?vue&type=script&lang=js&
|
|
1777
|
-
/* harmony default export */ var components_VideoProgressvue_type_script_lang_js_ = (VideoProgressvue_type_script_lang_js_);
|
|
1778
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/VideoProgress.vue?vue&type=style&index=0&id=7fe6f244&prod&scoped=true&lang=css&
|
|
1779
|
-
// extracted by mini-css-extract-plugin
|
|
1780
|
-
|
|
1781
|
-
;// CONCATENATED MODULE: ./src/components/VideoProgress.vue?vue&type=style&index=0&id=7fe6f244&prod&scoped=true&lang=css&
|
|
1782
|
-
|
|
1783
|
-
;// CONCATENATED MODULE: ./src/components/VideoProgress.vue
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
;
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
/* normalize component */
|
|
1791
|
-
|
|
1792
|
-
var VideoProgress_component = (0,componentNormalizer/* default */.Z)(
|
|
1793
|
-
components_VideoProgressvue_type_script_lang_js_,
|
|
1794
|
-
VideoProgressvue_type_template_id_7fe6f244_scoped_true_render,
|
|
1795
|
-
VideoProgressvue_type_template_id_7fe6f244_scoped_true_staticRenderFns,
|
|
1796
|
-
false,
|
|
1797
|
-
null,
|
|
1798
|
-
"7fe6f244",
|
|
1799
|
-
null
|
|
1800
|
-
|
|
1801
|
-
)
|
|
1802
|
-
|
|
1803
|
-
/* harmony default export */ var VideoProgress = (VideoProgress_component.exports);
|
|
1804
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Settings.vue?vue&type=template&id=9f47e4d0&scoped=true&
|
|
1805
|
-
var Settingsvue_type_template_id_9f47e4d0_scoped_true_render = function render() {
|
|
1806
|
-
var _vm = this,
|
|
1807
|
-
_c = _vm._self._c;
|
|
1808
|
-
return _c('div', [_vm.dialogsVisibility.frames ? _c('GlobalEvents', {
|
|
1809
|
-
on: {
|
|
1810
|
-
"keydown": [function ($event) {
|
|
1811
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 37) return null;
|
|
1812
|
-
return _vm.prevFormat.apply(null, arguments);
|
|
1813
|
-
}, function ($event) {
|
|
1814
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 39) return null;
|
|
1815
|
-
return _vm.nextFormat.apply(null, arguments);
|
|
1816
|
-
}]
|
|
1817
|
-
}
|
|
1818
|
-
}) : _vm._e(), _c('dialog', {
|
|
1819
|
-
ref: "frames"
|
|
1820
|
-
}, [_c('div', {
|
|
1821
|
-
staticClass: "visualization-row",
|
|
1822
|
-
staticStyle: {
|
|
1823
|
-
"padding": "5px",
|
|
1824
|
-
"font-weight": "bold",
|
|
1825
|
-
"background-color": "var(--visualization-primary)",
|
|
1826
|
-
"border-color": "var(--visualization-primary)",
|
|
1827
|
-
"height": "40px",
|
|
1828
|
-
"color": "white",
|
|
1829
|
-
"display": "flex",
|
|
1830
|
-
"justify-content": "center",
|
|
1831
|
-
"padding-top": "10px"
|
|
1832
|
-
}
|
|
1833
|
-
}, [_vm._v(" " + _vm._s(_vm.$t('infoBar.gridForm')) + " ")]), _c('div', {
|
|
1834
|
-
staticClass: "visualization-row",
|
|
1835
|
-
staticStyle: {
|
|
1836
|
-
"justify-content": "center"
|
|
1837
|
-
}
|
|
1838
|
-
}, _vm._l(_vm.items, function (item, index) {
|
|
1839
|
-
return _c('div', {
|
|
1840
|
-
key: index,
|
|
1841
|
-
staticClass: "visualization-col",
|
|
1842
|
-
staticStyle: {
|
|
1843
|
-
"min-width": "200px",
|
|
1844
|
-
"max-width": "200px"
|
|
1845
|
-
}
|
|
1846
|
-
}, [_c('img', {
|
|
1847
|
-
style: _vm.framesValue !== item.value ? 'filter: grayscale(1)' : '',
|
|
1848
|
-
attrs: {
|
|
1849
|
-
"src": item.image,
|
|
1850
|
-
"width": "100%"
|
|
1851
|
-
},
|
|
1852
|
-
on: {
|
|
1853
|
-
"click": () => _vm.framesValue = item.value
|
|
1854
|
-
}
|
|
1855
|
-
})]);
|
|
1856
|
-
}), 0), _c('div', {
|
|
1857
|
-
staticClass: "visualization-divider"
|
|
1858
|
-
}), _c('div', {
|
|
1859
|
-
staticClass: "visualization-row",
|
|
1860
|
-
staticStyle: {
|
|
1861
|
-
"display": "flex",
|
|
1862
|
-
"justify-content": "center",
|
|
1863
|
-
"margin-top": "10px",
|
|
1864
|
-
"margin-bottom": "10px"
|
|
1865
|
-
}
|
|
1866
|
-
}, [_c('button', {
|
|
1867
|
-
staticStyle: {
|
|
1868
|
-
"border-radius": "4px",
|
|
1869
|
-
"height": "35px",
|
|
1870
|
-
"width": "70px",
|
|
1871
|
-
"background-color": "var(--visualization-primary)",
|
|
1872
|
-
"border-color": "var(--visualization-primary)",
|
|
1873
|
-
"color": "white"
|
|
1874
|
-
},
|
|
1875
|
-
on: {
|
|
1876
|
-
"click": function ($event) {
|
|
1877
|
-
return _vm.$emit('close', 'frames');
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
}, [_vm._v(" Ok ")])])]), _c('dialog', {
|
|
1881
|
-
ref: "secondsPerFrame"
|
|
1882
|
-
}, [_c('div', {
|
|
1883
|
-
staticClass: "visualization-row",
|
|
1884
|
-
staticStyle: {
|
|
1885
|
-
"padding": "5px",
|
|
1886
|
-
"font-weight": "bold",
|
|
1887
|
-
"background-color": "var(--visualization-primary)",
|
|
1888
|
-
"border-color": "var(--visualization-primary)",
|
|
1889
|
-
"height": "40px",
|
|
1890
|
-
"color": "white",
|
|
1891
|
-
"display": "flex",
|
|
1892
|
-
"justify-content": "center",
|
|
1893
|
-
"padding-top": "10px"
|
|
1894
|
-
}
|
|
1895
|
-
}, [_vm._v(" " + _vm._s(_vm.$t('infoBar.secondImage')) + " ")]), _c('div', {
|
|
1896
|
-
staticClass: "visualization-row",
|
|
1897
|
-
staticStyle: {
|
|
1898
|
-
"margin": "25px",
|
|
1899
|
-
"height": "20px"
|
|
1900
|
-
}
|
|
1901
|
-
}, [_c('input', {
|
|
1902
|
-
directives: [{
|
|
1903
|
-
name: "model",
|
|
1904
|
-
rawName: "v-model",
|
|
1905
|
-
value: _vm.secondsPerFrameValue,
|
|
1906
|
-
expression: "secondsPerFrameValue"
|
|
1907
|
-
}],
|
|
1908
|
-
ref: "secondsPerFrameInput",
|
|
1909
|
-
staticStyle: {
|
|
1910
|
-
"height": "30px",
|
|
1911
|
-
"width": "300px"
|
|
1912
|
-
},
|
|
1913
|
-
attrs: {
|
|
1914
|
-
"type": "range",
|
|
1915
|
-
"step": "1",
|
|
1916
|
-
"max": "5",
|
|
1917
|
-
"min": "1"
|
|
1918
|
-
},
|
|
1919
|
-
domProps: {
|
|
1920
|
-
"value": _vm.secondsPerFrameValue
|
|
1921
|
-
},
|
|
1922
|
-
on: {
|
|
1923
|
-
"__r": function ($event) {
|
|
1924
|
-
_vm.secondsPerFrameValue = $event.target.value;
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
}), _c('span', {
|
|
1928
|
-
staticStyle: {
|
|
1929
|
-
"padding-left": "20px",
|
|
1930
|
-
"font-size": "16px"
|
|
1931
|
-
}
|
|
1932
|
-
}, [_vm._v(" " + _vm._s(_vm.secondsPerFrame + ' s'))])]), _c('div', {
|
|
1933
|
-
staticClass: "visualization-divider",
|
|
1934
|
-
staticStyle: {
|
|
1935
|
-
"margin": "10px"
|
|
1936
|
-
}
|
|
1937
|
-
}), _c('div', {
|
|
1938
|
-
staticClass: "visualization-row",
|
|
1939
|
-
staticStyle: {
|
|
1940
|
-
"display": "flex",
|
|
1941
|
-
"justify-content": "center",
|
|
1942
|
-
"margin-top": "10px"
|
|
1943
|
-
}
|
|
1944
|
-
}, [_c('button', {
|
|
1945
|
-
staticStyle: {
|
|
1946
|
-
"border-radius": "4px",
|
|
1947
|
-
"height": "35px",
|
|
1948
|
-
"width": "70px",
|
|
1949
|
-
"background-color": "var(--visualization-primary)",
|
|
1950
|
-
"border-color": "var(--visualization-primary)",
|
|
1951
|
-
"color": "white",
|
|
1952
|
-
"margin-bottom": "8px"
|
|
1953
|
-
},
|
|
1954
|
-
on: {
|
|
1955
|
-
"click": function ($event) {
|
|
1956
|
-
return _vm.$emit('close', 'secondsPerFrame');
|
|
1957
|
-
}
|
|
1958
|
-
}
|
|
1959
|
-
}, [_vm._v(" Ok ")])])]), _c('dialog', {
|
|
1960
|
-
ref: "goTo"
|
|
1961
|
-
}, [_c('div', {
|
|
1962
|
-
staticStyle: {
|
|
1963
|
-
"padding": "5px",
|
|
1964
|
-
"font-weight": "bold",
|
|
1965
|
-
"background-color": "var(--visualization-primary)",
|
|
1966
|
-
"border-color": "var(--visualization-primary)",
|
|
1967
|
-
"height": "35px",
|
|
1968
|
-
"color": "white",
|
|
1969
|
-
"display": "flex",
|
|
1970
|
-
"justify-content": "center",
|
|
1971
|
-
"padding-top": "8px"
|
|
1972
|
-
}
|
|
1973
|
-
}, [_vm._v(" " + _vm._s(_vm.$t('infoBar.goTo')) + " ")]), _c('div', {
|
|
1974
|
-
staticClass: "visualization-row",
|
|
1975
|
-
staticStyle: {
|
|
1976
|
-
"margin": "25px",
|
|
1977
|
-
"height": "20px"
|
|
1978
|
-
}
|
|
1979
|
-
}, [_c('input', {
|
|
1980
|
-
directives: [{
|
|
1981
|
-
name: "model",
|
|
1982
|
-
rawName: "v-model",
|
|
1983
|
-
value: _vm.goToValue,
|
|
1984
|
-
expression: "goToValue"
|
|
1985
|
-
}, {
|
|
1986
|
-
name: "mask",
|
|
1987
|
-
rawName: "v-mask",
|
|
1988
|
-
value: '##:##:##',
|
|
1989
|
-
expression: "'##:##:##'"
|
|
1990
|
-
}],
|
|
1991
|
-
staticStyle: {
|
|
1992
|
-
"height": "30px",
|
|
1993
|
-
"width": "300px",
|
|
1994
|
-
"border": "0.1px solid #c2c9d6",
|
|
1995
|
-
"border-radius": "3px",
|
|
1996
|
-
"padding": "5px"
|
|
1997
|
-
},
|
|
1998
|
-
attrs: {
|
|
1999
|
-
"type": "text",
|
|
2000
|
-
"placeholder": "hh:mm:ss"
|
|
2001
|
-
},
|
|
2002
|
-
domProps: {
|
|
2003
|
-
"value": _vm.goToValue
|
|
2004
|
-
},
|
|
2005
|
-
on: {
|
|
2006
|
-
"input": function ($event) {
|
|
2007
|
-
if ($event.target.composing) return;
|
|
2008
|
-
_vm.goToValue = $event.target.value;
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
})]), _c('div', {
|
|
2012
|
-
staticClass: "visualization-divider",
|
|
2013
|
-
staticStyle: {
|
|
2014
|
-
"margin-top": "40px"
|
|
2015
|
-
}
|
|
2016
|
-
}), _c('div', {
|
|
2017
|
-
staticClass: "visualization-row",
|
|
2018
|
-
staticStyle: {
|
|
2019
|
-
"display": "flex",
|
|
2020
|
-
"justify-content": "center",
|
|
2021
|
-
"margin-top": "10px",
|
|
2022
|
-
"margin-bottom": "10px"
|
|
2023
|
-
}
|
|
2024
|
-
}, [_c('button', {
|
|
2025
|
-
staticStyle: {
|
|
2026
|
-
"border-radius": "4px",
|
|
2027
|
-
"height": "35px",
|
|
2028
|
-
"width": "70px",
|
|
2029
|
-
"background-color": "var(--visualization-primary)",
|
|
2030
|
-
"border-color": "var(--visualization-primary)",
|
|
2031
|
-
"color": "white"
|
|
2032
|
-
},
|
|
2033
|
-
on: {
|
|
2034
|
-
"click": () => {
|
|
2035
|
-
_vm.$emit('close', 'goTo');
|
|
2036
|
-
_vm.$emit('change-go-to', _vm.goToValue);
|
|
2037
|
-
_vm.goToValue = '';
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
}, [_vm._v(" Ok ")])])]), _c('GlobalEvents', {
|
|
2041
|
-
on: {
|
|
2042
|
-
"keydown": [function ($event) {
|
|
2043
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 107) return null;
|
|
2044
|
-
return _vm.changePlaybackRate(1);
|
|
2045
|
-
}, function ($event) {
|
|
2046
|
-
if (!$event.type.indexOf('key') && $event.keyCode !== 109) return null;
|
|
2047
|
-
return _vm.changePlaybackRate(-1);
|
|
2048
|
-
}]
|
|
2049
|
-
}
|
|
2050
|
-
}), _c('dialog', {
|
|
2051
|
-
ref: "playbackRate"
|
|
2052
|
-
}, [_c('div', {
|
|
2053
|
-
staticClass: "visualization-row",
|
|
2054
|
-
staticStyle: {
|
|
2055
|
-
"padding": "5px",
|
|
2056
|
-
"font-weight": "bold",
|
|
2057
|
-
"background-color": "var(--visualization-primary)",
|
|
2058
|
-
"border-color": "var(--visualization-primary)",
|
|
2059
|
-
"height": "35px",
|
|
2060
|
-
"color": "white",
|
|
2061
|
-
"display": "flex",
|
|
2062
|
-
"justify-content": "center",
|
|
2063
|
-
"padding-top": "8px"
|
|
2064
|
-
}
|
|
2065
|
-
}, [_vm._v(" " + _vm._s(_vm.$t('infoBar.playbackSpeed')) + " ")]), _c('div', {
|
|
2066
|
-
staticClass: "visualization-row",
|
|
2067
|
-
staticStyle: {
|
|
2068
|
-
"margin": "25px",
|
|
2069
|
-
"height": "20px",
|
|
2070
|
-
"width": "380px"
|
|
2071
|
-
}
|
|
2072
|
-
}, [_c('input', {
|
|
2073
|
-
directives: [{
|
|
2074
|
-
name: "model",
|
|
2075
|
-
rawName: "v-model",
|
|
2076
|
-
value: _vm.playbackRateValue,
|
|
2077
|
-
expression: "playbackRateValue"
|
|
2078
|
-
}],
|
|
2079
|
-
ref: "playbackRateInput",
|
|
2080
|
-
staticStyle: {
|
|
2081
|
-
"height": "30px",
|
|
2082
|
-
"width": "300px"
|
|
2083
|
-
},
|
|
2084
|
-
attrs: {
|
|
2085
|
-
"type": "range",
|
|
2086
|
-
"step": "0.25",
|
|
2087
|
-
"max": "3",
|
|
2088
|
-
"min": "1"
|
|
2089
|
-
},
|
|
2090
|
-
domProps: {
|
|
2091
|
-
"value": _vm.playbackRateValue
|
|
2092
|
-
},
|
|
2093
|
-
on: {
|
|
2094
|
-
"__r": function ($event) {
|
|
2095
|
-
_vm.playbackRateValue = $event.target.value;
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
}), _c('span', {
|
|
2099
|
-
staticStyle: {
|
|
2100
|
-
"padding-left": "20px",
|
|
2101
|
-
"padding-right": "20px",
|
|
2102
|
-
"font-size": "16px"
|
|
2103
|
-
}
|
|
2104
|
-
}, [_vm._v(_vm._s(_vm.playbackRate + 'x'))])]), _c('div', {
|
|
2105
|
-
staticClass: "visualization-divider",
|
|
2106
|
-
staticStyle: {
|
|
2107
|
-
"margin-top": "40px"
|
|
2108
|
-
}
|
|
2109
|
-
}), _c('div', {
|
|
2110
|
-
staticClass: "visualization-row",
|
|
2111
|
-
staticStyle: {
|
|
2112
|
-
"display": "flex",
|
|
2113
|
-
"justify-content": "center",
|
|
2114
|
-
"margin-top": "10px",
|
|
2115
|
-
"margin-bottom": "10px"
|
|
2116
|
-
}
|
|
2117
|
-
}, [_c('button', {
|
|
2118
|
-
staticStyle: {
|
|
2119
|
-
"border-radius": "4px",
|
|
2120
|
-
"height": "35px",
|
|
2121
|
-
"width": "70px",
|
|
2122
|
-
"background-color": "var(--visualization-primary)",
|
|
2123
|
-
"border-color": "var(--visualization-primary)",
|
|
2124
|
-
"color": "white"
|
|
2125
|
-
},
|
|
2126
|
-
on: {
|
|
2127
|
-
"click": function ($event) {
|
|
2128
|
-
return _vm.$emit('close', 'playbackRate');
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
}, [_vm._v(" Ok ")])])])], 1);
|
|
2132
|
-
};
|
|
2133
|
-
var Settingsvue_type_template_id_9f47e4d0_scoped_true_staticRenderFns = [];
|
|
2134
|
-
|
|
2135
|
-
;// CONCATENATED MODULE: ./src/assets/grid/1x1.svg
|
|
2136
|
-
var _1x1_namespaceObject = __webpack_require__.p + "img/1x1.f865594b.svg";
|
|
2137
|
-
;// CONCATENATED MODULE: ./src/assets/grid/2x1.svg
|
|
2138
|
-
var _2x1_namespaceObject = __webpack_require__.p + "img/2x1.6bc80fec.svg";
|
|
2139
|
-
;// CONCATENATED MODULE: ./src/assets/grid/3x1.svg
|
|
2140
|
-
var _3x1_namespaceObject = __webpack_require__.p + "img/3x1.8fe1c055.svg";
|
|
2141
|
-
;// CONCATENATED MODULE: ./src/assets/grid/3x2.svg
|
|
2142
|
-
var _3x2_namespaceObject = __webpack_require__.p + "img/3x2.f5153612.svg";
|
|
2143
|
-
;// CONCATENATED MODULE: ./src/assets/grid/4x1.svg
|
|
2144
|
-
var _4x1_namespaceObject = __webpack_require__.p + "img/4x1.22f434b0.svg";
|
|
2145
|
-
;// CONCATENATED MODULE: ./src/assets/grid/4x2.svg
|
|
2146
|
-
var _4x2_namespaceObject = __webpack_require__.p + "img/4x2.3810a721.svg";
|
|
2147
|
-
;// CONCATENATED MODULE: ./src/assets/grid/5x1.svg
|
|
2148
|
-
var _5x1_namespaceObject = __webpack_require__.p + "img/5x1.c0878e49.svg";
|
|
2149
|
-
;// CONCATENATED MODULE: ./src/assets/grid/5x2.svg
|
|
2150
|
-
var _5x2_namespaceObject = __webpack_require__.p + "img/5x2.b70b5289.svg";
|
|
2151
|
-
;// CONCATENATED MODULE: ./src/assets/grid/6x1.svg
|
|
2152
|
-
var _6x1_namespaceObject = __webpack_require__.p + "img/6x1.28b9840c.svg";
|
|
2153
|
-
;// CONCATENATED MODULE: ./src/assets/grid/6x2.svg
|
|
2154
|
-
var _6x2_namespaceObject = __webpack_require__.p + "img/6x2.6b117ba7.svg";
|
|
2155
|
-
;// CONCATENATED MODULE: ./src/assets/grid/index.js
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
/* harmony default export */ var grid = ({
|
|
2167
|
-
'1x1': _1x1_namespaceObject,
|
|
2168
|
-
'2x1': _2x1_namespaceObject,
|
|
2169
|
-
'3x1': _3x1_namespaceObject,
|
|
2170
|
-
'3x2': _3x2_namespaceObject,
|
|
2171
|
-
'4x1': _4x1_namespaceObject,
|
|
2172
|
-
'4x2': _4x2_namespaceObject,
|
|
2173
|
-
'5x1': _5x1_namespaceObject,
|
|
2174
|
-
'5x2': _5x2_namespaceObject,
|
|
2175
|
-
'6x1': _6x1_namespaceObject,
|
|
2176
|
-
'6x2': _6x2_namespaceObject
|
|
2177
|
-
});
|
|
2178
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Settings.vue?vue&type=script&lang=js&
|
|
2179
|
-
|
|
2180
|
-
/* harmony default export */ var Settingsvue_type_script_lang_js_ = ({
|
|
2181
|
-
props: {
|
|
2182
|
-
dialogsVisibility: {
|
|
2183
|
-
type: Object,
|
|
2184
|
-
required: false
|
|
2185
|
-
},
|
|
2186
|
-
playbackRate: {
|
|
2187
|
-
type: Number,
|
|
2188
|
-
required: true
|
|
2189
|
-
},
|
|
2190
|
-
secondsPerFrame: {
|
|
2191
|
-
type: Number,
|
|
2192
|
-
required: true
|
|
2193
|
-
},
|
|
2194
|
-
framesPerRow: {
|
|
2195
|
-
type: Number,
|
|
2196
|
-
required: true
|
|
2197
|
-
},
|
|
2198
|
-
numberOfRows: {
|
|
2199
|
-
type: Number,
|
|
2200
|
-
required: true
|
|
2201
|
-
}
|
|
2202
|
-
},
|
|
2203
|
-
data() {
|
|
2204
|
-
return {
|
|
2205
|
-
openBlocksDialog: false,
|
|
2206
|
-
time: '',
|
|
2207
|
-
rangeBlocks: {
|
|
2208
|
-
ini: null,
|
|
2209
|
-
end: null,
|
|
2210
|
-
date: null
|
|
2211
|
-
},
|
|
2212
|
-
items: [{
|
|
2213
|
-
text: '2x1',
|
|
2214
|
-
value: 1,
|
|
2215
|
-
image: grid['2x1']
|
|
2216
|
-
}, {
|
|
2217
|
-
text: '3x1',
|
|
2218
|
-
value: 2,
|
|
2219
|
-
image: grid['3x1']
|
|
2220
|
-
}, {
|
|
2221
|
-
text: '3x2',
|
|
2222
|
-
value: 3,
|
|
2223
|
-
image: grid['3x2']
|
|
2224
|
-
}, {
|
|
2225
|
-
text: '4x1',
|
|
2226
|
-
value: 4,
|
|
2227
|
-
image: grid['4x1']
|
|
2228
|
-
}, {
|
|
2229
|
-
text: '4x2',
|
|
2230
|
-
value: 5,
|
|
2231
|
-
image: grid['4x2']
|
|
2232
|
-
}, {
|
|
2233
|
-
text: '5x1',
|
|
2234
|
-
value: 6,
|
|
2235
|
-
image: grid['5x1']
|
|
2236
|
-
}, {
|
|
2237
|
-
text: '5x2',
|
|
2238
|
-
value: 7,
|
|
2239
|
-
image: grid['5x2']
|
|
2240
|
-
}, {
|
|
2241
|
-
text: '6x1',
|
|
2242
|
-
value: 8,
|
|
2243
|
-
image: grid['6x1']
|
|
2244
|
-
}, {
|
|
2245
|
-
text: '6x2',
|
|
2246
|
-
value: 9,
|
|
2247
|
-
image: grid['6x2']
|
|
2248
|
-
}],
|
|
2249
|
-
// NEW
|
|
2250
|
-
goToValue: ''
|
|
2251
|
-
};
|
|
2252
|
-
},
|
|
2253
|
-
mounted() {
|
|
2254
|
-
this.toogleDialogs();
|
|
2255
|
-
},
|
|
2256
|
-
computed: {
|
|
2257
|
-
secondsPerFrameValue: {
|
|
2258
|
-
get() {
|
|
2259
|
-
return this.secondsPerFrame;
|
|
2260
|
-
},
|
|
2261
|
-
set(val) {
|
|
2262
|
-
this.$emit('change-seconds-per-frame', parseInt(val));
|
|
2263
|
-
}
|
|
2264
|
-
},
|
|
2265
|
-
playbackRateValue: {
|
|
2266
|
-
get() {
|
|
2267
|
-
return this.playbackRate;
|
|
2268
|
-
},
|
|
2269
|
-
set(val) {
|
|
2270
|
-
this.$emit('change-playback-rate', parseFloat(val));
|
|
2271
|
-
}
|
|
2272
|
-
},
|
|
2273
|
-
framesValue: {
|
|
2274
|
-
get() {
|
|
2275
|
-
return this.items.find(item => item.text === `${this.framesPerRow}x${this.numberOfRows}`).value;
|
|
2276
|
-
},
|
|
2277
|
-
set(value) {
|
|
2278
|
-
this.$emit('set-frames-selection', value);
|
|
2279
|
-
}
|
|
2280
|
-
},
|
|
2281
|
-
timeRules() {
|
|
2282
|
-
return [time => time >= '02:30:00' && time <= '26:29:59' || this.$i18n.t('form.mustBeBetween')];
|
|
2283
|
-
}
|
|
2284
|
-
},
|
|
2285
|
-
methods: {
|
|
2286
|
-
toogleDialogs() {
|
|
2287
|
-
for (const dialog of Object.values(this.$refs)) {
|
|
2288
|
-
dialog.close?.();
|
|
2289
|
-
}
|
|
2290
|
-
const openDialog = Object.keys(this.dialogsVisibility).find(key => this.dialogsVisibility[key]);
|
|
2291
|
-
if (openDialog) {
|
|
2292
|
-
this.$refs[openDialog].showModal();
|
|
2293
|
-
}
|
|
2294
|
-
},
|
|
2295
|
-
prevFormat() {
|
|
2296
|
-
if (this.items.find(format => format.value === this.framesValue - 1)) {
|
|
2297
|
-
this.framesValue--;
|
|
2298
|
-
}
|
|
2299
|
-
},
|
|
2300
|
-
nextFormat() {
|
|
2301
|
-
if (this.items.find(format => format.value === this.framesValue + 1)) {
|
|
2302
|
-
this.framesValue++;
|
|
2303
|
-
}
|
|
2304
|
-
},
|
|
2305
|
-
changePlaybackRate() {
|
|
2306
|
-
let direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
2307
|
-
if (direction === 1) {
|
|
2308
|
-
this.$refs.playbackRateInput.stepUp();
|
|
2309
|
-
} else if (direction === -1) {
|
|
2310
|
-
this.$refs.playbackRateInput.stepDown();
|
|
2311
|
-
}
|
|
2312
|
-
this.playbackRateValue = this.$refs.playbackRateInput.value;
|
|
2313
|
-
},
|
|
2314
|
-
closeBlocksDialog() {
|
|
2315
|
-
Object.entries(this.rangeBlocks).forEach(_ref => {
|
|
2316
|
-
let [key, value] = _ref;
|
|
2317
|
-
if (!value || key == 'date') return;
|
|
2318
|
-
var res = value.replace(/\D/g, '');
|
|
2319
|
-
if (res.length < 6) {
|
|
2320
|
-
for (let i = res.length; i < 6; i++) {
|
|
2321
|
-
res += '0';
|
|
2322
|
-
}
|
|
2323
|
-
}
|
|
2324
|
-
res.match(/.{1,2}/g);
|
|
2325
|
-
let a = res.substring(0, 2);
|
|
2326
|
-
let b = res.substring(2, 4);
|
|
2327
|
-
let c = res.substring(4, 6);
|
|
2328
|
-
this.rangeBlocks[key] = a + ':' + b + ':' + c;
|
|
2329
|
-
});
|
|
2330
|
-
this.openBlocksDialog = false;
|
|
2331
|
-
this.$emit('goToBlockInterval', this.rangeBlocks);
|
|
2332
|
-
}
|
|
2333
|
-
},
|
|
2334
|
-
watch: {
|
|
2335
|
-
dialogsVisibility: {
|
|
2336
|
-
handler() {
|
|
2337
|
-
this.toogleDialogs();
|
|
2338
|
-
},
|
|
2339
|
-
deep: true
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
});
|
|
2343
|
-
;// CONCATENATED MODULE: ./src/components/Settings.vue?vue&type=script&lang=js&
|
|
2344
|
-
/* harmony default export */ var components_Settingsvue_type_script_lang_js_ = (Settingsvue_type_script_lang_js_);
|
|
2345
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/Settings.vue?vue&type=style&index=0&id=9f47e4d0&prod&scoped=true&lang=css&
|
|
2346
|
-
// extracted by mini-css-extract-plugin
|
|
2347
|
-
|
|
2348
|
-
;// CONCATENATED MODULE: ./src/components/Settings.vue?vue&type=style&index=0&id=9f47e4d0&prod&scoped=true&lang=css&
|
|
2349
|
-
|
|
2350
|
-
;// CONCATENATED MODULE: ./src/components/Settings.vue
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
;
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
/* normalize component */
|
|
2358
|
-
|
|
2359
|
-
var Settings_component = (0,componentNormalizer/* default */.Z)(
|
|
2360
|
-
components_Settingsvue_type_script_lang_js_,
|
|
2361
|
-
Settingsvue_type_template_id_9f47e4d0_scoped_true_render,
|
|
2362
|
-
Settingsvue_type_template_id_9f47e4d0_scoped_true_staticRenderFns,
|
|
2363
|
-
false,
|
|
2364
|
-
null,
|
|
2365
|
-
"9f47e4d0",
|
|
2366
|
-
null
|
|
2367
|
-
|
|
2368
|
-
)
|
|
2369
|
-
|
|
2370
|
-
/* harmony default export */ var Settings = (Settings_component.exports);
|
|
2371
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/Visualization.vue?vue&type=script&lang=js&
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
const Positions = Object.freeze({
|
|
2380
|
-
previous: 0,
|
|
2381
|
-
current: 1,
|
|
2382
|
-
next: 2
|
|
2383
|
-
});
|
|
2384
|
-
/* harmony default export */ var Visualizationvue_type_script_lang_js_ = ({
|
|
2385
|
-
name: 'visualization-container',
|
|
2386
|
-
props: {
|
|
2387
|
-
value: {
|
|
2388
|
-
type: Boolean,
|
|
2389
|
-
required: true
|
|
2390
|
-
},
|
|
2391
|
-
date: {
|
|
2392
|
-
type: String,
|
|
2393
|
-
required: true
|
|
2394
|
-
},
|
|
2395
|
-
channel: {
|
|
2396
|
-
type: Number,
|
|
2397
|
-
required: true
|
|
2398
|
-
},
|
|
2399
|
-
startAudienceTime: {
|
|
2400
|
-
type: String,
|
|
2401
|
-
required: true
|
|
2402
|
-
},
|
|
2403
|
-
videoProgressBar: {
|
|
2404
|
-
type: Boolean,
|
|
2405
|
-
default: false
|
|
2406
|
-
},
|
|
2407
|
-
jumpOnInsert: {
|
|
2408
|
-
type: Boolean,
|
|
2409
|
-
default: false
|
|
2410
|
-
},
|
|
2411
|
-
framesFormat: {
|
|
2412
|
-
type: [Number, String],
|
|
2413
|
-
default: 6
|
|
2414
|
-
},
|
|
2415
|
-
maxSize: {
|
|
2416
|
-
type: Number
|
|
2417
|
-
}
|
|
2418
|
-
},
|
|
2419
|
-
components: {
|
|
2420
|
-
Frame: Frame,
|
|
2421
|
-
CommandBar: Commands,
|
|
2422
|
-
InfoBar: Infos,
|
|
2423
|
-
VideoProgress: VideoProgress,
|
|
2424
|
-
Settings: Settings
|
|
2425
|
-
// Help,
|
|
2426
|
-
},
|
|
2427
|
-
|
|
2428
|
-
data() {
|
|
2429
|
-
return {
|
|
2430
|
-
Positions,
|
|
2431
|
-
updatingChannel: null,
|
|
2432
|
-
dialog: false,
|
|
2433
|
-
timeLastBlock: null,
|
|
2434
|
-
alternativeServer: false,
|
|
2435
|
-
useCache: true,
|
|
2436
|
-
numberOfRows: 1,
|
|
2437
|
-
framesPerRow: 5,
|
|
2438
|
-
secondsPerFrame: 1,
|
|
2439
|
-
fInterface: null,
|
|
2440
|
-
velocity: 1,
|
|
2441
|
-
frames: [],
|
|
2442
|
-
previousFrames: [],
|
|
2443
|
-
nextFrames: [],
|
|
2444
|
-
channelCode: 0,
|
|
2445
|
-
videoPlaying: false,
|
|
2446
|
-
activeFrame: null,
|
|
2447
|
-
activeVideo: null,
|
|
2448
|
-
videoTime: 0,
|
|
2449
|
-
videoTotalTime: null,
|
|
2450
|
-
progressVideoDrag: false,
|
|
2451
|
-
hourIniSelected: false,
|
|
2452
|
-
hourEndSelected: false,
|
|
2453
|
-
canInsertTime: false,
|
|
2454
|
-
lastHeight: 0,
|
|
2455
|
-
loopInterval: null,
|
|
2456
|
-
nextLoop: false,
|
|
2457
|
-
prevLoop: false,
|
|
2458
|
-
videoSliderTotalDuration: 900,
|
|
2459
|
-
blockStartTime: null,
|
|
2460
|
-
media: null,
|
|
2461
|
-
changeServer: false,
|
|
2462
|
-
userMultiTabsGrid: false,
|
|
2463
|
-
userMultiTabsGridsModel: true,
|
|
2464
|
-
playbackRate: 1,
|
|
2465
|
-
paused: false,
|
|
2466
|
-
commandBarShow: true,
|
|
2467
|
-
dialogs: {
|
|
2468
|
-
playbackRate: false,
|
|
2469
|
-
goTo: false,
|
|
2470
|
-
secondsPerFrame: false,
|
|
2471
|
-
frames: false
|
|
2472
|
-
}
|
|
2473
|
-
};
|
|
2474
|
-
},
|
|
2475
|
-
async created() {
|
|
2476
|
-
this.changeServer = this.serverOfFrames === 'alternative';
|
|
2477
|
-
this.alternativeServer = this.serverOfFrames === 'alternative';
|
|
2478
|
-
const settings = [{
|
|
2479
|
-
framesPerRow: 2,
|
|
2480
|
-
numberOfRows: 1
|
|
2481
|
-
}, {
|
|
2482
|
-
framesPerRow: 3,
|
|
2483
|
-
numberOfRows: 1
|
|
2484
|
-
}, {
|
|
2485
|
-
framesPerRow: 3,
|
|
2486
|
-
numberOfRows: 2
|
|
2487
|
-
}, {
|
|
2488
|
-
framesPerRow: 4,
|
|
2489
|
-
numberOfRows: 1
|
|
2490
|
-
}, {
|
|
2491
|
-
framesPerRow: 4,
|
|
2492
|
-
numberOfRows: 2
|
|
2493
|
-
}, {
|
|
2494
|
-
framesPerRow: 5,
|
|
2495
|
-
numberOfRows: 1
|
|
2496
|
-
}, {
|
|
2497
|
-
framesPerRow: 5,
|
|
2498
|
-
numberOfRows: 2
|
|
2499
|
-
}, {
|
|
2500
|
-
framesPerRow: 6,
|
|
2501
|
-
numberOfRows: 1
|
|
2502
|
-
}, {
|
|
2503
|
-
framesPerRow: 6,
|
|
2504
|
-
numberOfRows: 2
|
|
2505
|
-
}];
|
|
2506
|
-
const storedOnDb = settings[parseInt(this.framesFormat) - 1];
|
|
2507
|
-
this.framesPerRow = storedOnDb.framesPerRow;
|
|
2508
|
-
this.numberOfRows = storedOnDb.numberOfRows;
|
|
2509
|
-
await this.createFramesInterface();
|
|
2510
|
-
if (this.maxSize) {
|
|
2511
|
-
this.resize(this.maxSize, true);
|
|
2512
|
-
}
|
|
2513
|
-
},
|
|
2514
|
-
methods: {
|
|
2515
|
-
framesClicked(e) {
|
|
2516
|
-
if (e.target.id != 'insert') {
|
|
2517
|
-
this.active = true;
|
|
2518
|
-
}
|
|
2519
|
-
},
|
|
2520
|
-
async goToStartBlock() {
|
|
2521
|
-
try {
|
|
2522
|
-
const d = new Date();
|
|
2523
|
-
let timestamp = Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
|
|
2524
|
-
const response = (await FramesService.getNextAvailableBlock({
|
|
2525
|
-
channel: this.channel,
|
|
2526
|
-
time: timestamp / 1000
|
|
2527
|
-
})).data;
|
|
2528
|
-
this.dialog = false;
|
|
2529
|
-
this.changeHour(this.convertToAudienceTime(response.data.start, ':'));
|
|
2530
|
-
} catch (err) {
|
|
2531
|
-
console.error(err);
|
|
2532
|
-
}
|
|
2533
|
-
},
|
|
2534
|
-
async checkAvailableBlock() {
|
|
2535
|
-
try {
|
|
2536
|
-
const d = new Date();
|
|
2537
|
-
let timestamp = Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
|
|
2538
|
-
const response = (await FramesService.getNextAvailableBlock({
|
|
2539
|
-
channel: this.channel,
|
|
2540
|
-
time: timestamp / 1000
|
|
2541
|
-
})).data;
|
|
2542
|
-
this.timeLastBlock = this.convertToAudienceTime(response.data.end, ':');
|
|
2543
|
-
this.dialog = true;
|
|
2544
|
-
if (!response.status) {
|
|
2545
|
-
this.timeLastBlock = 'N/D';
|
|
2546
|
-
}
|
|
2547
|
-
} catch (err) {
|
|
2548
|
-
console.error(err);
|
|
2549
|
-
}
|
|
2550
|
-
},
|
|
2551
|
-
updateSlider(videoStartTime, time) {
|
|
2552
|
-
// * atualizar slider se estiver fora do range definido previamente
|
|
2553
|
-
if (time < this.blockStartTime || time > this.blockStartTime || videoStartTime > this.blockStartTime + this.videoSliderTotalDuration) {
|
|
2554
|
-
this.blockStartTime = videoStartTime;
|
|
2555
|
-
this.videoSliderTotalDuration = 900;
|
|
2556
|
-
}
|
|
2557
|
-
},
|
|
2558
|
-
nextLoopActivate() {
|
|
2559
|
-
this.breakLoop();
|
|
2560
|
-
this.loopInterval = setInterval(this.next, 40);
|
|
2561
|
-
setTimeout(() => {
|
|
2562
|
-
this.nextLoop = true;
|
|
2563
|
-
}, 0);
|
|
2564
|
-
},
|
|
2565
|
-
prevLoopActivate() {
|
|
2566
|
-
this.breakLoop();
|
|
2567
|
-
this.loopInterval = setInterval(this.prev, 40);
|
|
2568
|
-
setTimeout(() => {
|
|
2569
|
-
this.prevLoop = true;
|
|
2570
|
-
}, 0);
|
|
2571
|
-
},
|
|
2572
|
-
breakLoop() {
|
|
2573
|
-
clearInterval(this.loopInterval);
|
|
2574
|
-
this.loopInterval = null;
|
|
2575
|
-
this.nextLoop = false;
|
|
2576
|
-
this.prevLoop = false;
|
|
2577
|
-
},
|
|
2578
|
-
changePlayPause(status) {
|
|
2579
|
-
this.paused = !status;
|
|
2580
|
-
},
|
|
2581
|
-
resize() {
|
|
2582
|
-
let height = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.lastHeight;
|
|
2583
|
-
this.lastHeight = height;
|
|
2584
|
-
if (this.$refs.frames) {
|
|
2585
|
-
for (let frame of this.$refs.frames) {
|
|
2586
|
-
frame.resize(height);
|
|
2587
|
-
}
|
|
2588
|
-
}
|
|
2589
|
-
this.$emit('resized');
|
|
2590
|
-
},
|
|
2591
|
-
async goToFirstFrame() {
|
|
2592
|
-
let frames = this.$refs.frames;
|
|
2593
|
-
let audienceTime = null;
|
|
2594
|
-
if (frames.length > 0) {
|
|
2595
|
-
let frame = frames[0].frame;
|
|
2596
|
-
audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
|
|
2597
|
-
}
|
|
2598
|
-
// if (audienceTime) {
|
|
2599
|
-
// this.changeHour(this.getLastFirtsBlockTime(audienceTime, true))
|
|
2600
|
-
// }
|
|
2601
|
-
if (audienceTime) {
|
|
2602
|
-
const [hours, minutes, seconds] = audienceTime.split(':');
|
|
2603
|
-
const totalSeconds = parseInt(hours) * 3600 + parseInt(minutes) * 60 + parseInt(seconds);
|
|
2604
|
-
if (totalSeconds >= 9000) this.changeHour(this.getLastFirtsBlockTime(audienceTime, true));else this.changeHour(this.getLastFirtsBlockTime('02:30:00', true));
|
|
2605
|
-
}
|
|
2606
|
-
},
|
|
2607
|
-
async goToLastFrame() {
|
|
2608
|
-
let frames = this.$refs.frames;
|
|
2609
|
-
let audienceTime = null;
|
|
2610
|
-
if (frames.length > 0) {
|
|
2611
|
-
let frame = frames[0].frame;
|
|
2612
|
-
audienceTime = this.getAudienceTime(frame.time, 0, 0, 0);
|
|
2613
|
-
}
|
|
2614
|
-
if (audienceTime) {
|
|
2615
|
-
this.changeHour(this.getLastFirtsBlockTime(audienceTime));
|
|
2616
|
-
}
|
|
2617
|
-
},
|
|
2618
|
-
getLastFirtsBlockTime(time) {
|
|
2619
|
-
let first = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
2620
|
-
if (time.indexOf(':') !== -1) {
|
|
2621
|
-
time = time.replace(/:/g, '');
|
|
2622
|
-
}
|
|
2623
|
-
let h, m, newTime;
|
|
2624
|
-
const t = time.match(/.{1,2}/g);
|
|
2625
|
-
if (t[0] && t[1]) {
|
|
2626
|
-
h = parseInt(t[0]);
|
|
2627
|
-
m = parseInt(t[1]);
|
|
2628
|
-
}
|
|
2629
|
-
if (h < 26) {
|
|
2630
|
-
if (m < 15) {
|
|
2631
|
-
if (first) newTime = t[0] + ':00:00';else newTime = t[0] + ':14:59';
|
|
2632
|
-
} else if (m < 30) {
|
|
2633
|
-
if (first) newTime = t[0] + ':15:00';else newTime = t[0] + ':29:59';
|
|
2634
|
-
} else if (m < 45) {
|
|
2635
|
-
if (first) newTime = t[0] + ':30:00';else newTime = t[0] + ':44:59';
|
|
2636
|
-
} else if (first) newTime = t[0] + ':45:00';else newTime = t[0] + ':59:59';
|
|
2637
|
-
} else {
|
|
2638
|
-
if (m < 15) {
|
|
2639
|
-
if (first) newTime = '26:00:00';else newTime = '26:14:59';
|
|
2640
|
-
} else {
|
|
2641
|
-
if (first) newTime = '26:15:00';else newTime = '26:29:59';
|
|
2642
|
-
}
|
|
2643
|
-
}
|
|
2644
|
-
return newTime;
|
|
2645
|
-
},
|
|
2646
|
-
openBlocks() {
|
|
2647
|
-
this.$refs.settings2?.openBlocks();
|
|
2648
|
-
},
|
|
2649
|
-
playOrPause() {
|
|
2650
|
-
const array = this.$refs.frames.filter(fc => !!fc.active);
|
|
2651
|
-
if (array.length === 1) {
|
|
2652
|
-
const frame = array[0];
|
|
2653
|
-
frame.playOrPause(this.playbackRate);
|
|
2654
|
-
}
|
|
2655
|
-
},
|
|
2656
|
-
stopPlayingBar() {
|
|
2657
|
-
for (let ref of this.$refs.frames) {
|
|
2658
|
-
if (ref.videoStatus === ref.Status.playing || ref.videoStatus === ref.Status.paused) {
|
|
2659
|
-
ref.stop(false);
|
|
2660
|
-
}
|
|
2661
|
-
}
|
|
2662
|
-
},
|
|
2663
|
-
async setFrameSelection(selected) {
|
|
2664
|
-
this.frames = this.loadingArray;
|
|
2665
|
-
switch (parseInt(selected)) {
|
|
2666
|
-
// 2x1
|
|
2667
|
-
case 1:
|
|
2668
|
-
this.framesPerRow = 2;
|
|
2669
|
-
this.numberOfRows = 1;
|
|
2670
|
-
break;
|
|
2671
|
-
// 3x1
|
|
2672
|
-
case 2:
|
|
2673
|
-
this.framesPerRow = 3;
|
|
2674
|
-
this.numberOfRows = 1;
|
|
2675
|
-
break;
|
|
2676
|
-
// 3x2
|
|
2677
|
-
case 3:
|
|
2678
|
-
this.framesPerRow = 3;
|
|
2679
|
-
this.numberOfRows = 2;
|
|
2680
|
-
break;
|
|
2681
|
-
// 4x1
|
|
2682
|
-
case 4:
|
|
2683
|
-
this.framesPerRow = 4;
|
|
2684
|
-
this.numberOfRows = 1;
|
|
2685
|
-
break;
|
|
2686
|
-
// 4x2
|
|
2687
|
-
case 5:
|
|
2688
|
-
this.framesPerRow = 4;
|
|
2689
|
-
this.numberOfRows = 2;
|
|
2690
|
-
break;
|
|
2691
|
-
// 5x1
|
|
2692
|
-
case 6:
|
|
2693
|
-
this.framesPerRow = 5;
|
|
2694
|
-
this.numberOfRows = 1;
|
|
2695
|
-
break;
|
|
2696
|
-
// 5x2
|
|
2697
|
-
case 7:
|
|
2698
|
-
this.framesPerRow = 5;
|
|
2699
|
-
this.numberOfRows = 2;
|
|
2700
|
-
break;
|
|
2701
|
-
// 6x1
|
|
2702
|
-
case 8:
|
|
2703
|
-
this.framesPerRow = 6;
|
|
2704
|
-
this.numberOfRows = 1;
|
|
2705
|
-
break;
|
|
2706
|
-
// 6x2
|
|
2707
|
-
case 9:
|
|
2708
|
-
this.framesPerRow = 6;
|
|
2709
|
-
this.numberOfRows = 2;
|
|
2710
|
-
break;
|
|
2711
|
-
}
|
|
2712
|
-
await this.fInterface.changeSize(this.numberOfRows, this.framesPerRow);
|
|
2713
|
-
this.getFramesArray();
|
|
2714
|
-
setTimeout(() => {
|
|
2715
|
-
for (let ref of this.$refs.frames) {
|
|
2716
|
-
ref?.resize(this.lastHeight);
|
|
2717
|
-
}
|
|
2718
|
-
}, 150);
|
|
2719
|
-
},
|
|
2720
|
-
getFramesArray() {
|
|
2721
|
-
this.frames = this.fInterface.getFrames(Positions.current);
|
|
2722
|
-
this.nextFrames = this.fInterface.getFrames(Positions.next);
|
|
2723
|
-
this.previousFrames = this.fInterface.getFrames(Positions.previous);
|
|
2724
|
-
},
|
|
2725
|
-
async createFramesInterface() {
|
|
2726
|
-
this.frames = this.loadingArray;
|
|
2727
|
-
let ch = this.channel;
|
|
2728
|
-
let associationTMP = {
|
|
2729
|
-
1735073: 1,
|
|
2730
|
-
1735074: 139,
|
|
2731
|
-
1735075: 3,
|
|
2732
|
-
1735076: 132
|
|
2733
|
-
};
|
|
2734
|
-
//
|
|
2735
|
-
this.channelCode = associationTMP[ch] ? associationTMP[ch] : ch;
|
|
2736
|
-
const t = this.startAudienceTime.match(/.{1,2}/g);
|
|
2737
|
-
const d = this.getDateParts();
|
|
2738
|
-
const time = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
|
|
2739
|
-
// * iniciar slider
|
|
2740
|
-
this.blockStartTime = time;
|
|
2741
|
-
this.fInterface = await new utils_FramesInterface(this.channelCode, this.numberOfRows, this.framesPerRow, time, this.startAudienceTime, this.useCache);
|
|
2742
|
-
await this.fInterface.init();
|
|
2743
|
-
this.getFramesArray();
|
|
2744
|
-
this.activeFrame = this.getIndex(1, 0, Positions.current);
|
|
2745
|
-
this.activeVideo = null;
|
|
2746
|
-
},
|
|
2747
|
-
getIndex(rowNumber, frameIndex, position) {
|
|
2748
|
-
let from = this.framesPerRow * this.numberOfRows * position;
|
|
2749
|
-
let till = this.framesPerRow * this.numberOfRows * (position + 1);
|
|
2750
|
-
return (from + till * (rowNumber - 1)) / rowNumber + frameIndex;
|
|
2751
|
-
},
|
|
2752
|
-
getAudienceTime(frameTime, rowNumber, frameNumber, position) {
|
|
2753
|
-
if (!frameTime) {
|
|
2754
|
-
return 'Loading...';
|
|
2755
|
-
} else if (this.getIndex(rowNumber, frameNumber, position) === this.activeVideo) {
|
|
2756
|
-
return this.convertToAudienceTime(this.videoTime);
|
|
2757
|
-
} else {
|
|
2758
|
-
return this.convertToAudienceTime(frameTime);
|
|
2759
|
-
}
|
|
2760
|
-
},
|
|
2761
|
-
dateInUtc(miliSeconds) {
|
|
2762
|
-
var date = new Date(miliSeconds);
|
|
2763
|
-
var utc = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());
|
|
2764
|
-
return utc;
|
|
2765
|
-
},
|
|
2766
|
-
convertToAudienceTime(time) {
|
|
2767
|
-
let separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ':';
|
|
2768
|
-
const d = this.getDateParts();
|
|
2769
|
-
const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
|
|
2770
|
-
let hour = this.dateInUtc(time * 1000).toTimeString().split(' ')[0].split(':').map(Number);
|
|
2771
|
-
if (time > limit && time <= limit + this.startAudienceSeconds) {
|
|
2772
|
-
hour[0] = 24 + hour[0];
|
|
2773
|
-
}
|
|
2774
|
-
return hour.map(part => part > 9 ? part.toString() : '0' + part).join(separator);
|
|
2775
|
-
},
|
|
2776
|
-
getDateParts() {
|
|
2777
|
-
let date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.date;
|
|
2778
|
-
const d = new Date(date);
|
|
2779
|
-
return {
|
|
2780
|
-
year: d.getFullYear(),
|
|
2781
|
-
month: d.getMonth(),
|
|
2782
|
-
day: d.getDate()
|
|
2783
|
-
};
|
|
2784
|
-
},
|
|
2785
|
-
selectFrame(index, frame) {
|
|
2786
|
-
const d = this.getDateParts();
|
|
2787
|
-
const limit = Date.UTC(d.year, d.month, d.day, 23, 59, 59) / 1000;
|
|
2788
|
-
const frameTime = frame?.time;
|
|
2789
|
-
if (frameTime - (this.startAudienceSeconds + limit) <= 0) {
|
|
2790
|
-
if (this.hourIniSelected === true) {
|
|
2791
|
-
this.hourIniSelected = frameTime;
|
|
2792
|
-
if (this.hourEndSelected && this.hourIniSelected > this.hourEndSelected) {
|
|
2793
|
-
this.hourEndSelected = false;
|
|
2794
|
-
}
|
|
2795
|
-
} else if (this.hourEndSelected === true) {
|
|
2796
|
-
if (frameTime > this.hourIniSelected) {
|
|
2797
|
-
this.hourEndSelected = frameTime;
|
|
2798
|
-
this.canInsertTime = true;
|
|
2799
|
-
} else {
|
|
2800
|
-
this.hourEndSelected = false;
|
|
2801
|
-
}
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
if (this.activeFrame !== index) {
|
|
2805
|
-
// ? Se clicar no frame diferente de onde está a dar play, faz pausa
|
|
2806
|
-
const array = this.$refs.frames.filter(fc => fc.videoStatus === fc.Status.playing);
|
|
2807
|
-
if (array.length === 1) {
|
|
2808
|
-
const frame = array[0];
|
|
2809
|
-
frame.playOrPause();
|
|
2810
|
-
}
|
|
2811
|
-
this.activeVideo = null;
|
|
2812
|
-
this.activeFrame = index;
|
|
2813
|
-
}
|
|
2814
|
-
},
|
|
2815
|
-
setHourIni() {
|
|
2816
|
-
this.canInsertTime = true;
|
|
2817
|
-
this.hourIniSelected = true;
|
|
2818
|
-
document.getElementById(`frame-${this.activeFrame}`).click();
|
|
2819
|
-
this.$emit('setHourIni', {
|
|
2820
|
-
hour_ini: this.hourIniSelected ? this.convertToAudienceTime(this.hourIniSelected, '') : null
|
|
2821
|
-
});
|
|
2822
|
-
},
|
|
2823
|
-
setHourEnd() {
|
|
2824
|
-
this.canInsertTime = true;
|
|
2825
|
-
this.hourEndSelected = true;
|
|
2826
|
-
document.getElementById(`frame-${this.activeFrame}`).click();
|
|
2827
|
-
},
|
|
2828
|
-
//* Navegação
|
|
2829
|
-
arrowRight() {
|
|
2830
|
-
if (this.checkLimitRight(false)) {
|
|
2831
|
-
if (this.activeFrame === this.numberOfRows * this.framesPerRow * 2 - 1) {
|
|
2832
|
-
this.next();
|
|
2833
|
-
} else {
|
|
2834
|
-
this.activeFrame++;
|
|
2835
|
-
}
|
|
2836
|
-
}
|
|
2837
|
-
},
|
|
2838
|
-
arrowLeft() {
|
|
2839
|
-
if (this.checkLimitLeft(false)) {
|
|
2840
|
-
if (this.activeFrame === this.numberOfRows * this.framesPerRow) {
|
|
2841
|
-
this.prev();
|
|
2842
|
-
} else {
|
|
2843
|
-
this.activeFrame--;
|
|
2844
|
-
}
|
|
2845
|
-
}
|
|
2846
|
-
},
|
|
2847
|
-
checkLimitRight(value) {
|
|
2848
|
-
const d = this.getDateParts();
|
|
2849
|
-
const high = Date.UTC(d.year, d.month, d.day, 26, 29, 59);
|
|
2850
|
-
if (value) {
|
|
2851
|
-
return high > (this.fInterface.getCurrentTime() - 1) * 1000 && this.nextFrames[0].title !== -1;
|
|
2852
|
-
} else {
|
|
2853
|
-
// return high > (this.fInterface.getCurrentTime() + this.activeFrame) * 1000
|
|
2854
|
-
return high > this.fInterface.getCurrentTime() * 1000;
|
|
2855
|
-
}
|
|
2856
|
-
},
|
|
2857
|
-
checkLimitLeft(value) {
|
|
2858
|
-
const d = this.getDateParts();
|
|
2859
|
-
const low = Date.UTC(d.year, d.month, d.day, 2, 30, 0);
|
|
2860
|
-
if (value) {
|
|
2861
|
-
return low <= (this.fInterface.getCurrentTime() - 1) * 1000;
|
|
2862
|
-
} else {
|
|
2863
|
-
return low < (this.fInterface.getCurrentTime() + this.activeFrame - this.numberOfRows * this.framesPerRow) * 1000;
|
|
2864
|
-
}
|
|
2865
|
-
},
|
|
2866
|
-
async next() {
|
|
2867
|
-
if (this.checkLimitRight(true)) {
|
|
2868
|
-
const array = this.$refs.frames.filter(fc => fc.videoStatus === fc.Status.playing || fc.videoStatus === fc.Status.paused);
|
|
2869
|
-
if (array.length === 1) {
|
|
2870
|
-
const frame = array[0];
|
|
2871
|
-
frame.stop(false);
|
|
2872
|
-
}
|
|
2873
|
-
this.fInterface.setCurrentStep(this.secondsPerFrame);
|
|
2874
|
-
await this.fInterface.loadNextFrames();
|
|
2875
|
-
this.activeFrame = this.getIndex(1, 0, Positions.current);
|
|
2876
|
-
this.activeVideo = null;
|
|
2877
|
-
this.getFramesArray();
|
|
2878
|
-
}
|
|
2879
|
-
},
|
|
2880
|
-
async prev() {
|
|
2881
|
-
if (this.checkLimitLeft(true)) {
|
|
2882
|
-
const array = this.$refs.frames.filter(fc => fc.videoStatus === fc.Status.playing || fc.videoStatus === fc.Status.paused);
|
|
2883
|
-
if (array.length === 1) {
|
|
2884
|
-
const frame = array[0];
|
|
2885
|
-
frame.stop(false);
|
|
2886
|
-
}
|
|
2887
|
-
this.fInterface.setCurrentStep(this.secondsPerFrame);
|
|
2888
|
-
await this.fInterface.loadPrevFrames();
|
|
2889
|
-
this.activeFrame = this.getIndex(this.numberOfRows, this.framesPerRow - 1, Positions.current);
|
|
2890
|
-
this.activeVideo = null;
|
|
2891
|
-
this.getFramesArray();
|
|
2892
|
-
}
|
|
2893
|
-
},
|
|
2894
|
-
async setStartTime(time) {
|
|
2895
|
-
if (time.indexOf(':') !== -1) {
|
|
2896
|
-
time = time.replace(/:/g, '');
|
|
2897
|
-
}
|
|
2898
|
-
const t = time.match(/.{1,2}/g);
|
|
2899
|
-
const d = this.getDateParts();
|
|
2900
|
-
const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
|
|
2901
|
-
this.frames = this.loadingArray;
|
|
2902
|
-
await this.fInterface.changeTime(setTime);
|
|
2903
|
-
this.getFramesArray();
|
|
2904
|
-
this.activeFrame = this.getIndex(1, 0, Positions.current);
|
|
2905
|
-
// let frames = this.$refs.frames
|
|
2906
|
-
|
|
2907
|
-
// let audienceTime = null
|
|
2908
|
-
// if (frames.length > 0) {
|
|
2909
|
-
// let frame = frames[0].frame
|
|
2910
|
-
// audienceTime = this.getAudienceTime(frame.time, 0, 0, 0)
|
|
2911
|
-
// }
|
|
2912
|
-
|
|
2913
|
-
this.activeVideo = null;
|
|
2914
|
-
return true;
|
|
2915
|
-
},
|
|
2916
|
-
hourToTimeStamp(time) {
|
|
2917
|
-
if (time.indexOf(':') !== -1) {
|
|
2918
|
-
time = time.replace(/:/g, '');
|
|
2919
|
-
}
|
|
2920
|
-
const t = time.match(/.{1,2}/g);
|
|
2921
|
-
const d = this.getDateParts();
|
|
2922
|
-
const setTime = Date.UTC(d.year, d.month, d.day, t[0], t[1], t[2]) / 1000;
|
|
2923
|
-
return setTime;
|
|
2924
|
-
},
|
|
2925
|
-
async changeHour(value) {
|
|
2926
|
-
if (value) {
|
|
2927
|
-
setTimeout(() => {
|
|
2928
|
-
const array = this.$refs.frames.filter(fc => fc.videoStatus === fc.Status.playing || fc.videoStatus === fc.Status.paused);
|
|
2929
|
-
if (array.length === 1) {
|
|
2930
|
-
const frame = array[0];
|
|
2931
|
-
frame.stop(false);
|
|
2932
|
-
}
|
|
2933
|
-
this.setStartTime(value, true);
|
|
2934
|
-
}, 0);
|
|
2935
|
-
}
|
|
2936
|
-
},
|
|
2937
|
-
changeBlockInterval(value) {
|
|
2938
|
-
this.changeHour(value.ini);
|
|
2939
|
-
let time_ini, time_end;
|
|
2940
|
-
time_ini = this.hourToTimeStamp(value.ini);
|
|
2941
|
-
time_end = this.hourToTimeStamp(value.end);
|
|
2942
|
-
this.videoSliderTotalDuration = time_end - time_ini;
|
|
2943
|
-
this.$refs.frames[0].changeSettings(time_ini);
|
|
2944
|
-
this.blockStartTime = time_ini;
|
|
2945
|
-
},
|
|
2946
|
-
//eslint-disable-next-line
|
|
2947
|
-
async updateVideoTime(index, videoTime) {
|
|
2948
|
-
this.activeVideo = index;
|
|
2949
|
-
this.videoTime = videoTime;
|
|
2950
|
-
},
|
|
2951
|
-
//eslint-disable-next-line
|
|
2952
|
-
updateVideoStatus(currentTime) {
|
|
2953
|
-
if (!this.progressVideoDrag) {
|
|
2954
|
-
// ESTA FUNÇÃO PASSOU PARA DENTRO DOS COMMANDS
|
|
2955
|
-
// this.updateProgress(null, currentTime)
|
|
2956
|
-
}
|
|
2957
|
-
},
|
|
2958
|
-
async startPlaying(frame, totalTime) {
|
|
2959
|
-
const array = this.$refs.frames.filter(fc => fc.frame.time !== frame.time);
|
|
2960
|
-
for (let ref of array) {
|
|
2961
|
-
if (ref.videoStatus === ref.Status.playing || ref.videoStatus === ref.Status.paused) {
|
|
2962
|
-
ref.stop(false);
|
|
2963
|
-
}
|
|
2964
|
-
}
|
|
2965
|
-
this.videoTotalTime = totalTime;
|
|
2966
|
-
this.videoPlaying = true;
|
|
2967
|
-
},
|
|
2968
|
-
stopPlaying() {
|
|
2969
|
-
this.videoTotalTime = null;
|
|
2970
|
-
this.videoPlaying = false;
|
|
2971
|
-
this.paused = false;
|
|
2972
|
-
},
|
|
2973
|
-
insertTime() {
|
|
2974
|
-
this.$emit('timeToInsert', {
|
|
2975
|
-
channel: this.channel,
|
|
2976
|
-
hour_ini: this.hourIniSelected ? this.convertToAudienceTime(this.hourIniSelected, '') : null,
|
|
2977
|
-
hour_end: this.hourEndSelected ? this.convertToAudienceTime(this.hourEndSelected, '') : null,
|
|
2978
|
-
force: false
|
|
2979
|
-
});
|
|
2980
|
-
if (this.jumpOnInsert) {
|
|
2981
|
-
this.changeHour(this.convertToAudienceTime((this.hourEndSelected || this.hourIniSelected) + 1));
|
|
2982
|
-
}
|
|
2983
|
-
this.hourIniSelected = null;
|
|
2984
|
-
this.hourEndSelected = null;
|
|
2985
|
-
this.canInsertTime = false;
|
|
2986
|
-
|
|
2987
|
-
// this.fInterface.setCurrentPosition(this.hourEndSelected)
|
|
2988
|
-
},
|
|
2989
|
-
|
|
2990
|
-
insertTimeForce() {
|
|
2991
|
-
this.$emit('timeToInsert', {
|
|
2992
|
-
channel: this.channel,
|
|
2993
|
-
hour_ini: this.hourIniSelected ? this.convertToAudienceTime(this.hourIniSelected, '') : null,
|
|
2994
|
-
hour_end: this.hourEndSelected ? this.convertToAudienceTime(this.hourEndSelected, '') : null,
|
|
2995
|
-
force: true
|
|
2996
|
-
});
|
|
2997
|
-
this.hourIniSelected = null;
|
|
2998
|
-
this.hourEndSelected = null;
|
|
2999
|
-
this.canInsertTime = false;
|
|
3000
|
-
|
|
3001
|
-
// this.fInterface.setCurrentPosition(this.hourEndSelected)
|
|
3002
|
-
},
|
|
3003
|
-
|
|
3004
|
-
async getChannelMedia() {
|
|
3005
|
-
// this.media = (await ChannelService.show(this.channel)).data.MEDIA
|
|
3006
|
-
},
|
|
3007
|
-
async changeServerClick() {
|
|
3008
|
-
this.changeServer = !this.changeServer;
|
|
3009
|
-
// this.$store.dispatch(
|
|
3010
|
-
// 'serverOfFrames',
|
|
3011
|
-
// this.changeServer ? 'alternative' : 'default'
|
|
3012
|
-
// )
|
|
3013
|
-
sessionStorage.setItem('serverOfFrames', this.changeServer ? 'alternative' : 'default');
|
|
3014
|
-
|
|
3015
|
-
// if (this.$route.params.time != this.frames[0].time)
|
|
3016
|
-
// this.$router.push({
|
|
3017
|
-
// name: 'grid',
|
|
3018
|
-
// params: {
|
|
3019
|
-
// date: this.date,
|
|
3020
|
-
// channel: this.channelCode,
|
|
3021
|
-
// time: this.frames[0].time,
|
|
3022
|
-
// },
|
|
3023
|
-
// })
|
|
3024
|
-
location.reload();
|
|
3025
|
-
}
|
|
3026
|
-
},
|
|
3027
|
-
computed: {
|
|
3028
|
-
active: {
|
|
3029
|
-
get() {
|
|
3030
|
-
return this.value;
|
|
3031
|
-
},
|
|
3032
|
-
set(value) {
|
|
3033
|
-
this.$emit('input', value);
|
|
3034
|
-
}
|
|
3035
|
-
},
|
|
3036
|
-
settingsClosed() {
|
|
3037
|
-
return !Object.values(this.dialogs).find(v => v);
|
|
3038
|
-
},
|
|
3039
|
-
startAudienceSeconds() {
|
|
3040
|
-
const t = this.startAudienceTime.match(/.{1,2}/g);
|
|
3041
|
-
return parseInt(t[0] * 3600 + t[1] * 60 + t[2]);
|
|
3042
|
-
},
|
|
3043
|
-
loadingArray() {
|
|
3044
|
-
return Array.from(Array(this.numberOfRows * this.framesPerRow).keys());
|
|
3045
|
-
},
|
|
3046
|
-
serverOfFrames() {
|
|
3047
|
-
return sessionStorage.getItem('server');
|
|
3048
|
-
}
|
|
3049
|
-
},
|
|
3050
|
-
watch: {
|
|
3051
|
-
framesFormat(value) {
|
|
3052
|
-
this.setFrameSelection(value);
|
|
3053
|
-
},
|
|
3054
|
-
active() {
|
|
3055
|
-
// ? sempre que trocamos de tabs dar reset as horas selected
|
|
3056
|
-
this.hourIniSelected = false;
|
|
3057
|
-
this.hourEndSelected = false;
|
|
3058
|
-
},
|
|
3059
|
-
useCache() {
|
|
3060
|
-
this.createFramesInterface();
|
|
3061
|
-
},
|
|
3062
|
-
hourIniSelected(value) {
|
|
3063
|
-
if (value) {
|
|
3064
|
-
sessionStorage.setItem('currentTimeFrames', this.convertToAudienceTime(this.hourIniSelected, ''));
|
|
3065
|
-
} else {
|
|
3066
|
-
sessionStorage.removeItem('currentTimeFrames');
|
|
3067
|
-
}
|
|
3068
|
-
},
|
|
3069
|
-
activeFrame(value) {
|
|
3070
|
-
if (value) {
|
|
3071
|
-
this.stopPlayingBar();
|
|
3072
|
-
}
|
|
3073
|
-
},
|
|
3074
|
-
channel() {
|
|
3075
|
-
this.updatingChannel = new Promise((resolve, reject) => {
|
|
3076
|
-
try {
|
|
3077
|
-
this.createFramesInterface();
|
|
3078
|
-
resolve(true);
|
|
3079
|
-
} catch (err) {
|
|
3080
|
-
reject(err);
|
|
3081
|
-
}
|
|
3082
|
-
});
|
|
3083
|
-
}
|
|
3084
|
-
}
|
|
3085
|
-
});
|
|
3086
|
-
;// CONCATENATED MODULE: ./src/Visualization.vue?vue&type=script&lang=js&
|
|
3087
|
-
/* harmony default export */ var src_Visualizationvue_type_script_lang_js_ = (Visualizationvue_type_script_lang_js_);
|
|
3088
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/Visualization.vue?vue&type=style&index=0&id=38edcc3f&prod&scoped=true&lang=css&
|
|
3089
|
-
// extracted by mini-css-extract-plugin
|
|
3090
|
-
|
|
3091
|
-
;// CONCATENATED MODULE: ./src/Visualization.vue?vue&type=style&index=0&id=38edcc3f&prod&scoped=true&lang=css&
|
|
3092
|
-
|
|
3093
|
-
;// CONCATENATED MODULE: ./src/Visualization.vue
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
;
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
/* normalize component */
|
|
3101
|
-
|
|
3102
|
-
var Visualization_component = (0,componentNormalizer/* default */.Z)(
|
|
3103
|
-
src_Visualizationvue_type_script_lang_js_,
|
|
3104
|
-
render,
|
|
3105
|
-
staticRenderFns,
|
|
3106
|
-
false,
|
|
3107
|
-
null,
|
|
3108
|
-
"38edcc3f",
|
|
3109
|
-
null
|
|
3110
|
-
|
|
3111
|
-
)
|
|
3112
|
-
|
|
3113
|
-
/* harmony default export */ var Visualization = (Visualization_component.exports);
|
|
3114
|
-
|
|
3115
|
-
/***/ }),
|
|
3116
|
-
|
|
3117
|
-
/***/ 9583:
|
|
3118
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
3119
|
-
|
|
3120
|
-
module.exports = __webpack_require__.p + "img/dummy.ec1ab0d6.svg";
|
|
3121
|
-
|
|
3122
|
-
/***/ })
|
|
3123
|
-
|
|
3124
|
-
}]);
|
|
3125
|
-
//# sourceMappingURL=visualization.common.15.js.map
|