https://github.com/ehanlin/mediamonitor
This is a progress monitor for video or audio.
https://github.com/ehanlin/mediamonitor
Last synced: 5 months ago
JSON representation
This is a progress monitor for video or audio.
- Host: GitHub
- URL: https://github.com/ehanlin/mediamonitor
- Owner: eHanlin
- License: mit
- Created: 2014-09-18T10:32:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2021-05-25T05:42:00.000Z (about 5 years ago)
- Last Synced: 2025-02-15T01:25:49.412Z (over 1 year ago)
- Language: CoffeeScript
- Size: 301 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
mediaMonitor
===================================

This is a progress monitor for video or audio.
## Install
```bash
bower install media-monitor
```
## Install node modules
```bash
npm install media-monitor
```
## Support
* IE10
* chrome
* firefox
## Usage
```js
var opts = {
//default 100
scale:20,
listenCB:function( data ){
//do something...
}
};
mediaMonitor.detect( audio, opts );
```
## API
#### mediaMonitor.detect( element, opts ) : MediaMonitor
> Create and listen a monitor
#### MediaMonitor.destroy() : void
> Remove all events
### default listen callback
* post (ajax)
* get (ajax)
> example:
```js
var opts = {
listenCB:{
name:"post",
url:"/testse",
//other callbacks (optional)
otherCBs:[function(){console.log(arguments);}],
//default url (optional)
dataType:"json"
},
scale:scale
};
```
## DEMO
```bash
gulp server
```
## Build
```bash
gulp
```