[mirotalk] - fix init video

This commit is contained in:
Miroslav Pejic
2023-07-27 09:22:11 +02:00
parent 4e10eaada1
commit e274f6d7ac
3 changed files with 22 additions and 8 deletions
+9
View File
@@ -115,6 +115,15 @@
# Video
--------------------------------------------------------------*/
.container {
position: relative;
}
.container video {
z-index: 0;
position: relative;
height: 240px;
}
.videoCircle {
position: absolute;
width: var(--vmi-wh);
+3
View File
@@ -1368,6 +1368,9 @@ async function changeInitCamera(deviceId) {
if (initStream) {
stopTracks(initStream);
initVideo.style.display = 'block';
if (!initVideo.classList.contains('mirror')) {
initVideo.classList.toggle('mirror');
}
}
// Get video constraints
let videoConstraints = await getVideoConstraints('default');
+10 -8
View File
@@ -76,14 +76,16 @@ access to use this app.
<div id="initUser" class="init-user hidden">
<!-- <p>Please allow the camera & microphone access to use this app.</p> -->
<video
id="initVideo"
playsinline="true"
autoplay=""
class="mirror"
poster="../images/loader.gif"
style="object-fit: var(--videoObjFit)"
></video>
<div class="container">
<video
id="initVideo"
playsinline="true"
autoplay=""
class="mirror"
poster="../images/loader.gif"
style="object-fit: var(--videoObjFit)"
></video>
</div>
<button id="initVideoBtn" class="fas fa-video" onclick="handleVideo(event, true)"></button>
<button id="initAudioBtn" class="fas fa-microphone" onclick="handleAudio(event, true)"></button>
<button id="initScreenShareBtn" class="fas fa-desktop"></button>