Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mirax-player

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mirax-player - npm Package Compare versions

Comparing version 1.0.0-beta.4 to 1.0.0-beta.5

4

package.json
{
"name": "mirax-player",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "A simple video player for react (beta release)",

@@ -16,4 +16,4 @@ "main": "index.js",

],
"author": "DSilver",
"author": "Demjhon Silver",
"license": "MIT"
}

@@ -54,8 +54,6 @@ # Mirax Player

const [isPlaying, setIsPlaying] = useState(false);
useEffect(() => {
const videoElement = attach('.whatever');
// you can declare any variable here starts with . (point known as class selector)
// you can declare any variable here starts with . (known as class selector)
// find className="whatever" src="clip.mp4"
const options = {

@@ -71,3 +69,2 @@ playPauseBtn: '.play-pause-btn',

const videoPlayer = new Mirax(videoElement, options);
// Listen for the "timeupdate" event to update time values

@@ -77,6 +74,3 @@ videoElement.addEventListener('timeupdate', () => {

});
return () => {
// Clean up any resources if needed
};
return () => {};
}, []);

@@ -86,8 +80,4 @@

setIsPlaying(prevIsPlaying => {
const video = attach('.whatever');
if (prevIsPlaying) {
video.pause();
} else {
video.play();
}
const video = attach('.whatever'); // Can edit class selector
if (prevIsPlaying) {video.pause();} else {video.play();}
return !prevIsPlaying;

@@ -99,19 +89,9 @@ });

<div className="video-player">
<video className="whatever" src="clip.mp4"></video>
<div className="controls">
<div className="volume-icon">
<div className="speaker"></div>
<div className="volume-icon"><div className="speaker"></div>
</div>
<button className="play-pause-btn" onClick={togglePlayPause}>
{isPlaying ? 'Pause' : 'Play'}
<button className="play-pause-btn" onClick={togglePlayPause}>{isPlaying ? 'Pause' : 'Play'}
</button>
<input
type="range"
className="volume-slider"
min="0"
max="1"
step="0.01"
defaultValue="1"
/>
<input type="range" className="volume-slider" min="0" max="1" step="0.01"defaultValue="1"/>
<progress className="progress-bar" min="0" max="100" value="0"></progress>

@@ -118,0 +98,0 @@ <div className="current-time"></div>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc