
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@triyanox/react-video
Advanced tools
@triyanox/react-video a unified customizable video playback experience across all browsers for reactThe @triyanox/react-video component is a highly customizable and easy-to-use React component for playing video content in your react applications inspired by apple tv video player. It offers extensive control over video playback and is fully compatible with TailwindCSS, allowing for seamless styling integration.
To install the component, use the following command:
pnpm add @triyanox/react-video
You can use the video component simply by importing Video from the package
import { Video } from "@triyanox/react-video";
export default function Page() {
return (
<Video
src="https://vjs.zencdn.net/v/oceans.mp4"
/>
)}
src: VideoSource: The source of the video. This can be either a string URL or an array of objects containing src, type, and label fields.
[
{ src: 'https://example.com/video.mp4', type: 'video/mp4', label: 'SD' },
{ src: 'https://example.com/video.mp4', type: 'video/mp4', label: 'HD' }
]
// or
'https://example.com/video.mp4'
poster?: string: URL of the video's poster image.
'https://example.com/poster.jpg'title?: string: Title of the video.
'Video title'subtitle?: string: Subtitle of the video.
'Video subtitle'Event Handlers:
onProgress?: (currentTime: number) => void: Called when the video progress changes.onDuration?: (duration: number) => void: Called when the video duration is available.onEnded?: () => void: Called when the video ends.onPlay?: () => void: Called when the video is played.onPause?: () => void: Called when the video is paused.onLoad?: () => void: Called when the video is loaded.onVolumeChange?: (volume: number) => void: Called when the volume changes.onPlaybackRateChange?: (playbackRate: number) => void: Called when the playback rate changes.Styling and Layout:
className?: string: Root CSS class for custom styling.classNames?: object: Object containing CSS classes for various elements (title, subtitle, wrappers, video, backdrop, sliders).Playback Control:
autoPlay?: boolean: If true, the video will start playing as soon as it is ready.loop?: boolean: If true, the video will loop continuously.showControls?: boolean: If true, video controls will be displayed.icons?: object: Custom icons for various video controls (play, pause, forward, etc.).Additional Options:
hideSliderThumb?: boolean: If true, hides the slider thumb.import React from 'react';
import { Video } from '@triyanox/react-video';
// Import custom icons (assuming these are available in your project)
import {
CustomPlayIcon,
CustomPauseIcon,
CustomForwardIcon,
CustomBackwardIcon,
CustomEnterPipIcon,
CustomExitPipIcon,
CustomVolumeIcon,
CustomFullScreenIcon,
CustomExitFullScreenIcon,
CustomLoadingIcon,
} from './YourIconPath';
const MyVideoComponent = () => {
const videoProps = {
src: [
{
src: 'https://example.com/video-sd.mp4',
type: 'video/mp4',
label: 'SD',
},
{
src: 'https://example.com/video-hd.mp4',
type: 'video/mp4',
label: 'HD',
},
],
poster: 'https://example.com/poster.jpg',
title: 'My Amazing Video',
subtitle: 'An insightful subtitle',
onProgress: currentTime => console.log(`Current Time: ${currentTime}`),
onDuration: duration => console.log(`Duration: ${duration}`),
onEnded: () => console.log('Video Ended'),
onPlay: () => console.log('Video Played'),
onPause: () => console.log('Video Paused'),
onLoad: () => console.log('Video Loaded'),
onVolumeChange: volume => console.log(`Volume: ${volume}`),
onPlaybackRateChange: rate => console.log(`Playback Rate: ${rate}`),
className: 'custom-video-class',
autoPlay: true,
loop: true,
showControls: true,
icons: {
play: CustomPlayIcon,
pause: CustomPauseIcon,
forwardBy10: CustomForwardIcon,
backBy10: CustomBackwardIcon,
enterPip: CustomEnterPipIcon,
exitPip: CustomExitPipIcon,
volume: CustomVolumeIcon,
fullScreen: CustomFullScreenIcon,
exitFullScreen: CustomExitFullScreenIcon,
loading: CustomLoadingIcon,
},
classNames: {
base: 'video-base-class',
title: 'video-title-class',
subtitle: 'video-subtitle-class',
topWrapper: 'top-wrapper-class',
centerWrapper: 'center-wrapper-class',
bottomWrapper: 'bottom-wrapper-class',
video: 'video-element-class',
backdrop: 'video-backdrop-class',
volumeSlider: {
root: 'volume-slider-root-class',
track: 'volume-slider-track-class',
thumb: 'volume-slider-thumb-class',
range: 'volume-slider-range-class',
},
playbackRateSlider: {
root: 'playback-rate-slider-root-class',
track: 'playback-rate-slider-track-class',
thumb: 'playback-rate-slider-thumb-class',
range: 'playback-rate-slider-range-class',
},
},
hideSliderThumb: false,
};
return <Video {...videoProps} />;
};
export default MyVideoComponent;
The video component is fully customizable using TailwindCSS. You can use the className and classNames props to apply your TailwindCSS classes for styling the video player as per your design requirements.
FAQs
A video component for react inspired by the ios video player
The npm package @triyanox/react-video receives a total of 23 weekly downloads. As such, @triyanox/react-video popularity was classified as not popular.
We found that @triyanox/react-video demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.