obs-websocket-js
Advanced tools
Comparing version 0.3.3 to 0.4.0
@@ -0,1 +1,17 @@ | ||
# 0.4.0 | ||
- Rewrite. | ||
- Implement Promises and Event Emitter. | ||
- Events are now emit using `on('EventName', callback)` | ||
- Events can also be referenced `onEventName(callback)` | ||
- Requests now use the syntax `send('RequestName', {args}, callback) returns Promise` | ||
- Requests can also be referenced `EventName({args}, callback) returns Promise` | ||
- In both cases `callback(err, data)` | ||
- Stop trying to marshal the response data. | ||
- Aside from CamelCasing all the response data, no other actions are taken on the response at the moment. | ||
- No marshaling is done on the request objects at the moment. | ||
- Note that some method names have changed. Please reference [obs-websocket](https://github.com/Palakis/obs-websocket) for the API. | ||
# 0.3.3 | ||
- Fix NPM Registration | ||
# 0.3.0 | ||
@@ -2,0 +18,0 @@ - Add .disconnect |
{ | ||
"name": "obs-websocket-js", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "OBS Websocket API in Javascript", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/haganbmj/obs-websocket-js.git" | ||
}, | ||
"main": "lib/index.js", | ||
"repository": "haganbmj/obs-websocket-js", | ||
"repoUrl": "https://github.com/haganbmj/obs-websocket-js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"grunt": "grunt", | ||
"build": "grunt" | ||
"build": "grunt", | ||
"watch": "grunt watch" | ||
}, | ||
@@ -22,12 +21,7 @@ "keywords": [ | ||
], | ||
"files": [ | ||
"README.md", | ||
"index.js", | ||
"dist/*", | ||
"obs-websocket.js", | ||
"DOCUMENTATION.md" | ||
], | ||
"author": "Brendan Hagan (haganbmj)", | ||
"license": "MIT", | ||
"dependencies": { | ||
"loglevel": "^1.4.1", | ||
"sha.js": "^2.4.8", | ||
"ws": "^1.1.1" | ||
@@ -37,10 +31,15 @@ }, | ||
"grunt": "^1.0.1", | ||
"grunt-anonymous": "^0.1.2", | ||
"grunt-contrib-clean": "^1.0.0", | ||
"grunt-contrib-concat": "^1.0.1", | ||
"grunt-contrib-jshint": "^1.0.0", | ||
"grunt-contrib-watch": "^1.0.0", | ||
"grunt-jsdoc-to-markdown": "^2.0.0", | ||
"load-grunt-tasks": "^3.5.2" | ||
} | ||
"grunt-webpack": "^2.0.1", | ||
"load-grunt-tasks": "^3.5.2", | ||
"webpack": "^2.2.1" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/haganbmj/obs-websocket-js/issues" | ||
}, | ||
"homepage": "https://github.com/haganbmj/obs-websocket-js#readme", | ||
"sha": "local build", | ||
"timestamp": "local build" | ||
} |
# obs-websocket-js | ||
[![Build Status](https://travis-ci.org/haganbmj/obs-websocket-js.svg?branch=master)](https://travis-ci.org/haganbmj/obs-websocket-js) | ||
*OBSWebSocket.JS allows Javascript-based connections to [obs-websocket](https://github.com/Palakis/obs-websocket).* | ||
OBSWebSocket.JS allows Javascript-based connections to [obs-websocket](https://github.com/Palakis/obs-websocket). | ||
Based heavily on [obs-remote](https://github.com/nodecg/obs-remote-js), which is built for the older, obs-classic compatible plugin. | ||
[![Build Status][badge-build-status]](https://travis-ci.org/haganbmj/obs-websocket-js) [![Latest release][badge-release]][Releases] [![Latest Tag][badge-tag]][Tags] | ||
# [API Documentation](https://github.com/haganbmj/obs-websocket-js/blob/gh-pages/DOCUMENTATION.md) | ||
# [Distributable](https://haganbmj.github.io/obs-websocket-js/obs-websocket.js) | ||
###### [Download](https://haganbmj.github.io/obs-websocket-js/dist/obs-websocket.js) | ~~[Documentation](https://github.com/haganbmj/obs-websocket-js/blob/gh-pages/dist/DOCUMENTATION.md)~~ | ~~[Examples](https://github.com/haganbmj/obs-websocket-js/blob/gh-pages/samples)~~ | ||
## Usage | ||
## In Development | ||
In the middle of a rewrite. | ||
TODOs include... | ||
- Travis auto deployments of pre-release and release versions, generation of documentation to gh-pages. | ||
- Clean up method/event binding. | ||
- Organize API versioning more efficiently to better allow backwards compatibility. | ||
- Generate documentation based on API versioning. | ||
- Unit testing / Socket mocking. | ||
### Plain Javascript | ||
Include the distributable file in the header of your HTML. | ||
```html | ||
<script type='text/javascript' src='dist/obs-websocket.js'></script> | ||
``` | ||
If you can help with any of this please do. | ||
Then make use of it. | ||
```html | ||
<script> | ||
var ws = new OBSWebSocket(); | ||
// Bind some listeners by assigning functions, with params if applicable. | ||
ws.onConnectionOpened = function() { | ||
console.log('Connection Opened'); | ||
// Send some requests by calling existing functions and passing callbacks. | ||
ws.getCurrentScene(function(err, data) { | ||
console.log(err, data); | ||
}); | ||
}; | ||
// Open the connection and Authenticate if needed. URL defaults to localhost:4444 | ||
ws.connect(); // ws.connect('url', 'password'); | ||
</script> | ||
``` | ||
### NodeJS | ||
```sh | ||
npm install obs-websocket-js --save | ||
``` | ||
Add the library to your application. | ||
```js | ||
var OBSWebSocket = require('obs-websocket-js'); | ||
var obsWS = new OBSWebSocket(); | ||
obsWS.connect('url', 'password'); | ||
``` | ||
# Contributing | ||
## Contributing | ||
- Install [node.js](http://nodejs.org). | ||
@@ -63,8 +30,16 @@ - Clone the repo. | ||
``` | ||
- Run grunt watch using the following. This will only update the distribution js file, not the markdown. | ||
- Run grunt watch using the following. Note that this will only update the distribution js file, not the markdown. | ||
```sh | ||
npm run grunt watch | ||
npm run watch | ||
``` | ||
## Formatting Guidelines | ||
#### Formatting Guidelines | ||
- 2 spaces rather than tabs. | ||
[Releases]: https://github.com/haganbmj/obs-websocket-js/releases "obs-websocket-js Releases" | ||
[Tags]: https://github.com/haganbmj/obs-websocket-js/tags "obs-websocket-js Tags" | ||
[badge-build-status]: https://img.shields.io/travis/haganbmj/obs-websocket-js/master.svg?style=flat "Travis Status" | ||
[badge-tag]: https://img.shields.io/github/tag/haganbmj/obs-websocket-js.svg?style=flat "Latest Tag" | ||
[badge-release]: https://img.shields.io/github/release/haganbmj/obs-websocket-js.svg?style=flat "Latest Release" |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
154227
7
17
4427
0
2
3
45
1
+ Addedloglevel@^1.4.1
+ Addedsha.js@^2.4.8
+ Addedinherits@2.0.4(transitive)
+ Addedloglevel@1.9.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsha.js@2.4.11(transitive)