⚡️ Option to disable controls and autoplay on videos (#1631)
Extends the implementation of #1503 as per the suggestions provided in the code review to resolve #1485 https://github.com/baptisteArno/typebot.io/assets/69730155/87481d64-57f5-4f7e-8a28-4a464f12cc31 --------- Co-authored-by: Baptiste Arnaud <baptiste.arnaud95@gmail.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/js",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"description": "Javascript library to display typebots on your website",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
@ -77,9 +77,17 @@ export const VideoBubble = (props: Props) => {
|
||||
}
|
||||
>
|
||||
<video
|
||||
autoplay={props.onTransitionEnd ? false : true}
|
||||
autoplay={
|
||||
props.onTransitionEnd
|
||||
? props.content?.isAutoplayEnabled ??
|
||||
defaultVideoBubbleContent.isAutoplayEnabled
|
||||
: false
|
||||
}
|
||||
src={props.content?.url}
|
||||
controls
|
||||
controls={
|
||||
props.content?.areControlsDisplayed ??
|
||||
defaultVideoBubbleContent.areControlsDisplayed
|
||||
}
|
||||
class={
|
||||
'p-4 focus:outline-none w-full z-10 text-fade-in rounded-md ' +
|
||||
(isTyping() ? 'opacity-0' : 'opacity-100')
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/nextjs",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"description": "Convenient library to display typebots on your Next.js website",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@typebot.io/react",
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"description": "Convenient library to display typebots on your React app",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
Reference in New Issue
Block a user