diff --git a/app/client/src/mockResponses/PropertyPaneConfigResponse.tsx b/app/client/src/mockResponses/PropertyPaneConfigResponse.tsx index b35cf50016..370de07d40 100644 --- a/app/client/src/mockResponses/PropertyPaneConfigResponse.tsx +++ b/app/client/src/mockResponses/PropertyPaneConfigResponse.tsx @@ -127,7 +127,7 @@ const PropertyPaneConfigResponse: PropertyPaneConfigsResponse["data"] = { { id: "17.1.1", propertyName: "url", - label: "Url", + label: "URL", controlType: "INPUT_TEXT", placeholderText: "Enter url", inputType: "TEXT", @@ -135,7 +135,7 @@ const PropertyPaneConfigResponse: PropertyPaneConfigsResponse["data"] = { { id: "17.1.1", propertyName: "autoPlay", - label: "autoPlay", + label: "Auto Play", helpText: "Video will be automatically played", controlType: "SWITCH", isJSConvertible: true, @@ -154,22 +154,6 @@ const PropertyPaneConfigResponse: PropertyPaneConfigsResponse["data"] = { id: "17.2", sectionName: "Actions", children: [ - { - id: "17.2.1", - helpText: "Triggers an action when the video starts playing", - propertyName: "onStart", - label: "onStart", - controlType: "ACTION_SELECTOR", - isJSConvertible: true, - }, - { - id: "17.2.2", - helpText: "Triggers an action when the video ends", - propertyName: "onEnd", - label: "onEnd", - controlType: "ACTION_SELECTOR", - isJSConvertible: true, - }, { id: "17.2.3", helpText: "Triggers an action when the video is played", @@ -186,6 +170,14 @@ const PropertyPaneConfigResponse: PropertyPaneConfigsResponse["data"] = { controlType: "ACTION_SELECTOR", isJSConvertible: true, }, + { + id: "17.2.5", + helpText: "Triggers an action when the video ends", + propertyName: "onEnd", + label: "onEnd", + controlType: "ACTION_SELECTOR", + isJSConvertible: true, + }, ], }, ], diff --git a/app/client/src/widgets/VideoWidget.tsx b/app/client/src/widgets/VideoWidget.tsx index ec3b8aebea..404956d4d5 100644 --- a/app/client/src/widgets/VideoWidget.tsx +++ b/app/client/src/widgets/VideoWidget.tsx @@ -47,7 +47,6 @@ class VideoWidget extends BaseWidget { static getTriggerPropertyMap(): TriggerPropertiesMap { return { - onStart: true, onEnd: true, onPlay: true, onPause: true, @@ -59,7 +58,7 @@ class VideoWidget extends BaseWidget { } getPageView() { - const { url, autoPlay, onStart, onEnd, onPause, onPlay } = this.props; + const { url, autoPlay, onEnd, onPause, onPlay } = this.props; return ( }> { url={url} autoplay={autoPlay} controls={true} - onStart={() => { - this.updateWidgetMetaProperty("playState", PlayState.PLAYING); - if (onStart) { - super.executeAction({ - dynamicString: onStart, - event: { - type: EventType.ON_VIDEO_START, - }, - }); - } - }} onPlay={() => { this.updateWidgetMetaProperty("playState", PlayState.PLAYING); if (onPlay) { @@ -125,7 +113,6 @@ class VideoWidget extends BaseWidget { export interface VideoWidgetProps extends WidgetProps { url: string; autoPlay: boolean; - onStart?: string; onPause?: string; onPlay?: string; onEnd?: string;