mirror of
https://gitlab.com/openlp/web-remote.git
synced 2024-12-22 03:22:48 +00:00
Also support WebSocket SSL
This commit is contained in:
parent
c3437ad30b
commit
24684d032e
@ -7,7 +7,8 @@ export function createWebSocket<T>(
|
||||
endpoint = ''
|
||||
): Observable<T> {
|
||||
return new Observable((observer) => {
|
||||
const ws = new WebSocket(`ws://${host}:${wsPort}/${endpoint}`);
|
||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
const ws = new WebSocket(`${protocol}://${host}:${wsPort}/${endpoint}`);
|
||||
ws.onmessage = (e) => {
|
||||
const reader = new FileReader();
|
||||
reader.onload = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user