Skip to content

Commit 997e1b4

Browse files
committed
fix ws 8.x support
1 parent c764e32 commit 997e1b4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ Of course I'm also very glad about issues and pull requests if you find a bug /
173173
Placeholder for next versions (this needs to be indented):
174174
### __WORK IN PROGRESS__
175175
-->
176+
### __WORK IN PROGRESS__
177+
* fix support for ws 8.*
178+
176179
### 0.5.0 (2022-08-30)
177180
* add / repair support for multiple sockets.
178181

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class WebSocketClient extends EventEmitter.EventEmitter {
107107
connect() {
108108
let resolved = false;
109109
return new Promise((resolve, reject) => {
110-
this._device.socket = new WebSocket('https://' + this._device.ip + ':' + this._device.port + '/SwitchCamera', {
110+
this._device.socket = new WebSocket('wss://' + this._device.ip + ':' + this._device.port + '/SwitchCamera', {
111111
protocolVersion: 13,
112112
rejectUnauthorized: false,
113113
timeout: 5000

0 commit comments

Comments
 (0)