![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@wistia/wistia-player-react
Advanced tools
An embeddable wistia-player web component and React wrapper to add responsive, lightweight, and SEO-friendly videos to your site.
Wistia's React Wrapper of the <wistia-player/>
web component. Used to add responsive, lightweight, and SEO-friendly videos to your site.
For more usage information, check out our Wistia Player React Component documentation.
npm install @wistia/wistia-player-react
The only required prop is mediaId
, the ID of the media that will be embedded.
import { WistiaPlayer } from '@wistia/wistia-player-react';
<WistiaPlayer mediaId="abc123" />;
The <WistiaPlayer>
component takes the same options (as React props) which one can set on the <wistia-player>
web component. There is a list at the Embed options support page. The only difference here is that numbers, booleans, etc are expected to be JS values of those types rather than strings. Event callbacks can also be added, formatted in a way which is familiar React development (e.g. the play
event would become onPlay
).
import { WistiaPlayer } from '@wistia/wistia-player-react';
<WistiaPlayer
mediaId="abc123"
playerColor="1e64f0"
onPlay={() => console.log('Wistia video is playing!')}
/>;
The player will automatically load in a lightweight placeholder "swatch" image as soon as possible. However, in certain cases (such as server-side rendering) there can still be a slight layout shift while we wait for that placeholder. In order to avoid shift completely, you can explicitly set the aspect
of your video:
import { WistiaPlayer } from '@wistia/wistia-player-react';
<WistiaPlayer mediaId="abc123" aspect={16 / 9} />;
The player is responsive by default. If a fixed-size player is better for your use-case, you can pass in width
and height
values instead:
import { WistiaPlayer } from '@wistia/wistia-player-react';
<WistiaPlayer
mediaId="abc123"
style={{
width: '640px',
height: '360px',
}}
/>;
Wistia’s “popovers” are video embeds that open in modal overlays when a target element is clicked. For these embeds, there is an explicit, required wistiaPopover
prop (true
/false
) as well as an optional popoverContent
prop. If left undefined, the default popoverContent
value is thumbnail
. For popovers with popoverContent="link
, the <WistiaPlayer>
component expects to have children.
import { WistiaPlayer } from '@wistia/wistia-player-react';
<WistiaPlayer mediaId="abc123" wistiaPopover={true} popoverContent="link">
<span>Popover Link</span>
</WistiaPlayer>;
FAQs
An embeddable wistia-player web component and React wrapper to add responsive, lightweight, and SEO-friendly videos to your site.
We found that @wistia/wistia-player-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.