Limit size of player in events view (#3288)

* Set max width

* Set data-options so videojs accepts size changing

* Add comment to explain exmpty data-setup value

* Clarify comment
This commit is contained in:
Nicolas Mowen 2022-06-02 06:06:39 -06:00 committed by GitHub
parent bc078fcc88
commit da637d3c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -93,7 +93,8 @@ export default function VideoPlayer({ children, options, seekOptions = {}, onRea
return (
<div data-vjs-player>
<video ref={playerRef} className="small-player video-js vjs-default-skin" controls playsinline />
{/* Setting an empty data-setup is required to override the default values and allow video to be fit the size of its parent */}
<video ref={playerRef} className="small-player video-js vjs-default-skin" data-setup="{}" controls playsinline />
{children}
</div>
);

View File

@ -494,7 +494,7 @@ export default function Events({ path, ...props }) {
</div>
{viewEvent !== event.id ? null : (
<div className="space-y-4">
<div className="mx-auto">
<div className="mx-auto max-w-7xl">
{event.has_clip ? (
<>
<Heading size="lg">Clip</Heading>