vue-datocms 8.1.16 → 8.1.17
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/index.cjs.js +13 -2
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.mjs +13 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1143,12 +1143,23 @@ const computedStyle = (width, height) => {
|
|
|
1143
1143
|
const computedPlaceholder = (blurUpThumb) => {
|
|
1144
1144
|
return blurUpThumb ? { placeholder: blurUpThumb } : void 0;
|
|
1145
1145
|
};
|
|
1146
|
+
const computedPoster = (thumbnailUrl) => {
|
|
1147
|
+
return thumbnailUrl ? { poster: thumbnailUrl } : void 0;
|
|
1148
|
+
};
|
|
1146
1149
|
const useVideoPlayer = ({
|
|
1147
1150
|
data
|
|
1148
1151
|
}) => {
|
|
1149
|
-
const {
|
|
1152
|
+
const {
|
|
1153
|
+
title,
|
|
1154
|
+
width,
|
|
1155
|
+
height,
|
|
1156
|
+
playbackId,
|
|
1157
|
+
muxPlaybackId,
|
|
1158
|
+
blurUpThumb,
|
|
1159
|
+
thumbnailUrl
|
|
1160
|
+
} = data || {};
|
|
1150
1161
|
if (data === void 0) return {};
|
|
1151
|
-
return __spreadValues$3(__spreadValues$3(__spreadValues$3(__spreadValues$3({}, computedTitle(title) || {}), computedPlaybackId(muxPlaybackId, playbackId) || {}), computedStyle(width, height) || {}), computedPlaceholder(blurUpThumb) || {});
|
|
1162
|
+
return __spreadValues$3(__spreadValues$3(__spreadValues$3(__spreadValues$3(__spreadValues$3({}, computedTitle(title) || {}), computedPlaybackId(muxPlaybackId, playbackId) || {}), computedStyle(width, height) || {}), computedPlaceholder(blurUpThumb) || {}), computedPoster(thumbnailUrl) || {});
|
|
1152
1163
|
};
|
|
1153
1164
|
|
|
1154
1165
|
var __defProp$2 = Object.defineProperty;
|
package/dist/index.d.ts
CHANGED
|
@@ -959,6 +959,8 @@ type Video = {
|
|
|
959
959
|
playbackId?: Possibly<string>;
|
|
960
960
|
/** A data: URI containing a blurhash for the video */
|
|
961
961
|
blurUpThumb?: Possibly<string>;
|
|
962
|
+
/** A URL for the video thumbnail, used as the poster image */
|
|
963
|
+
thumbnailUrl?: Possibly<string>;
|
|
962
964
|
/** Other data can be passed, but they have no effect on rendering the player */
|
|
963
965
|
[k: string]: any;
|
|
964
966
|
};
|
|
@@ -1213,6 +1215,7 @@ declare const VideoPlayer: vue.DefineComponent<{
|
|
|
1213
1215
|
title?: string | null;
|
|
1214
1216
|
playbackId?: string | null;
|
|
1215
1217
|
placeholder?: string | null;
|
|
1218
|
+
poster?: string | null;
|
|
1216
1219
|
};
|
|
1217
1220
|
otherProps: {
|
|
1218
1221
|
disablePictureInPicture: boolean;
|
|
@@ -1693,11 +1696,13 @@ type Style = Maybe<CSSProperties>;
|
|
|
1693
1696
|
type Title = Maybe<string>;
|
|
1694
1697
|
type PlaybackId = Maybe<string>;
|
|
1695
1698
|
type Placeholder = Maybe<string>;
|
|
1699
|
+
type Poster = Maybe<string>;
|
|
1696
1700
|
type AttrsForMuxPlayer = {
|
|
1697
1701
|
style?: Style;
|
|
1698
1702
|
title?: Title;
|
|
1699
1703
|
playbackId?: PlaybackId;
|
|
1700
1704
|
placeholder?: Placeholder;
|
|
1705
|
+
poster?: Poster;
|
|
1701
1706
|
};
|
|
1702
1707
|
type UseVideoPlayerArgs = {
|
|
1703
1708
|
data?: Video;
|
package/dist/index.esm.mjs
CHANGED
|
@@ -1144,12 +1144,23 @@ const computedStyle = (width, height) => {
|
|
|
1144
1144
|
const computedPlaceholder = (blurUpThumb) => {
|
|
1145
1145
|
return blurUpThumb ? { placeholder: blurUpThumb } : void 0;
|
|
1146
1146
|
};
|
|
1147
|
+
const computedPoster = (thumbnailUrl) => {
|
|
1148
|
+
return thumbnailUrl ? { poster: thumbnailUrl } : void 0;
|
|
1149
|
+
};
|
|
1147
1150
|
const useVideoPlayer = ({
|
|
1148
1151
|
data
|
|
1149
1152
|
}) => {
|
|
1150
|
-
const {
|
|
1153
|
+
const {
|
|
1154
|
+
title,
|
|
1155
|
+
width,
|
|
1156
|
+
height,
|
|
1157
|
+
playbackId,
|
|
1158
|
+
muxPlaybackId,
|
|
1159
|
+
blurUpThumb,
|
|
1160
|
+
thumbnailUrl
|
|
1161
|
+
} = data || {};
|
|
1151
1162
|
if (data === void 0) return {};
|
|
1152
|
-
return __spreadValues$3(__spreadValues$3(__spreadValues$3(__spreadValues$3({}, computedTitle(title) || {}), computedPlaybackId(muxPlaybackId, playbackId) || {}), computedStyle(width, height) || {}), computedPlaceholder(blurUpThumb) || {});
|
|
1163
|
+
return __spreadValues$3(__spreadValues$3(__spreadValues$3(__spreadValues$3(__spreadValues$3({}, computedTitle(title) || {}), computedPlaybackId(muxPlaybackId, playbackId) || {}), computedStyle(width, height) || {}), computedPlaceholder(blurUpThumb) || {}), computedPoster(thumbnailUrl) || {});
|
|
1153
1164
|
};
|
|
1154
1165
|
|
|
1155
1166
|
var __defProp$2 = Object.defineProperty;
|