fix(ui) - player init
This commit is contained in:
parent
5ff8fc6960
commit
47774191b1
4 changed files with 5 additions and 6 deletions
|
|
@ -29,14 +29,14 @@ function ChatControls({ stream, endCall, videoEnabled, setVideoEnabled } : Props
|
|||
<div className={cn(stl.controls, "flex items-center w-full justify-start bottom-0 px-2")}>
|
||||
<div className="flex items-center">
|
||||
<div className={cn(stl.btnWrapper, { [stl.disabled]: audioEnabled})}>
|
||||
<Button varient="text" onClick={toggleAudio} hover>
|
||||
<Button variant="text" onClick={toggleAudio} hover>
|
||||
<Icon name={audioEnabled ? 'mic' : 'mic-mute'} size="16" />
|
||||
<span className={cn("ml-1 color-gray-medium text-sm", { 'color-red' : audioEnabled })}>{audioEnabled ? 'Mute' : 'Unmute'}</span>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className={cn(stl.btnWrapper, { [stl.disabled]: videoEnabled})}>
|
||||
<Button varient="text" onClick={toggleVideo} hover>
|
||||
<Button variant="text" onClick={toggleVideo} hover>
|
||||
<Icon name={ videoEnabled ? 'camera-video' : 'camera-video-off' } size="16" />
|
||||
<span className={cn("ml-1 color-gray-medium text-sm", { 'color-red' : videoEnabled })}>{videoEnabled ? 'Stop Video' : 'Start Video'}</span>
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//@ts-nocheck
|
||||
import React, { useState, FC, useEffect } from 'react'
|
||||
import VideoContainer from '../components/VideoContainer'
|
||||
import { Icon, Popup, Button } from 'UI'
|
||||
import cn from 'classnames'
|
||||
import Counter from 'App/components/shared/SessionItem/Counter'
|
||||
import stl from './chatWindow.module.css'
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const InitLoader = connectPlayer(state => ({
|
|||
function LivePlayer ({ session, toggleFullscreen, closeBottomBlock, fullscreen, jwt, loadingCredentials, assistCredendials, request, isEnterprise, hasErrors }) {
|
||||
useEffect(() => {
|
||||
if (!loadingCredentials) {
|
||||
initPlayer(session, jwt, assistCredendials, true);
|
||||
initPlayer(session, assistCredendials, true);
|
||||
}
|
||||
return () => cleanPlayer()
|
||||
}, [ session.sessionId, loadingCredentials, assistCredendials ]);
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ document.addEventListener("visibilitychange", function() {
|
|||
}
|
||||
});
|
||||
|
||||
export function init(session, jwt, config, live = false) {
|
||||
export function init(session, config, live = false) {
|
||||
// const live = session.live;
|
||||
const endTime = !live && session.duration.valueOf();
|
||||
|
||||
instance = new Player(session, jwt, config, live);
|
||||
instance = new Player(session, config, live);
|
||||
update({
|
||||
initialized: true,
|
||||
live,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue