vue-datocms 5.0.1 → 5.1.1-0

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/README.md CHANGED
@@ -29,12 +29,14 @@ A set of components and utilities to work faster with [DatoCMS](https://www.dato
29
29
  [Components](https://vuejs.org/guide/essentials/component-basics.html):
30
30
 
31
31
  - [`<DatocmsImage />`](src/components/Image)
32
+ - [`<DatocmsVideoPlayer />`](src/components/VideoPlayer)
32
33
  - [`<DatocmsStructuredText />`](src/components/StructuredText)
33
34
 
34
35
  [Composables](https://vuejs.org/guide/reusability/composables.html):
35
36
 
36
37
  - [`useQuerySubscription`](src/composables/useQuerySubscription)
37
38
  - [`useSiteSearch`](src/composables/useSiteSearch)
39
+ - [`useVideoPlayer`](src/composables/useVideoPlayer)
38
40
 
39
41
  Helpers:
40
42
 
package/dist/index.cjs.js CHANGED
@@ -10,6 +10,24 @@ var datocmsListen = require('datocms-listen');
10
10
 
11
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
12
 
13
+ function _interopNamespace(e) {
14
+ if (e && e.__esModule) return e;
15
+ var n = Object.create(null);
16
+ if (e) {
17
+ Object.keys(e).forEach(function (k) {
18
+ if (k !== 'default') {
19
+ var d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: function () { return e[k]; }
23
+ });
24
+ }
25
+ });
26
+ }
27
+ n["default"] = e;
28
+ return Object.freeze(n);
29
+ }
30
+
13
31
  var hypenateStyleName__default = /*#__PURE__*/_interopDefaultLegacy(hypenateStyleName);
14
32
 
15
33
  const isSsr = () => {
@@ -71,19 +89,19 @@ const Source = vue.defineComponent({
71
89
  }
72
90
  });
73
91
 
74
- var __defProp$3 = Object.defineProperty;
75
- var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
76
- var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
77
- var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
78
- var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
79
- var __spreadValues$3 = (a, b) => {
92
+ var __defProp$5 = Object.defineProperty;
93
+ var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
94
+ var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
95
+ var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
96
+ var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
97
+ var __spreadValues$5 = (a, b) => {
80
98
  for (var prop in b || (b = {}))
81
- if (__hasOwnProp$4.call(b, prop))
82
- __defNormalProp$3(a, prop, b[prop]);
83
- if (__getOwnPropSymbols$4)
84
- for (var prop of __getOwnPropSymbols$4(b)) {
85
- if (__propIsEnum$4.call(b, prop))
86
- __defNormalProp$3(a, prop, b[prop]);
99
+ if (__hasOwnProp$6.call(b, prop))
100
+ __defNormalProp$5(a, prop, b[prop]);
101
+ if (__getOwnPropSymbols$6)
102
+ for (var prop of __getOwnPropSymbols$6(b)) {
103
+ if (__propIsEnum$6.call(b, prop))
104
+ __defNormalProp$5(a, prop, b[prop]);
87
105
  }
88
106
  return a;
89
107
  };
@@ -111,7 +129,7 @@ const Sizer = vue.defineComponent({
111
129
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}"></svg>`;
112
130
  return () => vue.h("img", {
113
131
  class: sizerClass,
114
- style: __spreadValues$3({
132
+ style: __spreadValues$5({
115
133
  display: "block",
116
134
  width: explicitWidth ? `${width}px` : "100%"
117
135
  }, sizerStyle),
@@ -121,25 +139,25 @@ const Sizer = vue.defineComponent({
121
139
  }
122
140
  });
123
141
 
124
- var __defProp$2 = Object.defineProperty;
125
- var __defProps$2 = Object.defineProperties;
126
- var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
127
- var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
128
- var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
129
- var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
130
- var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
131
- var __spreadValues$2 = (a, b) => {
142
+ var __defProp$4 = Object.defineProperty;
143
+ var __defProps$3 = Object.defineProperties;
144
+ var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
145
+ var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
146
+ var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
147
+ var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
148
+ var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
149
+ var __spreadValues$4 = (a, b) => {
132
150
  for (var prop in b || (b = {}))
133
- if (__hasOwnProp$3.call(b, prop))
134
- __defNormalProp$2(a, prop, b[prop]);
135
- if (__getOwnPropSymbols$3)
136
- for (var prop of __getOwnPropSymbols$3(b)) {
137
- if (__propIsEnum$3.call(b, prop))
138
- __defNormalProp$2(a, prop, b[prop]);
151
+ if (__hasOwnProp$5.call(b, prop))
152
+ __defNormalProp$4(a, prop, b[prop]);
153
+ if (__getOwnPropSymbols$5)
154
+ for (var prop of __getOwnPropSymbols$5(b)) {
155
+ if (__propIsEnum$5.call(b, prop))
156
+ __defNormalProp$4(a, prop, b[prop]);
139
157
  }
140
158
  return a;
141
159
  };
142
- var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
160
+ var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
143
161
  const escape = (s) => {
144
162
  s = "" + s;
145
163
  s = s.replace(/&/g, "&amp;");
@@ -385,7 +403,7 @@ const Image = vue.defineComponent({
385
403
  return vue.h(
386
404
  "div",
387
405
  {
388
- style: __spreadValues$2(__spreadValues$2({
406
+ style: __spreadValues$4(__spreadValues$4({
389
407
  display: this.explicitWidth ? "inline-block" : "block",
390
408
  overflow: "hidden"
391
409
  }, this.layout === "fill" ? absolutePositioning : this.layout === "intrinsic" ? { position: "relative", width: "100%", maxWidth: `${width}px` } : this.layout === "fixed" ? { position: "relative", width: `${width}px` } : { position: "relative" }), this.rootStyle),
@@ -405,7 +423,7 @@ const Image = vue.defineComponent({
405
423
  onLoad: this.handleLoad,
406
424
  ref: "imageRef",
407
425
  class: this.pictureClass,
408
- style: __spreadValues$2(__spreadProps$2(__spreadValues$2({
426
+ style: __spreadValues$4(__spreadProps$3(__spreadValues$4({
409
427
  opacity: showImage ? 1 : 0,
410
428
  transition
411
429
  }, absolutePositioning), {
@@ -430,7 +448,7 @@ const Image = vue.defineComponent({
430
448
  alt: this.data.alt,
431
449
  title: this.data.title,
432
450
  class: this.pictureClass,
433
- style: toCss(__spreadValues$2(__spreadValues$2({}, this.pictureStyle), absolutePositioning)),
451
+ style: toCss(__spreadValues$4(__spreadValues$4({}, this.pictureStyle), absolutePositioning)),
434
452
  loading: this.computedLazyLoad ? "lazy" : void 0,
435
453
  fetchpriority: this.priority ? "high" : void 0
436
454
  })
@@ -446,23 +464,23 @@ const DatocmsImagePlugin = {
446
464
  }
447
465
  };
448
466
 
449
- var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
450
- var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
451
- var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
452
- var __objRest$1 = (source, exclude) => {
467
+ var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
468
+ var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
469
+ var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
470
+ var __objRest$2 = (source, exclude) => {
453
471
  var target = {};
454
472
  for (var prop in source)
455
- if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
473
+ if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
456
474
  target[prop] = source[prop];
457
- if (source != null && __getOwnPropSymbols$2)
458
- for (var prop of __getOwnPropSymbols$2(source)) {
459
- if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
475
+ if (source != null && __getOwnPropSymbols$4)
476
+ for (var prop of __getOwnPropSymbols$4(source)) {
477
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
460
478
  target[prop] = source[prop];
461
479
  }
462
480
  return target;
463
481
  };
464
482
  const hAdapter = (tagName, props, childOrChildren) => {
465
- const _a = props || {}; __objRest$1(_a, ["href", "target", "rel"]);
483
+ const _a = props || {}; __objRest$2(_a, ["href", "target", "rel"]);
466
484
  return vue.h(
467
485
  tagName,
468
486
  props,
@@ -623,6 +641,499 @@ const DatocmsStructuredTextPlugin = {
623
641
  }
624
642
  };
625
643
 
644
+ var __defProp$3 = Object.defineProperty;
645
+ var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
646
+ var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
647
+ var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
648
+ var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
649
+ var __spreadValues$3 = (a, b) => {
650
+ for (var prop in b || (b = {}))
651
+ if (__hasOwnProp$3.call(b, prop))
652
+ __defNormalProp$3(a, prop, b[prop]);
653
+ if (__getOwnPropSymbols$3)
654
+ for (var prop of __getOwnPropSymbols$3(b)) {
655
+ if (__propIsEnum$3.call(b, prop))
656
+ __defNormalProp$3(a, prop, b[prop]);
657
+ }
658
+ return a;
659
+ };
660
+ const computedTitle = (title) => {
661
+ return title ? { title } : void 0;
662
+ };
663
+ const computedPlaybackId = (muxPlaybackId, playbackId) => {
664
+ if (!(muxPlaybackId || playbackId))
665
+ return void 0;
666
+ return { playbackId: `${muxPlaybackId || playbackId}` };
667
+ };
668
+ const computedStyle = (width, height) => {
669
+ if (!(width && height))
670
+ return void 0;
671
+ return {
672
+ style: {
673
+ aspectRatio: `${width} / ${height}`
674
+ }
675
+ };
676
+ };
677
+ const computedPlaceholder = (blurUpThumb) => {
678
+ return blurUpThumb ? { placeholder: blurUpThumb } : void 0;
679
+ };
680
+ const useVideoPlayer = ({
681
+ data
682
+ }) => {
683
+ const { title, width, height, playbackId, muxPlaybackId, blurUpThumb } = data || {};
684
+ if (data === void 0)
685
+ return {};
686
+ return __spreadValues$3(__spreadValues$3(__spreadValues$3(__spreadValues$3({}, computedTitle(title) || {}), computedPlaybackId(muxPlaybackId, playbackId) || {}), computedStyle(width, height) || {}), computedPlaceholder(blurUpThumb) || {});
687
+ };
688
+
689
+ var __defProp$2 = Object.defineProperty;
690
+ var __defProps$2 = Object.defineProperties;
691
+ var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
692
+ var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
693
+ var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
694
+ var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
695
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
696
+ var __spreadValues$2 = (a, b) => {
697
+ for (var prop in b || (b = {}))
698
+ if (__hasOwnProp$2.call(b, prop))
699
+ __defNormalProp$2(a, prop, b[prop]);
700
+ if (__getOwnPropSymbols$2)
701
+ for (var prop of __getOwnPropSymbols$2(b)) {
702
+ if (__propIsEnum$2.call(b, prop))
703
+ __defNormalProp$2(a, prop, b[prop]);
704
+ }
705
+ return a;
706
+ };
707
+ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
708
+ var __objRest$1 = (source, exclude) => {
709
+ var target = {};
710
+ for (var prop in source)
711
+ if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
712
+ target[prop] = source[prop];
713
+ if (source != null && __getOwnPropSymbols$2)
714
+ for (var prop of __getOwnPropSymbols$2(source)) {
715
+ if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
716
+ target[prop] = source[prop];
717
+ }
718
+ return target;
719
+ };
720
+ const isNil = (x) => x == void 0;
721
+ const isKeyOf = (k, o) => {
722
+ if (isNil(o))
723
+ return false;
724
+ return k in o;
725
+ };
726
+ const PropToAttrNameMap = {
727
+ crossOrigin: "crossorigin",
728
+ viewBox: "viewBox",
729
+ playsInline: "playsinline",
730
+ autoPlay: "autoplay",
731
+ playbackRate: "playbackrate",
732
+ playbackRates: "playbackrates"
733
+ };
734
+ const toKebabCase = (string) => string.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
735
+ const toNativeAttrName = (propName, propValue) => {
736
+ if (typeof propValue === "boolean" && !propValue)
737
+ return void 0;
738
+ if (isKeyOf(propName, PropToAttrNameMap))
739
+ return PropToAttrNameMap[propName];
740
+ if (typeof propValue == void 0)
741
+ return void 0;
742
+ if (/[A-Z]/.test(propName))
743
+ return toKebabCase(propName);
744
+ return propName;
745
+ };
746
+ const toNativeAttrValue = (propValue, propName) => {
747
+ if (Array.isArray(propValue))
748
+ return propValue.join(" ");
749
+ if (typeof propValue === "boolean")
750
+ return propValue;
751
+ return propValue;
752
+ };
753
+ const toHTMLAttrs = (props = {}) => {
754
+ return Object.entries(props).reduce(
755
+ (transformedProps, [propName, propValue]) => {
756
+ const attrName = toNativeAttrName(propName, propValue);
757
+ if (!attrName) {
758
+ return transformedProps;
759
+ }
760
+ const attrValue = toNativeAttrValue(propValue);
761
+ if (attrValue === void 0) {
762
+ return transformedProps;
763
+ }
764
+ transformedProps[attrName] = attrValue;
765
+ return transformedProps;
766
+ },
767
+ {}
768
+ );
769
+ };
770
+ const VideoPlayer = vue.defineComponent({
771
+ name: "DatocmsVideoPlayer",
772
+ props: {
773
+ _hlsConfig: {
774
+ type: Object,
775
+ required: false
776
+ },
777
+ accentColor: {
778
+ type: String,
779
+ required: false
780
+ },
781
+ audio: {
782
+ type: Boolean,
783
+ required: false
784
+ },
785
+ autoPlay: {
786
+ type: [Boolean, String],
787
+ required: false
788
+ },
789
+ backwardSeekOffset: {
790
+ type: Number,
791
+ required: false
792
+ },
793
+ beaconCollectionDomain: {
794
+ type: String,
795
+ required: false
796
+ },
797
+ crossOrigin: {
798
+ type: String,
799
+ required: false
800
+ },
801
+ currentTime: {
802
+ type: Number,
803
+ required: false
804
+ },
805
+ customDomain: {
806
+ type: String,
807
+ required: false
808
+ },
809
+ data: {
810
+ type: Object,
811
+ required: false
812
+ },
813
+ debug: {
814
+ type: Boolean,
815
+ required: false
816
+ },
817
+ defaultDuration: {
818
+ type: Number,
819
+ required: false
820
+ },
821
+ defaultHiddenCaptions: {
822
+ type: Boolean,
823
+ required: false
824
+ },
825
+ defaultShowRemainingTime: {
826
+ type: Boolean,
827
+ required: false
828
+ },
829
+ defaultStreamType: {
830
+ type: String,
831
+ required: false
832
+ },
833
+ disableCookies: {
834
+ type: Boolean,
835
+ required: false,
836
+ default: () => true
837
+ },
838
+ disablePictureInPicture: {
839
+ type: Boolean,
840
+ required: false
841
+ },
842
+ envKey: {
843
+ type: String,
844
+ required: false
845
+ },
846
+ extraSourceParams: {
847
+ type: Object,
848
+ required: false
849
+ },
850
+ forwardSeekOffset: {
851
+ type: Number,
852
+ required: false
853
+ },
854
+ hotkeys: {
855
+ type: String,
856
+ required: false
857
+ },
858
+ loop: {
859
+ type: Boolean,
860
+ required: false
861
+ },
862
+ maxResolution: {
863
+ type: String,
864
+ required: false
865
+ },
866
+ metadata: {
867
+ type: Object,
868
+ required: false
869
+ },
870
+ metadataVideoId: {
871
+ type: String,
872
+ required: false
873
+ },
874
+ metadataVideoTitle: {
875
+ type: String,
876
+ required: false
877
+ },
878
+ metadataViewerUserId: {
879
+ type: String,
880
+ required: false
881
+ },
882
+ minResolution: {
883
+ type: String,
884
+ required: false
885
+ },
886
+ muted: {
887
+ type: Boolean,
888
+ required: false
889
+ },
890
+ nohotkeys: {
891
+ type: String,
892
+ required: false
893
+ },
894
+ noVolumePref: {
895
+ type: Boolean,
896
+ required: false
897
+ },
898
+ paused: {
899
+ type: Boolean,
900
+ required: false
901
+ },
902
+ placeholder: {
903
+ type: String,
904
+ required: false
905
+ },
906
+ playbackId: {
907
+ type: String,
908
+ required: false
909
+ },
910
+ playbackRate: {
911
+ type: Number,
912
+ required: false
913
+ },
914
+ playbackRates: {
915
+ type: Array,
916
+ required: false
917
+ },
918
+ playerSoftwareName: {
919
+ type: String,
920
+ required: false
921
+ },
922
+ playerSoftwareVersion: {
923
+ type: String,
924
+ required: false
925
+ },
926
+ playsInline: {
927
+ type: Boolean,
928
+ required: false
929
+ },
930
+ poster: {
931
+ type: String,
932
+ required: false
933
+ },
934
+ preferCmcd: {
935
+ type: String,
936
+ required: false
937
+ },
938
+ preferPlayback: {
939
+ type: String,
940
+ required: false
941
+ },
942
+ preload: {
943
+ type: String,
944
+ required: false,
945
+ default: () => "metadata"
946
+ },
947
+ primaryColor: {
948
+ type: String,
949
+ required: false
950
+ },
951
+ renditionOrder: {
952
+ type: String,
953
+ required: false
954
+ },
955
+ secondaryColor: {
956
+ type: String,
957
+ required: false
958
+ },
959
+ src: {
960
+ type: String,
961
+ required: false
962
+ },
963
+ startTime: {
964
+ type: Number,
965
+ required: false
966
+ },
967
+ storyboardSrc: {
968
+ type: String,
969
+ required: false
970
+ },
971
+ streamType: {
972
+ type: String,
973
+ required: false
974
+ },
975
+ targetLiveWindow: {
976
+ type: Number,
977
+ required: false
978
+ },
979
+ theme: {
980
+ type: String,
981
+ required: false
982
+ },
983
+ themeProps: {
984
+ type: Object,
985
+ required: false
986
+ },
987
+ thumbnailTime: {
988
+ type: Number,
989
+ required: false
990
+ },
991
+ title: {
992
+ type: String,
993
+ required: false
994
+ },
995
+ tokens: {
996
+ type: Object,
997
+ required: false
998
+ },
999
+ volume: {
1000
+ type: Number,
1001
+ required: false
1002
+ }
1003
+ },
1004
+ emits: [
1005
+ "abort",
1006
+ "canPlay",
1007
+ "canPlayThrough",
1008
+ "emptied",
1009
+ "loadStart",
1010
+ "loadedData",
1011
+ "loadedMetadata",
1012
+ "progress",
1013
+ "durationChange",
1014
+ "volumeChange",
1015
+ "rateChange",
1016
+ "resize",
1017
+ "waiting",
1018
+ "play",
1019
+ "playing",
1020
+ "timeUpdate",
1021
+ "pause",
1022
+ "seeking",
1023
+ "seeked",
1024
+ "stalled",
1025
+ "suspend",
1026
+ "ended",
1027
+ "error",
1028
+ "cuePointChange",
1029
+ "cuePointsChange"
1030
+ ],
1031
+ setup: (_a) => {
1032
+ var _b = _a, { data = {}, disableCookies = true, preload = "metadata" } = _b, otherProps = __objRest$1(_b, ["data", "disableCookies", "preload"]);
1033
+ Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('@mux/mux-player')); });
1034
+ const muxPlayerRef = vue.ref();
1035
+ const computedProps = __spreadProps$2(__spreadValues$2({}, useVideoPlayer({ data })), {
1036
+ disableCookies,
1037
+ preload
1038
+ });
1039
+ return {
1040
+ muxPlayerRef,
1041
+ computedProps,
1042
+ otherProps
1043
+ };
1044
+ },
1045
+ mounted() {
1046
+ if (this.muxPlayerRef) {
1047
+ this.muxPlayerRef.addEventListener("abort", (event) => {
1048
+ this.$emit("abort", event);
1049
+ });
1050
+ this.muxPlayerRef.addEventListener("canplay", (event) => {
1051
+ this.$emit("canPlay", event);
1052
+ });
1053
+ this.muxPlayerRef.addEventListener("canplaythrough", (event) => {
1054
+ this.$emit("canPlayThrough", event);
1055
+ });
1056
+ this.muxPlayerRef.addEventListener("emptied", (event) => {
1057
+ this.$emit("emptied", event);
1058
+ });
1059
+ this.muxPlayerRef.addEventListener("loadstart", (event) => {
1060
+ this.$emit("loadStart", event);
1061
+ });
1062
+ this.muxPlayerRef.addEventListener("loadeddata", (event) => {
1063
+ this.$emit("loadedData", event);
1064
+ });
1065
+ this.muxPlayerRef.addEventListener("loadedmetadata", (event) => {
1066
+ this.$emit("loadedMetadata", event);
1067
+ });
1068
+ this.muxPlayerRef.addEventListener("progress", (event) => {
1069
+ this.$emit("progress", event);
1070
+ });
1071
+ this.muxPlayerRef.addEventListener("durationchange", (event) => {
1072
+ this.$emit("durationChange", event);
1073
+ });
1074
+ this.muxPlayerRef.addEventListener("volumechange", (event) => {
1075
+ this.$emit("volumeChange", event);
1076
+ });
1077
+ this.muxPlayerRef.addEventListener("ratechange", (event) => {
1078
+ this.$emit("rateChange", event);
1079
+ });
1080
+ this.muxPlayerRef.addEventListener("resize", (event) => {
1081
+ this.$emit("resize", event);
1082
+ });
1083
+ this.muxPlayerRef.addEventListener("waiting", (event) => {
1084
+ this.$emit("waiting", event);
1085
+ });
1086
+ this.muxPlayerRef.addEventListener("play", (event) => {
1087
+ this.$emit("play", event);
1088
+ });
1089
+ this.muxPlayerRef.addEventListener("playing", (event) => {
1090
+ this.$emit("playing", event);
1091
+ });
1092
+ this.muxPlayerRef.addEventListener("timeupdate", (event) => {
1093
+ this.$emit("timeUpdate", event);
1094
+ });
1095
+ this.muxPlayerRef.addEventListener("pause", (event) => {
1096
+ this.$emit("pause", event);
1097
+ });
1098
+ this.muxPlayerRef.addEventListener("seeking", (event) => {
1099
+ this.$emit("seeking", event);
1100
+ });
1101
+ this.muxPlayerRef.addEventListener("seeked", (event) => {
1102
+ this.$emit("seeked", event);
1103
+ });
1104
+ this.muxPlayerRef.addEventListener("stalled", (event) => {
1105
+ this.$emit("stalled", event);
1106
+ });
1107
+ this.muxPlayerRef.addEventListener("suspend", (event) => {
1108
+ this.$emit("suspend", event);
1109
+ });
1110
+ this.muxPlayerRef.addEventListener("ended", (event) => {
1111
+ this.$emit("ended", event);
1112
+ });
1113
+ this.muxPlayerRef.addEventListener("error", (event) => {
1114
+ this.$emit("error", event);
1115
+ });
1116
+ this.muxPlayerRef.addEventListener("cuepointchange", (event) => {
1117
+ this.$emit("cuePointChange", event);
1118
+ });
1119
+ this.muxPlayerRef.addEventListener("cuepointschange", (event) => {
1120
+ this.$emit("cuePointsChange", event);
1121
+ });
1122
+ }
1123
+ },
1124
+ render() {
1125
+ return vue.h("mux-player", __spreadValues$2(__spreadValues$2({
1126
+ ref: "muxPlayerRef",
1127
+ "stream-type": "on-demand"
1128
+ }, toHTMLAttrs(this.computedProps)), toHTMLAttrs(this.otherProps)));
1129
+ }
1130
+ });
1131
+ const DatocmsVideoPlayerPlugin = {
1132
+ install: (Vue) => {
1133
+ Vue.component("DatocmsVideoPlayer", VideoPlayer);
1134
+ }
1135
+ };
1136
+
626
1137
  var __defProp$1 = Object.defineProperty;
627
1138
  var __defProps$1 = Object.defineProperties;
628
1139
  var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
@@ -874,10 +1385,17 @@ Object.defineProperty(exports, 'RenderError', {
874
1385
  });
875
1386
  exports.DatocmsImagePlugin = DatocmsImagePlugin;
876
1387
  exports.DatocmsStructuredTextPlugin = DatocmsStructuredTextPlugin;
1388
+ exports.DatocmsVideoPlayerPlugin = DatocmsVideoPlayerPlugin;
877
1389
  exports.Image = Image;
878
1390
  exports.StructuredText = StructuredText;
1391
+ exports.VideoPlayer = VideoPlayer;
879
1392
  exports.appendKeyToValidElement = appendKeyToValidElement;
880
1393
  exports.defaultAdapter = defaultAdapter;
1394
+ exports.isKeyOf = isKeyOf;
1395
+ exports.isNil = isNil;
881
1396
  exports.toHead = toHead;
1397
+ exports.toNativeAttrName = toNativeAttrName;
1398
+ exports.toNativeAttrValue = toNativeAttrValue;
882
1399
  exports.useQuerySubscription = useQuerySubscription;
883
1400
  exports.useSiteSearch = useSiteSearch;
1401
+ exports.useVideoPlayer = useVideoPlayer;