This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { useEffect, useState, useRef, useCallback } from 'react';
|
||||
import { getWsUrl } from '../api';
|
||||
|
||||
interface ProctorStreamPanelsProps {
|
||||
studentId: number;
|
||||
@@ -30,8 +31,7 @@ export const ProctorStreamPanels: React.FC<ProctorStreamPanelsProps> = ({
|
||||
const webcamZoom = ZOOM_STEPS[webcamZoomIdx];
|
||||
|
||||
useEffect(() => {
|
||||
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
||||
const wsUrl = `${protocol}//${window.location.hostname}:8080/ws?role=teacher`;
|
||||
const wsUrl = getWsUrl('/ws?role=teacher');
|
||||
|
||||
intentionalClose.current = false;
|
||||
hasOpened.current = false;
|
||||
|
||||
Reference in New Issue
Block a user