@total_onion/onion-library 2.0.133 → 2.0.134
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.
|
@@ -61,16 +61,23 @@
|
|
|
61
61
|
{% set captionsEnabled = fields.enable_captions|default(false) %}
|
|
62
62
|
{% set captions = fields.captions %}
|
|
63
63
|
{% set videoId = block.videoIdPrefix ~ fields.video_trigger_id %}
|
|
64
|
+
{% set captionsFile = fields.captions.0.captions_file %}
|
|
65
|
+
{% set noAudioCaptions = fields.enable_no_audio_captions %}
|
|
66
|
+
|
|
64
67
|
<div data-videoid="{{videoId}}" data-videocontainerid="{{fields.video_trigger_id}}" data-desktopvideo="{{gt_video_mainsrc(videoDesktop['url'])}}" data-youtubedesktop="{{youtubeDesktopId}}" data-youtubemobile="{{youtubeMobileId}}" data-vimeo-desktop-url="{{vimeoDesktopUrl}}" data-vimeo-mobile-url="{{vimeoMobileUrl}}" data-vimeodesktopid="{{vimeoDesktopId}}" data-vimeomobileid="{{vimeoMobileId}}" data-mobilevideo="{{gt_video_mainsrc(videoMobile['url'])}}" class="{{blockClassName}}__video-container cblvc-video-container {{lockVideoAspectToImage}} {{videoPlayingZindexClass}} {{setVideoToCover}}" data-videotype="{{videoType}}" data-loop="{{loopVideo}}" data-modal="{{modal}}" data-controls="{{controls}}" data-autoplay="{{autoplayVideo}}" data-autoplay-mobile="{{autoplayVideoMobile}}" data-fullscreen="{{fullscreen}}" data-muted="{{muted}}" data-videoenabled="{{videoEnabled}}" data-pattern-dynamic="1">
|
|
65
68
|
<div class="{{blockClassName}}__video-inner-container cblvc-video-container__video-inner-container" data-pattern-type>
|
|
66
69
|
{% if videoType == 'upload' %}
|
|
67
70
|
<video class="{{blockClassName}}__video-player cblvc-video-container__video-player" {{muted ? 'muted' : ''}} playsinline width='{{videoDesktop.width}}' height='{{videoDesktop.height}}'>
|
|
68
71
|
<source src="" type="video/mp4">
|
|
69
|
-
{% if captionsEnabled == true and
|
|
72
|
+
{% if captionsEnabled == true and noAudioCaptions %}
|
|
73
|
+
<track src={{ asset('no-audio.vtt') }} srclang="en" label="english" kind="captions"/>
|
|
74
|
+
|
|
75
|
+
{% elseif captionsEnabled == true and not noAudioCaptions and captions is not empty %}
|
|
70
76
|
{% for caption in captions %}
|
|
71
|
-
<track src={{caption.captions_file.url}} srclang={{caption.language_code}} label="{{caption.caption_label}}" kind="captions"/>
|
|
77
|
+
<track src="{{ caption.captions_file.url }}" srclang="{{ caption.language_code }}" label="{{ caption.caption_label }}" kind="captions"/>
|
|
72
78
|
{% endfor %}
|
|
73
79
|
{% endif %}
|
|
80
|
+
|
|
74
81
|
</video>
|
|
75
82
|
{% endif %}
|
|
76
83
|
{% if videoType == 'youtube' %}
|
|
@@ -96,7 +96,9 @@
|
|
|
96
96
|
"ui": 1,
|
|
97
97
|
"ajax": 1,
|
|
98
98
|
"placeholder": "",
|
|
99
|
-
"min": ""
|
|
99
|
+
"min": "",
|
|
100
|
+
"create_options": 0,
|
|
101
|
+
"save_options": 0
|
|
100
102
|
},
|
|
101
103
|
{
|
|
102
104
|
"key": "field_6872282f51d38",
|
|
@@ -745,20 +747,15 @@
|
|
|
745
747
|
"style": ""
|
|
746
748
|
},
|
|
747
749
|
{
|
|
748
|
-
"key": "
|
|
749
|
-
"label": "Captions",
|
|
750
|
-
"name": "
|
|
750
|
+
"key": "field_691495ab897ff",
|
|
751
|
+
"label": "Enable \"No audio\" Captions",
|
|
752
|
+
"name": "enable_no_audio_captions",
|
|
751
753
|
"aria-label": "",
|
|
752
|
-
"type": "
|
|
754
|
+
"type": "true_false",
|
|
753
755
|
"instructions": "",
|
|
754
756
|
"required": 0,
|
|
755
757
|
"conditional_logic": [
|
|
756
758
|
[
|
|
757
|
-
{
|
|
758
|
-
"field": "field_6872282f56770",
|
|
759
|
-
"operator": "==",
|
|
760
|
-
"value": "1"
|
|
761
|
-
},
|
|
762
759
|
{
|
|
763
760
|
"field": "field_6872282f51575",
|
|
764
761
|
"operator": "==",
|
|
@@ -768,6 +765,41 @@
|
|
|
768
765
|
"field": "field_6872282f51950",
|
|
769
766
|
"operator": "==",
|
|
770
767
|
"value": "__upload"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"field": "field_6872282f56770",
|
|
771
|
+
"operator": "==",
|
|
772
|
+
"value": "1"
|
|
773
|
+
}
|
|
774
|
+
]
|
|
775
|
+
],
|
|
776
|
+
"wrapper": {
|
|
777
|
+
"width": "",
|
|
778
|
+
"class": "",
|
|
779
|
+
"id": ""
|
|
780
|
+
},
|
|
781
|
+
"message": "",
|
|
782
|
+
"default_value": 0,
|
|
783
|
+
"allow_in_bindings": 1,
|
|
784
|
+
"ui_on_text": "",
|
|
785
|
+
"ui_off_text": "",
|
|
786
|
+
"ui": 1,
|
|
787
|
+
"style": ""
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"key": "field_6872282f56b4d",
|
|
791
|
+
"label": "Captions",
|
|
792
|
+
"name": "captions",
|
|
793
|
+
"aria-label": "",
|
|
794
|
+
"type": "repeater",
|
|
795
|
+
"instructions": "",
|
|
796
|
+
"required": 0,
|
|
797
|
+
"conditional_logic": [
|
|
798
|
+
[
|
|
799
|
+
{
|
|
800
|
+
"field": "field_691495ab897ff",
|
|
801
|
+
"operator": "!=",
|
|
802
|
+
"value": "1"
|
|
771
803
|
}
|
|
772
804
|
]
|
|
773
805
|
],
|
|
@@ -776,7 +808,6 @@
|
|
|
776
808
|
"class": "",
|
|
777
809
|
"id": ""
|
|
778
810
|
},
|
|
779
|
-
"wpml_cf_preferences": 3,
|
|
780
811
|
"acfe_repeater_stylised_button": 0,
|
|
781
812
|
"layout": "table",
|
|
782
813
|
"pagination": 0,
|
|
@@ -911,13 +942,13 @@
|
|
|
911
942
|
"active": false,
|
|
912
943
|
"description": "Library version - Do not modify in this project as any changes will be overwritten by future updates.",
|
|
913
944
|
"show_in_rest": 0,
|
|
945
|
+
"display_title": "",
|
|
914
946
|
"acfe_autosync": [
|
|
915
947
|
"json"
|
|
916
948
|
],
|
|
917
|
-
"acfml_field_group_mode": "localization",
|
|
918
949
|
"acfe_form": 0,
|
|
919
950
|
"acfe_display_title": "",
|
|
920
951
|
"acfe_meta": "",
|
|
921
952
|
"acfe_note": "",
|
|
922
|
-
"modified":
|
|
953
|
+
"modified": 1762957218
|
|
923
954
|
}
|
package/no-audio.vtt
ADDED