diff --git a/src/components/ScrollyVideo/Debug.svelte b/src/components/ScrollyVideo/Debug.svelte new file mode 100644 index 00000000..9b66adfe --- /dev/null +++ b/src/components/ScrollyVideo/Debug.svelte @@ -0,0 +1,224 @@ + + + + +
+
+ + CONSOLE + +
+

Source:

+

{componentState.generalData.src}

+ +

Progress:

+
+

{componentState.generalData.videoPercentage}

+
+
+
+
+ +

Framerate:

+

{componentState.generalData.frameRate}

+ +

Current time:

+

+ {componentState.generalData.currentTime}/{componentState.generalData + .totalTime} +

+ + {#if componentState.usingWebCodecs} +

Codec:

+

+ {componentState.framesData.codec} +

+ + +

Current frame:

+

+ {componentState.framesData.currentFrame}/{componentState.framesData + .totalFrames} +

+ {/if} + +

Will Autoplay?:

+

+ {componentState.willAutoPlay} +

+ + {#if componentState.willAutoPlay} +

Autoplaying:

+

+ {componentState.isAutoPlaying} +

+

Autoplay progress:

+
+

{componentState.autoplayProgress}

+
+
+
+
+ {/if} +
+
+
+ + diff --git a/src/components/ScrollyVideo/ScrollyVideo.mdx b/src/components/ScrollyVideo/ScrollyVideo.mdx index d8f4e2d2..c482a3c6 100644 --- a/src/components/ScrollyVideo/ScrollyVideo.mdx +++ b/src/components/ScrollyVideo/ScrollyVideo.mdx @@ -432,6 +432,8 @@ Then add the following code to your App.svelte or the component where you want t startTime={parseFloat(caption.startTime)} endTime={parseFloat(caption.endTime)} text={caption.text} + backgroundColor="rgba(0, 0, 0, 0.8)" + position="bottom center" /> {/each} diff --git a/src/components/ScrollyVideo/ScrollyVideo.svelte b/src/components/ScrollyVideo/ScrollyVideo.svelte index a3ef40e3..20ebcfe6 100644 --- a/src/components/ScrollyVideo/ScrollyVideo.svelte +++ b/src/components/ScrollyVideo/ScrollyVideo.svelte @@ -1,7 +1,7 @@