Procházet zdrojové kódy

Fix WebSockets constructor with empty subprotocol

Dominic Szablewski před 8 roky
rodič
revize
67b64307d3
2 změnil soubory, kde provedl 4 přidání a 6 odebrání
  1. 2 4
      jsmpeg.min.js
  2. 2 2
      src/websocket.js

Diff nebyl zobrazen, protože je příliš veliký
+ 2 - 4
jsmpeg.min.js


+ 2 - 2
src/websocket.js Zobrazit soubor

@@ -34,8 +34,8 @@ WSSource.prototype.start = function() {
34 34
 	this.shouldAttemptReconnect = !!this.reconnectInterval;
35 35
 	this.progress = 0;
36 36
 	this.established = false;
37
-
38
-	this.socket = new WebSocket(this.url, this.options.protocols || '');
37
+	
38
+	this.socket = new WebSocket(this.url, this.options.protocols || null);
39 39
 	this.socket.binaryType = 'arraybuffer';
40 40
 	this.socket.onmessage = this.onMessage.bind(this);
41 41
 	this.socket.onopen = this.onOpen.bind(this);