@wix/video 1.72.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/LICENSE +21 -0
- package/README.md +126 -0
- package/dist/cjs/Video.js +121 -0
- package/dist/cjs/Video.js.map +1 -0
- package/dist/cjs/Video.module.scss +27 -0
- package/dist/cjs/Video.stories.js +68 -0
- package/dist/cjs/Video.stories.js.map +1 -0
- package/dist/cjs/custom-element/WowVideo.js +88 -0
- package/dist/cjs/custom-element/WowVideo.js.map +1 -0
- package/dist/cjs/custom-element/registry.js +34 -0
- package/dist/cjs/custom-element/registry.js.map +1 -0
- package/dist/cjs/custom-element/utils.js +138 -0
- package/dist/cjs/custom-element/utils.js.map +1 -0
- package/dist/cjs/custom-element/videoLayout.js +120 -0
- package/dist/cjs/custom-element/videoLayout.js.map +1 -0
- package/dist/cjs/customElementInit.js +10 -0
- package/dist/cjs/customElementInit.js.map +1 -0
- package/dist/cjs/dataManifest.js +53 -0
- package/dist/cjs/dataManifest.js.map +1 -0
- package/dist/cjs/external-types.d.js +2 -0
- package/dist/cjs/external-types.d.js.map +1 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/storybook/Container.js +33 -0
- package/dist/cjs/storybook/Container.js.map +1 -0
- package/dist/cjs/storybook/args.js +178 -0
- package/dist/cjs/storybook/args.js.map +1 -0
- package/dist/cjs/test-types.d.js +2 -0
- package/dist/cjs/test-types.d.js.map +1 -0
- package/dist/cjs/types.js +4 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/Video.js +95 -0
- package/dist/esm/Video.js.map +1 -0
- package/dist/esm/Video.module.scss +27 -0
- package/dist/esm/Video.stories.js +47 -0
- package/dist/esm/Video.stories.js.map +1 -0
- package/dist/esm/custom-element/WowVideo.js +83 -0
- package/dist/esm/custom-element/WowVideo.js.map +1 -0
- package/dist/esm/custom-element/registry.js +29 -0
- package/dist/esm/custom-element/registry.js.map +1 -0
- package/dist/esm/custom-element/utils.js +131 -0
- package/dist/esm/custom-element/utils.js.map +1 -0
- package/dist/esm/custom-element/videoLayout.js +117 -0
- package/dist/esm/custom-element/videoLayout.js.map +1 -0
- package/dist/esm/customElementInit.js +13 -0
- package/dist/esm/customElementInit.js.map +1 -0
- package/dist/esm/dataManifest.js +49 -0
- package/dist/esm/dataManifest.js.map +1 -0
- package/dist/esm/external-types.d.js +2 -0
- package/dist/esm/external-types.d.js.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/storybook/Container.js +21 -0
- package/dist/esm/storybook/Container.js.map +1 -0
- package/dist/esm/storybook/args.js +174 -0
- package/dist/esm/storybook/args.js.map +1 -0
- package/dist/esm/test-types.d.js +2 -0
- package/dist/esm/test-types.d.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/statics/189.chunk.js +35383 -0
- package/dist/statics/189.chunk.js.map +1 -0
- package/dist/statics/189.chunk.min.js +2 -0
- package/dist/statics/189.chunk.min.js.map +1 -0
- package/dist/statics/janet/110.8a580c2d.iframe.bundle.js +10826 -0
- package/dist/statics/janet/110.8a580c2d.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/134.6007b391.iframe.bundle.js +484 -0
- package/dist/statics/janet/134.6007b391.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/134.d48c36bc94ecd2280c0a.manager.bundle.js +1 -0
- package/dist/statics/janet/317.2df397a1e1f34d5a30fd.manager.bundle.js +1 -0
- package/dist/statics/janet/326.e8fcdb36.iframe.bundle.js +1998 -0
- package/dist/statics/janet/326.e8fcdb36.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/326.ff40cdf1778fd94969c8.manager.bundle.js +2 -0
- package/dist/statics/janet/326.ff40cdf1778fd94969c8.manager.bundle.js.LICENSE.txt +31 -0
- package/dist/statics/janet/470.aab6696c.iframe.bundle.js +35380 -0
- package/dist/statics/janet/470.aab6696c.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/599.37d4aa34.iframe.bundle.js +3294 -0
- package/dist/statics/janet/599.37d4aa34.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/599.47c7dacc8997e4d71eac.manager.bundle.js +1 -0
- package/dist/statics/janet/61.5cb88eb5.iframe.bundle.js +2652 -0
- package/dist/statics/janet/61.5cb88eb5.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/61.a575d4776ab0d42da5c8.manager.bundle.js +1 -0
- package/dist/statics/janet/673.59f2a23a.iframe.bundle.js +173 -0
- package/dist/statics/janet/673.59f2a23a.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/725.0db49c6347dfe44ace2d.manager.bundle.js +2 -0
- package/dist/statics/janet/725.0db49c6347dfe44ace2d.manager.bundle.js.LICENSE.txt +8 -0
- package/dist/statics/janet/725.cbba2e4b.iframe.bundle.js +10451 -0
- package/dist/statics/janet/725.cbba2e4b.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/734.428ea23e9773cd26fb57.manager.bundle.js +2 -0
- package/dist/statics/janet/734.428ea23e9773cd26fb57.manager.bundle.js.LICENSE.txt +94 -0
- package/dist/statics/janet/833.75275036.iframe.bundle.js +6777 -0
- package/dist/statics/janet/833.75275036.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/833.ef639b005d7b76723595.manager.bundle.js +2 -0
- package/dist/statics/janet/833.ef639b005d7b76723595.manager.bundle.js.LICENSE.txt +12 -0
- package/dist/statics/janet/W-06.svg +1 -0
- package/dist/statics/janet/favicon.ico +0 -0
- package/dist/statics/janet/iframe.html +364 -0
- package/dist/statics/janet/index.html +59 -0
- package/dist/statics/janet/janet.json +10 -0
- package/dist/statics/janet/main.666d4853f3d62ab20aa1.manager.bundle.js +1 -0
- package/dist/statics/janet/main.d8a321d6.iframe.bundle.js +73260 -0
- package/dist/statics/janet/main.d8a321d6.iframe.bundle.js.map +1 -0
- package/dist/statics/janet/project.json +1 -0
- package/dist/statics/janet/runtime~main.2195d24e465f19ad9c9a.manager.bundle.js +1 -0
- package/dist/statics/janet/w-06.ico +0 -0
- package/dist/statics/manifest.json +4 -0
- package/dist/statics/manifest.min.json +4 -0
- package/dist/statics/video.css +10 -0
- package/dist/statics/video.css.map +1 -0
- package/dist/statics/video.min.css +1 -0
- package/dist/statics/video.rtl.css +8 -0
- package/dist/statics/video.rtl.min.css +1 -0
- package/dist/statics/video.umd.js +5990 -0
- package/dist/statics/video.umd.js.map +1 -0
- package/dist/statics/video.umd.min.js +2 -0
- package/dist/statics/video.umd.min.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/Video.d.ts +5 -0
- package/dist/types/Video.d.ts.map +1 -0
- package/dist/types/Video.stories.d.ts +20 -0
- package/dist/types/Video.stories.d.ts.map +1 -0
- package/dist/types/custom-element/WowVideo.d.ts +4 -0
- package/dist/types/custom-element/WowVideo.d.ts.map +1 -0
- package/dist/types/custom-element/registry.d.ts +3 -0
- package/dist/types/custom-element/registry.d.ts.map +1 -0
- package/dist/types/custom-element/utils.d.ts +11 -0
- package/dist/types/custom-element/utils.d.ts.map +1 -0
- package/dist/types/custom-element/videoLayout.d.ts +35 -0
- package/dist/types/custom-element/videoLayout.d.ts.map +1 -0
- package/dist/types/customElementInit.d.ts +4 -0
- package/dist/types/customElementInit.d.ts.map +1 -0
- package/dist/types/dataManifest.d.ts +2 -0
- package/dist/types/dataManifest.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/storybook/Container.d.ts +5 -0
- package/dist/types/storybook/Container.d.ts.map +1 -0
- package/dist/types/storybook/args.d.ts +174 -0
- package/dist/types/storybook/args.d.ts.map +1 -0
- package/dist/types/types.d.ts +62 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +121 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getVideoSource","setVideoFocalPoint","measure","videoNode","container","quality","uri","sources","adaptiveSources","duration","onError","videoSourceUrl","patchVideoSource","offsetWidth","offsetHeight","needsSrcUpdate","shouldUpdateSrc","mutate","poster","autoplay","posterEffect","playbackRate","focalPoint","toggleAttribute","videoWidth","width","videoHeight","height","aspectRatio","style","setProperty","toString","handlePosterVisibility","newSrcUrl","hasError","networkState","NETWORK_NO_SOURCE","hasDiff","currentSrc","endsWith","Boolean","needsEventUpdate","posterNode","isPausedOrEmpty","paused","ontimeupdate","onseeked","onplay","muteState","muted","currentTime","removePoster","transition","opacity"],"sources":["../../../src/custom-element/videoLayout.ts"],"sourcesContent":["import type { AdaptiveVideoSource, QualityPolicy, VideoSource } from '../types';\nimport { getVideoSource, setVideoFocalPoint } from './utils';\n\nexport default {\n /**\n * @param {HTMLVideoElement} videoNode\n * @param {HTMLElement} container\n * @param {QualityPolicy} quality\n * @param {string} uri\n * @param {Object[]} sources\n * @param {Object[]} adaptiveSources\n * @param {number} duration\n * @param {(error: Error) => void} onError\n * @return {{currentSrc: string, videoSourceUrl: string}}\n */\n async measure(\n videoNode: HTMLVideoElement,\n container: HTMLElement,\n quality: QualityPolicy,\n uri: string,\n sources?: VideoSource[],\n adaptiveSources?: AdaptiveVideoSource[],\n duration?: number,\n onError?: (error: Error) => void,\n ) {\n const { videoSourceUrl, patchVideoSource } = await getVideoSource(\n container.offsetWidth,\n container.offsetHeight,\n uri,\n quality,\n sources,\n adaptiveSources,\n duration,\n onError,\n );\n const needsSrcUpdate = shouldUpdateSrc(videoNode, videoSourceUrl);\n return {\n needsSrcUpdate,\n patchVideoSource,\n };\n },\n /**\n * @param {HTMLDivElement} poster\n * @param {HTMLVideoElement} videoNode\n * @param {boolean} autoplay\n * @param {boolean} needsSrcUpdate\n * @param {string} posterEffect\n * @param {number} playbackRate\n * @param {(videoNode: HTMLVideoElement) => void} patchVideoSource\n * @param {Object[]} sources\n * @param {Object} focalPoint\n */\n mutate(\n poster: HTMLDivElement,\n videoNode: HTMLVideoElement,\n autoplay: boolean,\n needsSrcUpdate: boolean,\n posterEffect: string,\n playbackRate: number,\n patchVideoSource: (videoNode: HTMLVideoElement) => void,\n sources?: VideoSource[],\n focalPoint?: { x: number; y: number },\n ): void {\n videoNode.toggleAttribute('autoplay', autoplay);\n if (sources?.[0]) {\n const videoWidth = sources[0].width;\n const videoHeight = sources[0].height;\n const aspectRatio = videoWidth / videoHeight;\n videoNode.style.setProperty('--aspect-ratio', aspectRatio.toString());\n }\n if (focalPoint) {\n setVideoFocalPoint(videoNode, focalPoint);\n }\n\n handlePosterVisibility(\n needsSrcUpdate,\n videoNode,\n poster,\n posterEffect,\n autoplay,\n );\n\n if (needsSrcUpdate) {\n patchVideoSource(videoNode);\n }\n videoNode.playbackRate = playbackRate;\n },\n};\n\n/**\n *\n * @param videoNode\n * @param newSrcUrl\n * @returns {*|boolean}\n */\nfunction shouldUpdateSrc(\n videoNode: HTMLVideoElement,\n newSrcUrl: string,\n): boolean {\n const hasError = videoNode.networkState === videoNode.NETWORK_NO_SOURCE;\n const hasDiff = !videoNode.currentSrc.endsWith(newSrcUrl);\n return Boolean(newSrcUrl && (hasDiff || hasError));\n}\n\n/**\n *\n * @param {boolean} needsEventUpdate\n * @param {HTMLVideoElement} videoNode\n * @param {HTMLDivElement} posterNode\n * @param {string} posterEffect\n * @param {boolean} autoplay\n */\nfunction handlePosterVisibility(\n needsEventUpdate: boolean,\n videoNode: HTMLVideoElement,\n posterNode: HTMLDivElement,\n posterEffect: string,\n autoplay: boolean,\n): void {\n const isPausedOrEmpty = videoNode.paused || videoNode.currentSrc === '';\n if (needsEventUpdate && isPausedOrEmpty) {\n videoNode.ontimeupdate = null;\n videoNode.onseeked = null;\n videoNode.onplay = null;\n if (autoplay) {\n const muteState = videoNode.muted;\n videoNode.ontimeupdate = () => {\n if (videoNode.currentTime > 0) {\n videoNode.ontimeupdate = null;\n videoNode.onseeked = () => {\n videoNode.onseeked = null;\n videoNode.muted = muteState;\n removePoster(videoNode, posterNode, posterEffect);\n };\n videoNode.currentTime = 0;\n }\n };\n } else {\n videoNode.onplay = () => {\n videoNode.onplay = null;\n removePoster(videoNode, posterNode, posterEffect);\n };\n }\n }\n}\n\n/**\n * Show video , hide poster\n *\n * @param videoNode\n * @param posterNode\n * @param posterEffect\n */\nfunction removePoster(\n videoNode: HTMLVideoElement,\n posterNode: HTMLDivElement,\n posterEffect: string,\n): void {\n if (posterEffect === 'fade') {\n posterNode.style.transition = 'opacity 1.6s ease-out';\n }\n posterNode.style.opacity = '0';\n videoNode.style.opacity = '1';\n}\n"],"mappings":"AACA,SAASA,cAAc,EAAEC,kBAAkB,QAAQ,SAAS;AAE5D,eAAe;EACb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,MAAMC,OAAOA,CACXC,SAA2B,EAC3BC,SAAsB,EACtBC,OAAsB,EACtBC,GAAW,EACXC,OAAuB,EACvBC,eAAuC,EACvCC,QAAiB,EACjBC,OAAgC,EAChC;IACA,MAAM;MAAEC,cAAc;MAAEC;IAAiB,CAAC,GAAG,MAAMZ,cAAc,CAC/DI,SAAS,CAACS,WAAW,EACrBT,SAAS,CAACU,YAAY,EACtBR,GAAG,EACHD,OAAO,EACPE,OAAO,EACPC,eAAe,EACfC,QAAQ,EACRC,OACF,CAAC;IACD,MAAMK,cAAc,GAAGC,eAAe,CAACb,SAAS,EAAEQ,cAAc,CAAC;IACjE,OAAO;MACLI,cAAc;MACdH;IACF,CAAC;EACH,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEK,MAAMA,CACJC,MAAsB,EACtBf,SAA2B,EAC3BgB,QAAiB,EACjBJ,cAAuB,EACvBK,YAAoB,EACpBC,YAAoB,EACpBT,gBAAuD,EACvDL,OAAuB,EACvBe,UAAqC,EAC/B;IACNnB,SAAS,CAACoB,eAAe,CAAC,UAAU,EAAEJ,QAAQ,CAAC;IAC/C,IAAIZ,OAAO,YAAPA,OAAO,CAAG,CAAC,CAAC,EAAE;MAChB,MAAMiB,UAAU,GAAGjB,OAAO,CA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4C,MAAM,GAAG,IAAI;IACvB,IAAI5B,QAAQ,EAAE;MACZ,MAAM6B,SAAS,GAAG7C,SAAS,CAAC8C,KAAK;MACjC9C,SAAS,CAAC0C,YAAY,GAAG,MAAM;QAC7B,IAAI1C,SAAS,CAAC+C,WAAW,GAAG,CAAC,EAAE;UAC7B/C,SAAS,CAAC0C,YAAY,GAAG,IAAI;UAC7B1C,SAAS,CAAC2C,QAAQ,GAAG,MAAM;YACzB3C,SAAS,CAAC2C,QAAQ,GAAG,IAAI;YACzB3C,SAAS,CAAC8C,KAAK,GAAGD,SAAS;YAC3BG,YAAY,CAAChD,SAAS,EAAEuC,UAAU,EAAEtB,YAAY,CAAC;UACnD,CAAC;UACDjB,SAAS,CAAC+C,WAAW,GAAG,CAAC;QAC3B;MACF,CAAC;IACH,CAAC,MAAM;MACL/C,SAAS,CAAC4C,MAAM,GAAG,MAAM;QACvB5C,SAAS,CAAC4C,MAAM,GAAG,IAAI;QACvBI,YAAY,CAAChD,SAAS,EAAEuC,UAAU,EAAEtB,YAAY,CAAC;MACnD,CAAC;IACH;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS+B,YAAYA,CACnBhD,SAA2B,EAC3BuC,UAA0B,EAC1BtB,YAAoB,EACd;EACN,IAAIA,YAAY,KAAK,MAAM,EAAE;IAC3BsB,UAAU,CAACb,KAAK,CAACuB,UAAU,GAAG,uBAAuB;EACvD;EACAV,UAAU,CAACb,KAAK,CAACwB,OAAO,GAAG,GAAG;EAC9BlD,SAAS,CAAC0B,KAAK,CAACwB,OAAO,GAAG,GAAG;AAC/B","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { init } from './custom-element/registry';
|
|
2
|
+
function initCustomElement(contextWindow, services) {
|
|
3
|
+
if (contextWindow === void 0) {
|
|
4
|
+
contextWindow = null;
|
|
5
|
+
}
|
|
6
|
+
if (services === void 0) {
|
|
7
|
+
services = {};
|
|
8
|
+
}
|
|
9
|
+
const actualWindow = contextWindow || window;
|
|
10
|
+
init(actualWindow, services);
|
|
11
|
+
}
|
|
12
|
+
export { initCustomElement };
|
|
13
|
+
//# sourceMappingURL=customElementInit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["init","initCustomElement","contextWindow","services","actualWindow","window"],"sources":["../../src/customElementInit.ts"],"sourcesContent":["import { init } from './custom-element/registry';\nimport { CustomElementServices } from './types';\n\nfunction initCustomElement(\n contextWindow: (Window & typeof globalThis) | null = null,\n services: CustomElementServices = {},\n) {\n const actualWindow = contextWindow || window;\n\n init(actualWindow, services);\n}\n\nexport { initCustomElement };\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,2BAA2B;AAGhD,SAASC,iBAAiBA,CACxBC,aAAkD,EAClDC,QAA+B,EAC/B;EAAA,IAFAD,aAAkD;IAAlDA,aAAkD,GAAG,IAAI;EAAA;EAAA,IACzDC,QAA+B;IAA/BA,QAA+B,GAAG,CAAC,CAAC;EAAA;EAEpC,MAAMC,YAAY,GAAGF,aAAa,IAAIG,MAAM;EAE5CL,IAAI,CAACI,YAAY,EAAED,QAAQ,CAAC;AAC9B;AAEA,SAASF,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { DATA } from '@wix/component-protocol/schema';
|
|
2
|
+
export const videoDataManifest = {
|
|
3
|
+
videoMedia: {
|
|
4
|
+
dataType: DATA.DATA_TYPE.video
|
|
5
|
+
},
|
|
6
|
+
qualityPolicy: {
|
|
7
|
+
dataType: DATA.DATA_TYPE.textEnum,
|
|
8
|
+
[DATA.DATA_TYPE.textEnum]: {
|
|
9
|
+
options: [{
|
|
10
|
+
value: 'PROPORTIONAL',
|
|
11
|
+
displayName: 'Proportional'
|
|
12
|
+
}, {
|
|
13
|
+
value: 'HIGHEST',
|
|
14
|
+
displayName: 'Highest'
|
|
15
|
+
}, {
|
|
16
|
+
value: 'ADAPTIVE',
|
|
17
|
+
displayName: 'Adaptive'
|
|
18
|
+
}]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
poster: {
|
|
22
|
+
dataType: DATA.DATA_TYPE.image
|
|
23
|
+
},
|
|
24
|
+
loop: {
|
|
25
|
+
dataType: DATA.DATA_TYPE.booleanValue
|
|
26
|
+
},
|
|
27
|
+
muted: {
|
|
28
|
+
dataType: DATA.DATA_TYPE.booleanValue
|
|
29
|
+
},
|
|
30
|
+
autoplay: {
|
|
31
|
+
dataType: DATA.DATA_TYPE.booleanValue
|
|
32
|
+
},
|
|
33
|
+
playbackRate: {
|
|
34
|
+
dataType: DATA.DATA_TYPE.number
|
|
35
|
+
},
|
|
36
|
+
posterEffect: {
|
|
37
|
+
dataType: DATA.DATA_TYPE.textEnum,
|
|
38
|
+
[DATA.DATA_TYPE.textEnum]: {
|
|
39
|
+
options: [{
|
|
40
|
+
value: 'FADE',
|
|
41
|
+
displayName: 'Fade'
|
|
42
|
+
}, {
|
|
43
|
+
value: 'NONE',
|
|
44
|
+
displayName: 'None'
|
|
45
|
+
}]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=dataManifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DATA","videoDataManifest","videoMedia","dataType","DATA_TYPE","video","qualityPolicy","textEnum","options","value","displayName","poster","image","loop","booleanValue","muted","autoplay","playbackRate","number","posterEffect"],"sources":["../../src/dataManifest.ts"],"sourcesContent":["import { DATA } from '@wix/component-protocol/schema';\n\nexport const videoDataManifest: Record<string, any> = {\n videoMedia: {\n dataType: DATA.DATA_TYPE.video,\n },\n qualityPolicy: {\n dataType: DATA.DATA_TYPE.textEnum,\n [DATA.DATA_TYPE.textEnum]: {\n options: [\n { value: 'PROPORTIONAL', displayName: 'Proportional' },\n { value: 'HIGHEST', displayName: 'Highest' },\n { value: 'ADAPTIVE', displayName: 'Adaptive' },\n ],\n },\n },\n poster: {\n dataType: DATA.DATA_TYPE.image,\n },\n loop: {\n dataType: DATA.DATA_TYPE.booleanValue,\n },\n muted: {\n dataType: DATA.DATA_TYPE.booleanValue,\n },\n autoplay: {\n dataType: DATA.DATA_TYPE.booleanValue,\n },\n playbackRate: {\n dataType: DATA.DATA_TYPE.number,\n },\n posterEffect: {\n dataType: DATA.DATA_TYPE.textEnum,\n [DATA.DATA_TYPE.textEnum]: {\n options: [\n { value: 'FADE', displayName: 'Fade' },\n { value: 'NONE', displayName: 'None' },\n ],\n },\n },\n};\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,gCAAgC;AAErD,OAAO,MAAMC,iBAAsC,GAAG;EACpDC,UAAU,EAAE;IACVC,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACC;EAC3B,CAAC;EACDC,aAAa,EAAE;IACbH,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACG,QAAQ;IACjC,CAACP,IAAI,CAACI,SAAS,CAACG,QAAQ,GAAG;MACzBC,OAAO,EAAE,CACP;QAAEC,KAAK,EAAE,cAAc;QAAEC,WAAW,EAAE;MAAe,CAAC,EACtD;QAAED,KAAK,EAAE,SAAS;QAAEC,WAAW,EAAE;MAAU,CAAC,EAC5C;QAAED,KAAK,EAAE,UAAU;QAAEC,WAAW,EAAE;MAAW,CAAC;IAElD;EACF,CAAC;EACDC,MAAM,EAAE;IACNR,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACQ;EAC3B,CAAC;EACDC,IAAI,EAAE;IACJV,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACU;EAC3B,CAAC;EACDC,KAAK,EAAE;IACLZ,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACU;EAC3B,CAAC;EACDE,QAAQ,EAAE;IACRb,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACU;EAC3B,CAAC;EACDG,YAAY,EAAE;IACZd,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACc;EAC3B,CAAC;EACDC,YAAY,EAAE;IACZhB,QAAQ,EAAEH,IAAI,CAACI,SAAS,CAACG,QAAQ;IACjC,CAACP,IAAI,CAACI,SAAS,CAACG,QAAQ,GAAG;MACzBC,OAAO,EAAE,CACP;QAAEC,KAAK,EAAE,MAAM;QAAEC,WAAW,EAAE;MAAO,CAAC,EACtC;QAAED,KAAK,EAAE,MAAM;QAAEC,WAAW,EAAE;MAAO,CAAC;IAE1C;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/external-types.d.ts"],"sourcesContent":["/// <reference types=\"@wix/yoshi-flow-library/types\" />\n\ndeclare namespace JSX {\n interface IntrinsicElements {\n 'wow-video': any;\n }\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Video","initCustomElement","videoDataManifest"],"sources":["../../src/index.ts"],"sourcesContent":["import Video from './Video';\nimport { initCustomElement } from './customElementInit';\nimport { videoDataManifest } from './dataManifest';\n\nexport { Video, initCustomElement, videoDataManifest };\nexport * from './types';\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,SAAS;AAC3B,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,iBAAiB,QAAQ,gBAAgB;AAElD,SAASF,KAAK,EAAEC,iBAAiB,EAAEC,iBAAiB;AACpD,cAAc,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const Container = _ref => {
|
|
3
|
+
let {
|
|
4
|
+
id,
|
|
5
|
+
width,
|
|
6
|
+
height,
|
|
7
|
+
children
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
10
|
+
id: id,
|
|
11
|
+
style: {
|
|
12
|
+
width,
|
|
13
|
+
height,
|
|
14
|
+
border: '1px solid red'
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/React.cloneElement(children, {
|
|
17
|
+
containerWidth: width,
|
|
18
|
+
containerHeight: height
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Container","_ref","id","width","height","children","createElement","style","border","cloneElement","containerWidth","containerHeight"],"sources":["../../../src/storybook/Container.tsx"],"sourcesContent":["import React from 'react';\n\ntype ContainerProps = React.HTMLProps<{}>;\n\nexport const Container: React.VFC<ContainerProps> = ({\n id,\n width,\n height,\n children,\n}) => {\n return (\n <div id={id} style={{ width, height, border: '1px solid red' }}>\n {React.cloneElement(children as React.ReactElement<any>, {\n containerWidth: width,\n containerHeight: height,\n })}\n </div>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAIzB,OAAO,MAAMC,SAAoC,GAAGC,IAAA,IAK9C;EAAA,IAL+C;IACnDC,EAAE;IACFC,KAAK;IACLC,MAAM;IACNC;EACF,CAAC,GAAAJ,IAAA;EACC,oBACEF,KAAA,CAAAO,aAAA;IAAKJ,EAAE,EAAEA,EAAG;IAACK,KAAK,EAAE;MAAEJ,KAAK;MAAEC,MAAM;MAAEI,MAAM,EAAE;IAAgB;EAAE,gBAC5DT,KAAK,CAACU,YAAY,CAACJ,QAAQ,EAA6B;IACvDK,cAAc,EAAEP,KAAK;IACrBQ,eAAe,EAAEP;EACnB,CAAC,CACE,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
export const sampleVideo = {
|
|
2
|
+
videoMedia: {
|
|
3
|
+
sources: [{
|
|
4
|
+
quality: '1080p',
|
|
5
|
+
width: 1920,
|
|
6
|
+
height: 1080,
|
|
7
|
+
types: [{
|
|
8
|
+
format: 'mp4',
|
|
9
|
+
uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/1080p/mp4/file.mp4'
|
|
10
|
+
}]
|
|
11
|
+
}, {
|
|
12
|
+
quality: '720p',
|
|
13
|
+
width: 1280,
|
|
14
|
+
height: 720,
|
|
15
|
+
types: [{
|
|
16
|
+
format: 'mp4',
|
|
17
|
+
uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/1080p/mp4/file.mp4'
|
|
18
|
+
}]
|
|
19
|
+
}, {
|
|
20
|
+
quality: '480p',
|
|
21
|
+
width: 854,
|
|
22
|
+
height: 480,
|
|
23
|
+
types: [{
|
|
24
|
+
format: 'mp4',
|
|
25
|
+
uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/480p/mp4/file.mp4'
|
|
26
|
+
}]
|
|
27
|
+
}, {
|
|
28
|
+
quality: '360p',
|
|
29
|
+
width: 640,
|
|
30
|
+
height: 360,
|
|
31
|
+
types: [{
|
|
32
|
+
format: 'mp4',
|
|
33
|
+
uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/360p/mp4/file.mp4'
|
|
34
|
+
}]
|
|
35
|
+
}],
|
|
36
|
+
adaptiveSources: [{
|
|
37
|
+
format: 'hls',
|
|
38
|
+
uri: 'site/media/video/11062b_c1797898279949878ff9bc792dc4a79c/da01a1fc-ad34-44bc-90e8-cc9413c466e6/repackage/hls'
|
|
39
|
+
}],
|
|
40
|
+
uri: 'test-meta-id',
|
|
41
|
+
hasAudio: true,
|
|
42
|
+
fps: 30,
|
|
43
|
+
duration: 40,
|
|
44
|
+
poster: {
|
|
45
|
+
id: 'video-poster',
|
|
46
|
+
uri: '11062b_c1797898279949878ff9bc792dc4a79cf000.jpg',
|
|
47
|
+
width: 1440,
|
|
48
|
+
height: 2560,
|
|
49
|
+
name: 'video-poster.jpg',
|
|
50
|
+
alt: 'alt text'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
loop: true,
|
|
54
|
+
muted: true,
|
|
55
|
+
autoplay: true,
|
|
56
|
+
posterEffect: 'none',
|
|
57
|
+
playbackRate: 1,
|
|
58
|
+
qualityPolicy: 'proportional'
|
|
59
|
+
};
|
|
60
|
+
export const argTypes = {
|
|
61
|
+
qualityPolicy: {
|
|
62
|
+
control: 'select',
|
|
63
|
+
options: ['proportional', 'adaptive', 'highest', 'none'],
|
|
64
|
+
defaultValue: 'proportional',
|
|
65
|
+
description: 'Quality policy for the video',
|
|
66
|
+
table: {
|
|
67
|
+
type: {
|
|
68
|
+
summary: 'enum'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
containerWidth: {
|
|
73
|
+
control: 'number',
|
|
74
|
+
defaultValue: 500,
|
|
75
|
+
description: 'Width in pixels of the container element',
|
|
76
|
+
table: {
|
|
77
|
+
type: {
|
|
78
|
+
summary: 'number'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
containerHeight: {
|
|
83
|
+
control: 'number',
|
|
84
|
+
defaultValue: 275,
|
|
85
|
+
description: 'Height in pixels of the container element',
|
|
86
|
+
table: {
|
|
87
|
+
type: {
|
|
88
|
+
summary: 'number'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
muted: {
|
|
93
|
+
control: 'boolean',
|
|
94
|
+
defaultValue: true,
|
|
95
|
+
description: 'Whether the video should be muted',
|
|
96
|
+
table: {
|
|
97
|
+
type: {
|
|
98
|
+
summary: 'boolean'
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
loop: {
|
|
103
|
+
control: 'boolean',
|
|
104
|
+
defaultValue: true,
|
|
105
|
+
description: 'Whether the video should loop continuously',
|
|
106
|
+
table: {
|
|
107
|
+
type: {
|
|
108
|
+
summary: 'boolean'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
posterEffect: {
|
|
113
|
+
control: 'select',
|
|
114
|
+
options: [undefined, 'fade'],
|
|
115
|
+
defaultValue: undefined,
|
|
116
|
+
description: 'Effect to apply when transitioning from poster to video',
|
|
117
|
+
table: {
|
|
118
|
+
type: {
|
|
119
|
+
summary: 'string'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
playbackRate: {
|
|
124
|
+
control: 'number',
|
|
125
|
+
defaultValue: 1,
|
|
126
|
+
description: 'The playback rate of the video',
|
|
127
|
+
table: {
|
|
128
|
+
type: {
|
|
129
|
+
summary: 'number'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
autoplay: {
|
|
134
|
+
control: 'boolean',
|
|
135
|
+
defaultValue: true,
|
|
136
|
+
description: 'Whether the video should autoplay',
|
|
137
|
+
table: {
|
|
138
|
+
type: {
|
|
139
|
+
summary: 'boolean'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
focalPointX: {
|
|
144
|
+
control: {
|
|
145
|
+
type: 'range',
|
|
146
|
+
min: 0,
|
|
147
|
+
max: 100,
|
|
148
|
+
step: 5
|
|
149
|
+
},
|
|
150
|
+
defaultValue: 50,
|
|
151
|
+
description: 'Horizontal focal point for video positioning (0 = left, 100 = right)',
|
|
152
|
+
table: {
|
|
153
|
+
type: {
|
|
154
|
+
summary: 'number'
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
focalPointY: {
|
|
159
|
+
control: {
|
|
160
|
+
type: 'range',
|
|
161
|
+
min: 0,
|
|
162
|
+
max: 100,
|
|
163
|
+
step: 5
|
|
164
|
+
},
|
|
165
|
+
defaultValue: 50,
|
|
166
|
+
description: 'Vertical focal point for video positioning (0 = top, 100 = bottom)',
|
|
167
|
+
table: {
|
|
168
|
+
type: {
|
|
169
|
+
summary: 'number'
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
//# sourceMappingURL=args.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["sampleVideo","videoMedia","sources","quality","width","height","types","format","uri","adaptiveSources","hasAudio","fps","duration","poster","id","name","alt","loop","muted","autoplay","posterEffect","playbackRate","qualityPolicy","argTypes","control","options","defaultValue","description","table","type","summary","containerWidth","containerHeight","undefined","focalPointX","min","max","step","focalPointY"],"sources":["../../../src/storybook/args.ts"],"sourcesContent":["export const sampleVideo = {\n videoMedia: {\n sources: [\n {\n quality: '1080p' as const,\n width: 1920,\n height: 1080,\n types: [\n {\n format: 'mp4' as const,\n uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/1080p/mp4/file.mp4',\n },\n ],\n },\n {\n quality: '720p' as const,\n width: 1280,\n height: 720,\n types: [\n {\n format: 'mp4' as const,\n uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/1080p/mp4/file.mp4',\n },\n ],\n },\n {\n quality: '480p' as const,\n width: 854,\n height: 480,\n types: [\n {\n format: 'mp4' as const,\n uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/480p/mp4/file.mp4',\n },\n ],\n },\n {\n quality: '360p' as const,\n width: 640,\n height: 360,\n types: [\n {\n format: 'mp4' as const,\n uri: 'video/11062b_c1797898279949878ff9bc792dc4a79c/360p/mp4/file.mp4',\n },\n ],\n },\n ],\n adaptiveSources: [\n {\n format: 'hls' as const,\n uri: 'site/media/video/11062b_c1797898279949878ff9bc792dc4a79c/da01a1fc-ad34-44bc-90e8-cc9413c466e6/repackage/hls',\n },\n ],\n uri: 'test-meta-id',\n hasAudio: true,\n fps: 30,\n duration: 40,\n poster: {\n id: 'video-poster',\n uri: '11062b_c1797898279949878ff9bc792dc4a79cf000.jpg',\n width: 1440,\n height: 2560,\n name: 'video-poster.jpg',\n alt: 'alt text',\n },\n },\n loop: true,\n muted: true,\n autoplay: true,\n posterEffect: 'none',\n playbackRate: 1,\n qualityPolicy: 'proportional',\n};\n\nexport const argTypes = {\n qualityPolicy: {\n control: 'select',\n options: ['proportional', 'adaptive', 'highest', 'none'],\n defaultValue: 'proportional',\n description: 'Quality policy for the video',\n table: {\n type: {\n summary: 'enum',\n },\n },\n },\n containerWidth: {\n control: 'number',\n defaultValue: 500,\n description: 'Width in pixels of the container element',\n table: {\n type: {\n summary: 'number',\n },\n },\n },\n containerHeight: {\n control: 'number',\n defaultValue: 275,\n description: 'Height in pixels of the container element',\n table: {\n type: {\n summary: 'number',\n },\n },\n },\n muted: {\n control: 'boolean',\n defaultValue: true,\n description: 'Whether the video should be muted',\n table: {\n type: {\n summary: 'boolean',\n },\n },\n },\n loop: {\n control: 'boolean',\n defaultValue: true,\n description: 'Whether the video should loop continuously',\n table: {\n type: {\n summary: 'boolean',\n },\n },\n },\n posterEffect: {\n control: 'select',\n options: [undefined, 'fade'],\n defaultValue: undefined,\n description: 'Effect to apply when transitioning from poster to video',\n table: {\n type: {\n summary: 'string',\n },\n },\n },\n playbackRate: {\n control: 'number',\n defaultValue: 1,\n description: 'The playback rate of the video',\n table: {\n type: {\n summary: 'number',\n },\n },\n },\n autoplay: {\n control: 'boolean',\n defaultValue: true,\n description: 'Whether the video should autoplay',\n table: {\n type: {\n summary: 'boolean',\n },\n },\n },\n focalPointX: {\n control: {\n type: 'range',\n min: 0,\n max: 100,\n step: 5,\n },\n defaultValue: 50,\n description:\n 'Horizontal focal point for video positioning (0 = left, 100 = right)',\n table: {\n type: {\n summary: 'number',\n },\n },\n },\n focalPointY: {\n control: {\n type: 'range',\n min: 0,\n max: 100,\n step: 5,\n },\n defaultValue: 50,\n description:\n 'Vertical focal point for video positioning (0 = top, 100 = bottom)',\n table: {\n type: {\n summary: 'number',\n },\n },\n },\n};\n"],"mappings":"AAAA,OAAO,MAAMA,WAAW,GAAG;EACzBC,UAAU,EAAE;IACVC,OAAO,EAAE,CACP;MACEC,OAAO,EAAE,OAAgB;MACzBC,KAAK,EAAE,IAAI;MACXC,MAAM,EAAE,IAAI;MACZC,KAAK,EAAE,CACL;QACEC,MAAM,EAAE,KAAc;QACtBC,GAAG,EAAE;MACP,CAAC;IAEL,CAAC,EACD;MACEL,OAAO,EAAE,MAAe;MACxBC,KAAK,EAAE,IAAI;MACXC,MAAM,EAAE,GAAG;MACXC,KAAK,EAAE,CACL;QACEC,MAAM,EAAE,KAAc;QACtBC,GAAG,EAAE;MACP,C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AAO;MACbM,GAAG,EAAE,CAAC;MACNC,GAAG,EAAE,GAAG;MACRC,IAAI,EAAE;IACR,CAAC;IACDX,YAAY,EAAE,EAAE;IAChBC,WAAW,EACT,sEAAsE;IACxEC,KAAK,EAAE;MACLC,IAAI,EAAE;QACJC,OAAO,EAAE;MACX;IACF;EACF,CAAC;EACDQ,WAAW,EAAE;IACXd,OAAO,EAAE;MACPK,IAAI,EAAE,OAAO;MACbM,GAAG,EAAE,CAAC;MACNC,GAAG,EAAE,GAAG;MACRC,IAAI,EAAE;IACR,CAAC;IACDX,YAAY,EAAE,EAAE;IAChBC,WAAW,EACT,oEAAoE;IACtEC,KAAK,EAAE;MACLC,IAAI,EAAE;QACJC,OAAO,EAAE;MACX;IACF;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/test-types.d.ts"],"sourcesContent":["/// <reference types=\"@wix/jest-yoshi-preset/types\" />\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/types.ts"],"sourcesContent":["import { ImageMedia } from '@wix/image';\n\nexport type VideoSource = {\n quality: '1080p' | '720p' | '480p' | '360p';\n width: number;\n height: number;\n types: {\n format: 'mp4' | 'mp4-luminance';\n uri: string;\n }[];\n};\n\nexport type AdaptiveVideoSource = {\n format: 'hls' | 'dash';\n uri: string;\n};\n\nexport type VideoMedia = {\n uri: string;\n poster?: ImageMedia;\n name?: string;\n sources?: VideoSource[];\n adaptiveSources?: AdaptiveVideoSource[];\n hasAudio?: boolean;\n fps?: number;\n duration?: number;\n};\n\nexport type QualityPolicy = 'adaptive' | 'highest' | 'proportional';\n\nexport type VideoProps = {\n id: string;\n videoMedia: VideoMedia;\n qualityPolicy: QualityPolicy;\n loop: boolean;\n muted: boolean;\n autoplay: boolean;\n motionPart?: string;\n playbackRate?: number;\n posterEffect?: 'fade';\n videoRef: React.RefObject<HTMLVideoElement>;\n focalPoint?: { x: number; y: number };\n onError?: (error: Error) => void;\n};\n\nexport type VideoData = Omit<VideoProps, 'videoRef' | 'id' | 'onError'>;\n\nexport type Timeout = ReturnType<typeof setTimeout>;\n\nexport type EnvConsts = {\n experiments?: Record<string, string | boolean>;\n};\n\nexport type CustomElementServices = {\n isExperimentOpen?: (experiment: string) => boolean;\n mutationService?: any;\n};\n\nexport type WowVideoServices = CustomElementServices & {\n resizeService?: ResizeObserver;\n intersectionService?: IntersectionObserver;\n};\n\nexport type WowVideo = Element & {\n reLayout: () => void;\n observeResize: () => void;\n unobserveIntersect: () => void;\n};\n"],"mappings":"","ignoreList":[]}
|