mirax-player
Advanced tools
Comparing version 1.0.0-beta.3 to 1.0.0-beta.4
{ | ||
"name": "mirax-player", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.4", | ||
"description": "A simple video player for react (beta release)", | ||
@@ -13,2 +13,3 @@ "main": "index.js", | ||
"web application", | ||
"react", | ||
"HTML5" | ||
@@ -15,0 +16,0 @@ ], |
@@ -8,2 +8,3 @@ # Mirax Player | ||
- [Usage](#usage) | ||
- [Features](#features) | ||
- [License](#license) | ||
@@ -19,18 +20,36 @@ | ||
```bash | ||
npm install mirax-player | ||
``` | ||
## How to use | ||
You can apply it in react app | ||
in your app.js or main.js or jsx extension | ||
------------ | ||
example : location of video file public/clip.mp4 | ||
----------------- | ||
------------ | ||
## Usage | ||
In you React, app.js or main.js / jsx extension | ||
```css | ||
add: | ||
import 'mirax-player/mirax.css'; | ||
--------- | ||
in your component file | ||
ex. VideoComponent.jsx | ||
------------ | ||
``` | ||
Then use the attach from Mirax Player: | ||
```js | ||
import React, { useEffect, useState } from 'react'; | ||
import Mirax, { attach } from 'mirax-player'; | ||
const VideoPlayerComponent = () => { | ||
const ExampleComponent = () => { | ||
const [isPlaying, setIsPlaying] = useState(false); | ||
@@ -40,7 +59,5 @@ | ||
const videoElement = attach('.whatever'); | ||
// you can declare any variable here starts with . point | ||
// you can declare any variable here starts with . (point known as class selector) | ||
// find className="whatever" src="clip.mp4" | ||
const options = { | ||
@@ -107,6 +124,6 @@ playPauseBtn: '.play-pause-btn', | ||
export default VideoPlayerComponent; | ||
export default ExampleComponent; | ||
``` | ||
## Features | ||
@@ -120,3 +137,5 @@ | ||
---------------------------------------------------- | ||
## License | ||
MIT | ||
@@ -123,0 +142,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140
12756