
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@glomex/integration-react
Advanced tools
@glomex/integration-react
exposes a React component and types to easily integrate the glomex player. In order to use this component, you need to have a glomex account. You can get one by following the instructions in the Getting Started section.
glomex operates Germany’s largest marketplace for premium video content. Our platform connects publishers, content creators, and advertisers, enabling the seamless distribution of high-quality video content across the web.
Our ecosystem is designed to create value for all participants:
// example: player.tsx
import { useEffect, useRef, type ComponentProps, type ComponentRef } from 'react';
import { Integration, IntegrationEvent } from '@glomex/integration-react';
const Player = (props: ComponentProps<typeof Integration>) => {
const integrationRef = useRef<ComponentRef<typeof Integration>>(null);
const handlePlay = () => {
integrationRef.current?.ready.then(() => integrationRef.current?.play());
};
const handleContentStart = () => {
console.log('content start', integrationRef.current?.content);
};
useEffect(() => {
integrationRef.current?.ready.then(() => {
// interact with the API after initial ready
if (!integrationRef.current) return;
// e.g. start at 20 seconds
integrationRef.current.currentTime = 20;
// integrationRef.current.volume = 0.1
// integrationRef.current.muted = true
// integrationRef.current.play();
});
// addEventListener is available immediately (without ready)
integrationRef.current?.addEventListener(
IntegrationEvent.CONTENT_START,
handleContentStart
);
return () => {
integrationRef.current?.removeEventListener(
IntegrationEvent.CONTENT_START,
handleContentStart
);
};
}, [integrationRef]);
return (
<div>
<Integration
ref={integrationRef}
{...props}
/>
<button type="button" onClick={handlePlay}>
Play
</button>
</div>
);
};
export default Player;
Usage in your component:
// example: app.tsx
import Player from "./player"
export default async function MyApp(props) {
const params = await props.params
return (
<div>
<Player
integrationId="REPLACE_WITH_INTEGRATION_ID"
playlistId="REPLACE_WITH_PLAYLIST_ID"
/>
</div>
);
}
FAQs
React component to integrate the glomex player
We found that @glomex/integration-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.