Skip to content
Snippets Groups Projects
Unverified Commit 100840c0 authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix video player offering to expand in a lightbox when it's in an iframe (#25067)

parent 9017df71
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,13 @@ export default class MediaContainer extends PureComponent {
render () {
const { locale, components } = this.props;
let handleOpenVideo;
// Don't offer to expand the video in a lightbox if we're in a frame
if (window.self === window.top) {
handleOpenVideo = this.handleOpenVideo;
}
return (
<IntlProvider locale={locale} messages={messages}>
<>
......@@ -89,7 +96,7 @@ export default class MediaContainer extends PureComponent {
...(componentName === 'Video' ? {
componentIndex: i,
onOpenVideo: this.handleOpenVideo,
onOpenVideo: handleOpenVideo,
} : {
onOpenMedia: this.handleOpenMedia,
}),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment