Skip to content

Commit 383673b

Browse files
committed
feat: auto-pause the video + open in a new tab when interacting with cue point ctas
1 parent 611ceee commit 383673b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/components/bolt-video/plugins/cue-points.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getSubArray } from '../utils';
66

77
export const VideoOverlayContent = props => {
88
return (
9-
<bolt-button color="primary" url={props.url}>
9+
<bolt-button color="primary" url={props.url} target={props.target}>
1010
{props.text}
1111
</bolt-button>
1212
);
@@ -110,7 +110,12 @@ export function cuePointsPlugin(player, elem) {
110110
}
111111

112112
ReactDOM.render(
113-
<VideoOverlayContent url={ctaUrl} text={ctaText} />,
113+
<VideoOverlayContent
114+
url={ctaUrl}
115+
text={ctaText}
116+
onClick={elem.pause()}
117+
target="_blank"
118+
/>,
114119
elem.overlayElement,
115120
);
116121
}

0 commit comments

Comments
 (0)