@playkit-js/playkit-js-kava 1.10.2 → 1.10.3
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/package.json
CHANGED
|
@@ -604,21 +604,23 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
604
604
|
},
|
|
605
605
|
[PluginsEvents.EAD_ON]: {
|
|
606
606
|
type: 'EAD_ON',
|
|
607
|
-
getEventModel: (
|
|
607
|
+
getEventModel: (payload: any) => ({
|
|
608
608
|
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
609
609
|
eventVar1: 'EAD_on',
|
|
610
610
|
eventVar2: ButtonType.Toggle,
|
|
611
|
-
eventVar3: language,
|
|
611
|
+
eventVar3: payload?.language,
|
|
612
|
+
eventVar4: payload?.settings ? 'settings' : 'toggle',
|
|
612
613
|
applicationFeature: ApplicationFeature.EAD
|
|
613
614
|
})
|
|
614
615
|
},
|
|
615
616
|
[PluginsEvents.EAD_OFF]: {
|
|
616
617
|
type: 'EAD_OFF',
|
|
617
|
-
getEventModel: (
|
|
618
|
+
getEventModel: (payload: any) => ({
|
|
618
619
|
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
619
620
|
eventVar1: 'EAD_off',
|
|
620
621
|
eventVar2: ButtonType.Toggle,
|
|
621
|
-
eventVar3: language,
|
|
622
|
+
eventVar3: payload?.language,
|
|
623
|
+
eventVar4: payload?.settings ? 'settings' : 'toggle',
|
|
622
624
|
applicationFeature: ApplicationFeature.EAD
|
|
623
625
|
})
|
|
624
626
|
},
|
|
@@ -627,7 +629,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
627
629
|
getEventModel: ({ trigger }) => ({
|
|
628
630
|
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
629
631
|
eventVar1: 'EAD_skip',
|
|
630
|
-
eventVar2: ButtonType.
|
|
632
|
+
eventVar2: ButtonType.Navigate,
|
|
631
633
|
eventVar3: trigger,
|
|
632
634
|
applicationFeature: ApplicationFeature.EAD
|
|
633
635
|
})
|
|
@@ -637,7 +639,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
637
639
|
getEventModel: ({ trigger }) => ({
|
|
638
640
|
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
639
641
|
eventVar1: 'EAD_replay',
|
|
640
|
-
eventVar2: ButtonType.
|
|
642
|
+
eventVar2: ButtonType.Navigate,
|
|
641
643
|
eventVar3: trigger,
|
|
642
644
|
applicationFeature: ApplicationFeature.EAD
|
|
643
645
|
})
|
|
@@ -667,7 +669,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
667
669
|
getEventModel: () => ({
|
|
668
670
|
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
669
671
|
eventVar1: 'EAD_scroll',
|
|
670
|
-
eventVar2: ButtonType.
|
|
672
|
+
eventVar2: ButtonType.Browse,
|
|
671
673
|
eventVar3: '',
|
|
672
674
|
applicationFeature: ApplicationFeature.EAD
|
|
673
675
|
})
|
|
@@ -689,7 +691,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
689
691
|
eventVar1: 'Advanced_captions_size',
|
|
690
692
|
eventVar2: ButtonType.Choose,
|
|
691
693
|
eventVar3: payload,
|
|
692
|
-
applicationFeature: ApplicationFeature.
|
|
694
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
693
695
|
})
|
|
694
696
|
},
|
|
695
697
|
[PlaykitUIEvents.USER_SELECTED_CAPTIONS_ALIGNMENT]: {
|
|
@@ -699,7 +701,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
699
701
|
eventVar1: 'Advanced_captions_font_alignment',
|
|
700
702
|
eventVar2: ButtonType.Choose,
|
|
701
703
|
eventVar3: payload,
|
|
702
|
-
applicationFeature: ApplicationFeature.
|
|
704
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
703
705
|
})
|
|
704
706
|
},
|
|
705
707
|
[PlaykitUIEvents.USER_SELECTED_CAPTIONS_FONT_COLOR]: {
|
|
@@ -709,7 +711,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
709
711
|
eventVar1: 'Advanced_captions_font_color',
|
|
710
712
|
eventVar2: ButtonType.Choose,
|
|
711
713
|
eventVar3: payload,
|
|
712
|
-
applicationFeature: ApplicationFeature.
|
|
714
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
713
715
|
})
|
|
714
716
|
},
|
|
715
717
|
[PlaykitUIEvents.USER_SELECTED_CAPTIONS_FONT_FAMILY]: {
|
|
@@ -719,7 +721,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
719
721
|
eventVar1: 'Advanced_captions_font_family',
|
|
720
722
|
eventVar2: ButtonType.Choose,
|
|
721
723
|
eventVar3: payload,
|
|
722
|
-
applicationFeature: ApplicationFeature.
|
|
724
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
723
725
|
})
|
|
724
726
|
},
|
|
725
727
|
[PlaykitUIEvents.USER_SELECTED_CAPTIONS_FONT_STYLE]: {
|
|
@@ -729,7 +731,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
729
731
|
eventVar1: 'Advanced_captions_font_style',
|
|
730
732
|
eventVar2: ButtonType.Choose,
|
|
731
733
|
eventVar3: payload,
|
|
732
|
-
applicationFeature: ApplicationFeature.
|
|
734
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
733
735
|
})
|
|
734
736
|
},
|
|
735
737
|
[PlaykitUIEvents.USER_SELECTED_CAPTIONS_FONT_OPACITY]: {
|
|
@@ -739,7 +741,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
739
741
|
eventVar1: 'Advanced_captions_font_opacity',
|
|
740
742
|
eventVar2: ButtonType.Choose,
|
|
741
743
|
eventVar3: `${payload * 100}%`,
|
|
742
|
-
applicationFeature: ApplicationFeature.
|
|
744
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
743
745
|
})
|
|
744
746
|
},
|
|
745
747
|
[PlaykitUIEvents.USER_SELECTED_CAPTIONS_BACKGROUND_COLOR]: {
|
|
@@ -749,7 +751,7 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
749
751
|
eventVar1: 'Advanced_captions_background_color',
|
|
750
752
|
eventVar2: ButtonType.Choose,
|
|
751
753
|
eventVar3: payload,
|
|
752
|
-
applicationFeature: ApplicationFeature.
|
|
754
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
753
755
|
})
|
|
754
756
|
},
|
|
755
757
|
[PlaykitUIEvents.USER_SELECTED_CAPTIONS_BACKGROUND_OPACITY]: {
|
|
@@ -759,7 +761,49 @@ export const ApplicationEventsModel: { [playerEventName: string]: KavaEvent } =
|
|
|
759
761
|
eventVar1: 'Advanced_captions_background_opacity',
|
|
760
762
|
eventVar2: ButtonType.Choose,
|
|
761
763
|
eventVar3: `${payload * 100}%`,
|
|
762
|
-
applicationFeature: ApplicationFeature.
|
|
764
|
+
applicationFeature: ApplicationFeature.ADVANCED_CAPTIONS
|
|
765
|
+
})
|
|
766
|
+
},
|
|
767
|
+
[PlaykitUIEvents.USER_SHOWED_CAPTIONS]: {
|
|
768
|
+
type: 'USER_SHOWED_CAPTIONS',
|
|
769
|
+
getEventModel: (payload: any): any => ({
|
|
770
|
+
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
771
|
+
eventVar1: 'Captions_on',
|
|
772
|
+
eventVar2: ButtonType.Toggle,
|
|
773
|
+
eventVar3: payload?.language,
|
|
774
|
+
applicationFeature: ApplicationFeature.CAPTIONS
|
|
775
|
+
})
|
|
776
|
+
},
|
|
777
|
+
[PlaykitUIEvents.USER_HID_CAPTIONS]: {
|
|
778
|
+
type: 'USER_HID_CAPTIONS',
|
|
779
|
+
getEventModel: (payload: any): any => ({
|
|
780
|
+
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
781
|
+
eventVar1: 'Captions_off',
|
|
782
|
+
eventVar2: ButtonType.Toggle,
|
|
783
|
+
eventVar3: payload?.language,
|
|
784
|
+
applicationFeature: ApplicationFeature.CAPTIONS
|
|
785
|
+
})
|
|
786
|
+
},
|
|
787
|
+
[PlaykitUIEvents.USER_SELECTED_CAPTION_TRACK]: {
|
|
788
|
+
type: 'USER_SELECTED_CAPTION_TRACK',
|
|
789
|
+
getEventModel: ({ captionTrack, autoSelected }): any => ({
|
|
790
|
+
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
791
|
+
eventVar1: 'Captions_language_selected',
|
|
792
|
+
eventVar2: ButtonType.Choose,
|
|
793
|
+
eventVar3: captionTrack?.language,
|
|
794
|
+
eventVar4: autoSelected ? 'Auto display' : 'Manual selection',
|
|
795
|
+
applicationFeature: ApplicationFeature.CAPTIONS
|
|
796
|
+
})
|
|
797
|
+
},
|
|
798
|
+
[PlaykitUIEvents.USER_SELECTED_AUDIO_TRACK]: {
|
|
799
|
+
type: 'USER_SELECTED_AUDIO_TRACK',
|
|
800
|
+
getEventModel: ({ audioTrack }): any => ({
|
|
801
|
+
eventType: ApplicationEventType.BUTTON_CLICKED,
|
|
802
|
+
eventVar1: 'audioSelected',
|
|
803
|
+
eventVar2: ButtonType.Choose,
|
|
804
|
+
eventVar3: audioTrack?.language,
|
|
805
|
+
eventVar4: audioTrack?.language?.startsWith('ad-') ? 'AD' : 'non_AD',
|
|
806
|
+
applicationFeature: ApplicationFeature.AUDION_TRACKS
|
|
763
807
|
})
|
|
764
808
|
},
|
|
765
809
|
[PluginsEvents.DETECT_AD_BLOCK_FULL_OVERLAY_SHOWN]: {
|
|
@@ -8,7 +8,11 @@ export const PlaykitUIEvents = {
|
|
|
8
8
|
USER_SELECTED_CAPTIONS_FONT_STYLE: `${playkitUIEventsNamespace}-userselectedcaptionsfontstyle`,
|
|
9
9
|
USER_SELECTED_CAPTIONS_FONT_OPACITY: `${playkitUIEventsNamespace}-userselectedcaptionsfontopacity`,
|
|
10
10
|
USER_SELECTED_CAPTIONS_BACKGROUND_COLOR: `${playkitUIEventsNamespace}-userselectedcaptionsbackgroundcolor`,
|
|
11
|
-
USER_SELECTED_CAPTIONS_BACKGROUND_OPACITY: `${playkitUIEventsNamespace}-userselectedcaptionsbackgroundopacity
|
|
11
|
+
USER_SELECTED_CAPTIONS_BACKGROUND_OPACITY: `${playkitUIEventsNamespace}-userselectedcaptionsbackgroundopacity`,
|
|
12
|
+
USER_SHOWED_CAPTIONS: `${playkitUIEventsNamespace}-usershowedcaptions`,
|
|
13
|
+
USER_HID_CAPTIONS: `${playkitUIEventsNamespace}-userhidcaptions`,
|
|
14
|
+
USER_SELECTED_CAPTION_TRACK: `${playkitUIEventsNamespace}-userselectedcaptiontrack`,
|
|
15
|
+
USER_SELECTED_AUDIO_TRACK: `${playkitUIEventsNamespace}-userselectedaudiotrack`
|
|
12
16
|
};
|
|
13
17
|
|
|
14
18
|
export const NavigationEvents = {
|
|
@@ -14,5 +14,8 @@ export enum ApplicationFeature {
|
|
|
14
14
|
UI = 'ui',
|
|
15
15
|
DETECT_AD_BLOCK = 'detect_ad_block',
|
|
16
16
|
REELS = 'reels_player',
|
|
17
|
-
EAD = 'extended_audio_description'
|
|
17
|
+
EAD = 'extended_audio_description',
|
|
18
|
+
ADVANCED_CAPTIONS = 'advanced_captions',
|
|
19
|
+
CAPTIONS = 'captions',
|
|
20
|
+
AUDION_TRACKS = 'audio_tracks'
|
|
18
21
|
}
|