-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
feedbacks.js
889 lines (853 loc) · 21.2 KB
/
feedbacks.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
import { combineRgb } from '@companion-module/base'
export function getFeedbacks() {
const feedbacks = {}
const ColorWhite = combineRgb(255, 255, 255)
const ColorGray = combineRgb(72, 72, 72)
const ColorBlack = combineRgb(0, 0, 0)
const ColorRed = combineRgb(200, 0, 0)
const ColorGreen = combineRgb(0, 200, 0)
const ColorOrange = combineRgb(255, 102, 0)
feedbacks['streaming'] = {
type: 'boolean',
name: 'Streaming Active',
description: 'If streaming is active, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [],
callback: () => {
return this.states.streaming
},
}
feedbacks['recording'] = {
type: 'advanced',
name: 'Recording Status',
description: 'If recording is active or paused, change the style of the button',
options: [
{
type: 'colorpicker',
label: 'Foreground color (Recording)',
id: 'fg',
default: ColorWhite,
},
{
type: 'colorpicker',
label: 'Background color (Recording)',
id: 'bg',
default: ColorRed,
},
{
type: 'colorpicker',
label: 'Foreground color (Paused)',
id: 'fg_paused',
default: ColorWhite,
},
{
type: 'colorpicker',
label: 'Background color (Paused)',
id: 'bg_paused',
default: ColorOrange,
},
],
callback: (feedback) => {
if (this.states.recording === 'Recording') {
return { color: feedback.options.fg, bgcolor: feedback.options.bg }
} else if (this.states.recording === 'Paused') {
return { color: feedback.options.fg_paused, bgcolor: feedback.options.bg_paused }
} else {
return {}
}
},
}
feedbacks['scene_active'] = {
type: 'advanced',
name: 'Scene in Preview / Program',
description: 'If a scene is in preview or program, change colors of the button',
options: [
{
type: 'dropdown',
label: 'Mode',
id: 'mode',
default: 'programAndPreview',
choices: [
{ id: 'programAndPreview', label: 'Program and Preview' },
{ id: 'program', label: 'Program Only' },
{ id: 'preview', label: 'Preview Only' },
],
},
{
type: 'dropdown',
label: 'Scene',
id: 'scene',
default: this.sceneListDefault,
choices: this.sceneChoices,
allowCustom: true,
},
{
type: 'colorpicker',
label: 'Foreground color (Program)',
id: 'fg',
default: ColorWhite,
},
{
type: 'colorpicker',
label: 'Background color (Program)',
id: 'bg',
default: ColorRed,
},
{
type: 'colorpicker',
label: 'Foreground color (Preview)',
id: 'fg_preview',
default: ColorWhite,
},
{
type: 'colorpicker',
label: 'Background color (Preview)',
id: 'bg_preview',
default: ColorGreen,
},
],
callback: async (feedback, context) => {
let mode = feedback.options.mode
let scene = await context.parseVariablesInString(feedback.options.scene)
if (!mode) {
mode = 'programAndPreview'
}
if (this.states.programScene === scene && (mode === 'programAndPreview' || mode === 'program')) {
return { color: feedback.options.fg, bgcolor: feedback.options.bg }
} else if (
this.states.previewScene === scene &&
typeof feedback.options.fg_preview === 'number' &&
this.states.studioMode === true &&
(mode === 'programAndPreview' || mode === 'preview')
) {
return { color: feedback.options.fg_preview, bgcolor: feedback.options.bg_preview }
} else {
return {}
}
},
}
feedbacks['sceneProgram'] = {
type: 'boolean',
name: 'Scene in Program',
description: 'If a scene is in program, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorRed,
},
options: [
{
type: 'dropdown',
label: 'Scene',
id: 'scene',
default: this.sceneListDefault,
choices: this.sceneChoices,
allowCustom: true,
},
],
callback: async (feedback, context) => {
let scene = await context.parseVariablesInString(feedback.options.scene)
return this.states.programScene === scene
},
}
feedbacks['scenePreview'] = {
type: 'boolean',
name: 'Scene in Preview',
description: 'If a scene is in preview, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Scene',
id: 'scene',
default: this.sceneListDefault,
choices: this.sceneChoices,
allowCustom: true,
},
],
callback: async (feedback, context) => {
let scene = await context.parseVariablesInString(feedback.options.scene)
return this.states.previewScene === scene
},
}
feedbacks['scenePrevious'] = {
type: 'boolean',
name: 'Previous Scene Active',
description: 'If a scene was the last scene previously active, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Scene',
id: 'scene',
default: this.sceneListDefault,
choices: this.sceneChoices,
},
],
callback: (feedback) => {
return this.states.previousScene === feedback.options.scene
},
}
feedbacks['scene_item_active'] = {
type: 'boolean',
name: 'Source Visible in Program',
description: 'If a source is visible in the program, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorRed,
},
options: [
{
type: 'dropdown',
label: 'Scene',
id: 'scene',
default: 'anyScene',
choices: this.sceneChoicesAnyScene,
},
{
type: 'dropdown',
label: 'Source name',
id: 'source',
default: this.sourceListDefault,
choices: this.sourceChoices,
},
],
callback: (feedback) => {
if (this.sources[feedback.options.source]?.active && feedback.options.scene === 'anyScene') {
return true
} else if (this.sources[feedback.options.source]?.active && feedback.options.scene === this.states.programScene) {
return true
}
},
}
feedbacks['scene_item_previewed'] = {
type: 'boolean',
name: 'Source Active in Preview',
description: 'If a source is enabled in the preview scene, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Source name',
id: 'source',
default: this.sourceListDefault,
choices: this.sourceChoices,
},
],
callback: (feedback) => {
return this.sources[feedback.options.source]?.videoShowing
},
}
feedbacks['profile_active'] = {
type: 'boolean',
name: 'Profile Active',
description: 'If a profile is active, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Profile name',
id: 'profile',
default: this.profileChoicesDefault,
choices: this.profileChoices,
},
],
callback: (feedback) => {
if (this.states.currentProfile === feedback.options.profile) {
return true
}
},
}
feedbacks['scene_collection_active'] = {
type: 'boolean',
name: 'Scene Collection Active',
description: 'If a scene collection is active, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Scene collection name',
id: 'scene_collection',
default: this.sceneCollectionList?.[0] ? this.sceneCollectionList[0].id : '',
choices: this.sceneCollectionList,
},
],
callback: (feedback) => {
if (this.states.currentSceneCollection === feedback.options.scene_collection) {
return true
}
},
}
feedbacks['scene_item_active_in_scene'] = {
type: 'boolean',
name: 'Source Enabled in Scene',
description: 'If a source is enabled in a specific scene, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Scene',
id: 'scene',
default: this.sceneListDefault,
choices: this.sceneChoices,
allowCustom: true,
},
{
type: 'checkbox',
label: 'Any Source',
id: 'any',
default: false,
},
{
type: 'dropdown',
label: 'Source',
id: 'source',
default: this.sourceListDefault,
choices: this.sourceChoices,
allowCustom: true,
isVisible: (options) => !options.any,
},
],
callback: async (feedback, context) => {
let sceneName = await context.parseVariablesInString(feedback.options.scene)
let sourceName = await context.parseVariablesInString(feedback.options.source)
if (feedback.options.any) {
let scene = this.sceneItems[sceneName]
if (scene) {
let enabled = this.sceneItems[sceneName].find((item) => item.sceneItemEnabled === true)
if (enabled) {
return true
}
}
} else {
if (this.sources[sourceName]?.groupedSource) {
let group = this.sources[sourceName].groupName
let sceneItem = this.groups[group].find((item) => item.sourceName === sourceName)
if (sceneItem) {
return sceneItem.sceneItemEnabled
}
} else if (this.sceneItems[sceneName]) {
let sceneItem = this.sceneItems[sceneName].find((item) => item.sourceName === sourceName)
if (sceneItem) {
return sceneItem.sceneItemEnabled
}
}
}
},
}
feedbacks['output_active'] = {
type: 'boolean',
name: 'Output Active',
description: 'If an output is currently active, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Output name',
id: 'output',
default: 'virtualcam_output',
choices: this.outputList,
},
],
callback: (feedback) => {
return this.outputs[feedback.options.output]?.outputActive
},
}
feedbacks['replayBufferActive'] = {
type: 'boolean',
name: 'Replay Buffer Active',
description: 'If the replay buffer is currently active, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorRed,
},
options: [],
callback: () => {
return this.states.replayBuffer
},
}
feedbacks['transition_active'] = {
type: 'boolean',
name: 'Transition in Progress',
description: 'If a transition is in progress, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [],
callback: () => {
return this.states.transitionActive
},
}
feedbacks['current_transition'] = {
type: 'boolean',
name: 'Current Transition Type',
description: 'If a transition type is selected, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Transition',
id: 'transition',
default: this.transitionList?.[0] ? this.transitionList[0].id : '',
choices: this.transitionList,
},
],
callback: (feedback) => {
if (this.states.currentTransition === feedback.options.transition) {
return true
}
},
}
feedbacks['transition_duration'] = {
type: 'boolean',
name: 'Transition Duration',
description: 'If the transition duration is matched, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'number',
label: 'Transition time (in ms)',
id: 'duration',
default: null,
min: 0,
max: 60 * 1000, //max is required by api
range: false,
},
],
callback: (feedback) => {
if (this.states.transitionDuration === feedback.options.duration) {
return true
}
},
}
feedbacks['filter_enabled'] = {
type: 'boolean',
name: 'Filter Enabled',
description: 'If a filter is enabled, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Source',
id: 'source',
default: this.sourceListDefault,
choices: this.sourceChoicesWithScenes,
},
{
type: 'dropdown',
label: 'Filter',
id: 'filter',
default: this.filterListDefault,
choices: this.filterList,
},
],
callback: (feedback) => {
if (this.sourceFilters[feedback.options.source]) {
let filter = this.sourceFilters[feedback.options.source].find(
(item) => item.filterName === feedback.options.filter,
)
if (filter) {
return filter.filterEnabled
}
}
},
}
feedbacks['audio_muted'] = {
type: 'boolean',
name: 'Audio Muted',
description: 'If an audio source is muted, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorRed,
},
options: [
{
type: 'dropdown',
label: 'Source name',
id: 'source',
default: this.audioSourceListDefault,
choices: this.audioSourceList,
},
],
callback: (feedback) => {
return this.sources[feedback.options.source]?.inputMuted
},
}
feedbacks['audio_monitor_type'] = {
type: 'boolean',
name: 'Audio Monitor Type',
description: 'If the audio monitor type is matched, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorRed,
},
options: [
{
type: 'dropdown',
label: 'Source',
id: 'source',
default: this.audioSourceListDefault,
choices: this.audioSourceList,
},
{
type: 'dropdown',
label: 'Monitor',
id: 'monitor',
default: 'none',
choices: [
{ id: 'none', label: 'None' },
{ id: 'monitorOnly', label: 'Monitor Only' },
{ id: 'monitorAndOutput', label: 'Monitor and Output' },
],
},
],
callback: (feedback) => {
let monitorType
if (feedback.options.monitor === 'monitorAndOutput') {
monitorType = 'OBS_MONITORING_TYPE_MONITOR_AND_OUTPUT'
} else if (feedback.options.monitor === 'monitorOnly') {
monitorType = 'OBS_MONITORING_TYPE_MONITOR_ONLY'
} else {
monitorType = 'OBS_MONITORING_TYPE_NONE'
}
return this.sources[feedback.options.source]?.monitorType == monitorType
},
}
feedbacks['volume'] = {
type: 'boolean',
name: 'Volume',
description: 'If an audio source volume is matched, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Source name',
id: 'source',
default: this.audioSourceListDefault,
choices: this.audioSourceList,
},
{
type: 'number',
label: 'Volume in dB (-100 to 26) ',
id: 'volume',
default: 0,
min: -100,
max: 26,
range: false,
},
],
callback: (feedback) => {
return this.sources[feedback.options.source]?.inputVolume == feedback.options.volume
},
}
feedbacks['media_playing'] = {
type: 'boolean',
name: 'Media Playing',
description: 'If a media source is playing, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [
{
type: 'dropdown',
label: 'Media Source',
id: 'source',
default: this.mediaSourceList?.[0] ? this.mediaSourceList[0].id : '',
choices: this.mediaSourceList,
},
],
callback: (feedback) => {
return this.mediaSources[feedback.options.source]?.mediaState == 'OBS_MEDIA_STATE_PLAYING'
},
}
feedbacks['media_source_time_remaining'] = {
type: 'boolean',
name: 'Media Source Remaining Time',
description: 'If remaining time of a media source is below a threshold, change the style of the button',
defaultStyle: {
color: ColorBlack,
bgcolor: ColorRed,
},
options: [
{
type: 'dropdown',
label: 'Source name',
id: 'source',
default: this.mediaSourceList?.[0] ? this.mediaSourceList[0].id : '',
choices: this.mediaSourceList,
},
{
type: 'number',
label: 'Remaining time threshold (in seconds)',
id: 'rtThreshold',
default: 20,
min: 0,
max: 3600, //max is required by api
range: false,
},
{
type: 'checkbox',
label: 'Feedback only if source is on program',
id: 'onlyIfSourceIsOnProgram',
default: false,
},
{
type: 'checkbox',
label: 'Feedback only if source is playing',
id: 'onlyIfSourceIsPlaying',
default: false,
},
{
type: 'checkbox',
label: 'Blinking',
id: 'blinkingEnabled',
default: false,
},
],
callback: (feedback) => {
let remainingTime // remaining time in seconds
let mediaState
if (this.mediaSources[feedback.options.source]) {
remainingTime = Math.round(
(this.mediaSources[feedback.options.source].mediaDuration -
this.mediaSources[feedback.options.source].mediaCursor) /
1000,
)
mediaState = this.mediaSources[feedback.options.source].mediaState
}
if (remainingTime === undefined) return false
if (feedback.options.onlyIfSourceIsOnProgram && !this.sources[feedback.options.source].active) {
return false
}
if (feedback.options.onlyIfSourceIsPlaying && mediaState !== 'OBS_MEDIA_STATE_PLAYING') {
return false
}
if (remainingTime <= feedback.options.rtThreshold) {
if (feedback.options.blinkingEnabled && mediaState === 'OBS_MEDIA_STATE_PLAYING') {
// TODO: implement a better button blinking, or wait for https://github.com/bitfocus/companion/issues/674
if (remainingTime % 2 != 0) {
// flash in seconds interval (checkFeedbacks interval = media poller interval)
return false
}
}
return true
}
},
}
feedbacks['studioMode'] = {
type: 'boolean',
name: 'Studio Mode Active',
description: 'If Studio Mode is active, change the style of the button',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorGreen,
},
options: [],
callback: () => {
return this.states.studioMode
},
}
feedbacks['streamCongestion'] = {
type: 'advanced',
name: 'Stream Congestion',
description: 'Change the style of the button to show stream congestion',
options: [
{
type: 'colorpicker',
label: 'Background color (No Stream)',
id: 'colorNoStream',
default: ColorGray,
},
{
type: 'colorpicker',
label: 'Background color (Low Congestion)',
id: 'colorLow',
default: ColorGreen,
},
{
type: 'colorpicker',
label: 'Background color (Medium Congestion)',
id: 'colorMedium',
default: ColorOrange,
},
{
type: 'colorpicker',
label: 'Background color (High Congestion)',
id: 'colorHigh',
default: ColorRed,
},
],
callback: (feedback) => {
if (this.states.streaming === false) {
return { bgcolor: feedback.options.colorNoStream }
} else {
if (this.states.streamCongestion > 0.8) {
return { bgcolor: feedback.options.colorHigh }
} else if (this.states.congestion > 0.4) {
return { bgcolor: feedback.options.colorMedium }
} else {
return { bgcolor: feedback.options.colorLow }
}
}
},
}
feedbacks['freeDiskSpaceRemaining'] = {
type: 'boolean',
name: 'Disk Space Remaining',
description: 'Change the style of the button if remaining disk space is below a certain value',
defaultStyle: {
color: ColorWhite,
bgcolor: ColorRed,
},
options: [
{
type: 'number',
label: 'Remaining Space (MB)',
id: 'diskSpace',
default: 10000,
min: 0,
range: false,
},
],
callback: (feedback) => {
return this.states.stats?.availableDiskSpace < feedback.options.diskSpace
},
}
feedbacks['audioPeaking'] = {
type: 'boolean',
name: 'Audio Peaking',
description: 'If audio is above a certain dB value, change the style of the button',
defaultStyle: {
color: ColorBlack,
bgcolor: ColorRed,
},
options: [
{
type: 'dropdown',
label: 'Source name',
id: 'source',
default: this.audioSourceListDefault,
choices: this.audioSourceList,
},
{
type: 'number',
label: 'Peak in dB (-100 to 26) ',
id: 'peak',
default: 0,
min: -100,
max: 26,
range: false,
},
],
callback: (feedback) => {
return this.audioPeak?.[feedback.options.source] > feedback.options.peak
},
}
feedbacks['audioMeter'] = {
type: 'advanced',
name: 'Audio Meter',
description: 'Change the style of the button to show audio meter colors similar to the OBS UI',
options: [
{
type: 'dropdown',
label: 'Source name',
id: 'source',
default: this.audioSourceListDefault,
choices: this.audioSourceList,
},
],
callback: (feedback) => {
let peak = this.audioPeak?.[feedback.options.source]
if (peak > -9) {
return { bgcolor: ColorRed }
} else if (peak > -20) {
return { bgcolor: ColorOrange }
} else {
return { bgcolor: ColorGreen }
}
},
}
feedbacks['vendorEvent'] = {
type: 'boolean',
name: 'Vendor Event',
description: 'Change the style of the button based on third party vendor events',
options: [
{
type: 'textinput',
label: 'vendorName',
id: 'vendorName',
default: 'downstream-keyer',
},
{
type: 'textinput',
label: 'eventType',
id: 'eventType',
default: 'dsk_scene_changed',
},
{
type: 'textinput',
label: 'eventData Key',
id: 'eventDataKey',
default: 'new_scene',
},
{
type: 'textinput',
label: 'eventData Value',
id: 'eventDataValue',
default: 'Scene 1',
},
],
callback: (feedback) => {
if (this.vendorEvent) {
if (this.vendorEvent.vendorName == feedback.options.vendorName) {
if (this.vendorEvent.eventType == feedback.options.eventType) {
if (this.vendorEvent.eventData) {
let key = this.vendorEvent.eventData[feedback.options.eventDataKey]
if (key && key == feedback.options.eventDataValue) {
return true
}
}
}
}
}
},
}
return feedbacks
}