mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 11:32:47 +00:00
Fix bug with websocket protocol
This commit is contained in:
parent
93a8f428be
commit
429cb304a4
@ -8,7 +8,7 @@ export function createWebSocket<T>(
|
|||||||
): Observable<T> {
|
): Observable<T> {
|
||||||
return new Observable((observer) => {
|
return new Observable((observer) => {
|
||||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||||
const ws = new WebSocket(`${protocol}://${host}:${wsPort}/${endpoint}`);
|
const ws = new WebSocket(`${protocol}//${host}:${wsPort}/${endpoint}`);
|
||||||
ws.onmessage = (e) => {
|
ws.onmessage = (e) => {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.onload = () => {
|
reader.onload = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user