UNPKG

2.82 kBMarkdownView Raw
1node-applest-atem
2========
3A module to control Blackmagic Design ATEM Switchers.
4
5Installation
6--------
7Install this module using npm.
8*Note: this module name is `applest-atem`*
9```sh
10$ npm install applest-atem --save
11```
12
13Usage
14--------
15```javascript
16var ATEM = require('applest-atem');
17
18var atem = new ATEM();
19atem.connect('192.168.1.220'); // Replace your ATEM switcher. address.
20
21atem.changeProgramInput(1);
22atem.changePreviewInput(2);
23atem.autoTransition();
24
25atem.on('commandReceive', function(err, state) {
26 console.log(state); // catch the ATEM state.
27});
28console.log(atem.state); // or use this.
29```
30
31Demo
32--------
33See atem-web-controller.
34
35Debug
36--------
37Set `ATEM_DEBUG=true` environment variable, you can see raw packet.
38```sh
39$ ATEM_DEBUG=true coffee debug.coffee
40SEND <Buffer 10 14 53 ab 00 00 00 00 00 3a 00 00 01 00 00 00 00 00 00 00>
41SEND <Buffer 80 0c 53 ab 00 00 00 00 00 03 00 00>
42SEND <Buffer 80 0c 53 ab 00 00 00 00 00 03 00 00>
43SEND <Buffer 80 0c 80 0f 00 01 00 00 00 41 00 00>
44RECV _ver(12) <Buffer 00 0c 90 60 5f 76 65 72 00 02 00 10>...
45```
46
47Test
48--------
49This module run tests by mocha.
50You can run the test only if you have ATEM switchers.
51```sh
52$ cake test
53```
54
55Use `ATEM_ADDR` or `ATEM_PORT` environment variables if you want to use specific ip address or port.
56```sh
57$ ATEM_ADDR=192.168.1.220 ATEM_PORT=9910 cake test
58```
59
60### Example
61![](docs/atem-test.gif)
62
63Contributing
64--------
651. Fork it ( https://github.com/miyukki/applest-atem )
662. Create your feature branch (`git checkout -b my-new-feature`)
673. Add your feature and write a test
684. Commit your changes (`git commit -am 'Add some feature'`)
695. Push to the branch (`git push origin my-new-feature`)
706. Create new Pull Request
71
72License
73--------
74The MIT License (MIT)
75
76Copyright (c) 2015 Yusei Yamanaka (miyukki)
77
78Permission is hereby granted, free of charge, to any person obtaining a copy
79of this software and associated documentation files (the "Software"), to deal
80in the Software without restriction, including without limitation the rights
81to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
82copies of the Software, and to permit persons to whom the Software is
83furnished to do so, subject to the following conditions:
84
85The above copyright notice and this permission notice shall be included in
86all copies or substantial portions of the Software.
87
88THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
91AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
92LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
93OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
94THE SOFTWARE.