Revert "[mirotalksfu] - fix & improvements"

This reverts commit 3021c06630.
هذا الالتزام موجود في:
Miroslav Pejic
2022-04-15 23:18:34 +02:00
الأصل 892d3e3384
التزام 401b06e10f

عرض الملف

@@ -817,8 +817,8 @@ class RoomClient {
this.videoMediaContainer.appendChild(d);
this.attachMediaStream(elem, stream, type, 'Producer');
this.myVideoEl = elem;
this.handleFS(elem.id, fs.id, av.id);
this.handleTS(elem.id, ts.id, av.id);
this.handleFS(elem.id, fs.id);
this.handleTS(elem.id, ts.id);
this.popupPeerInfo(p.id, this.peer_info);
this.checkPeerInfoStatus(this.peer_info);
this.sound('joined');
@@ -1046,8 +1046,8 @@ class RoomClient {
d.appendChild(vb);
this.videoMediaContainer.appendChild(d);
this.attachMediaStream(elem, stream, type, 'Consumer');
this.handleFS(elem.id, fs.id, av.id);
this.handleTS(elem.id, ts.id, av.id);
this.handleFS(elem.id, fs.id);
this.handleTS(elem.id, ts.id);
this.popupPeerInfo(p.id, peer_info);
this.checkPeerInfoStatus(peer_info);
this.sound('joined');
@@ -1463,25 +1463,17 @@ class RoomClient {
if (elem == null) this.isVideoOnFullScreen = document.fullscreenEnabled;
}
handleFS(elemId, fsId, avatarId) {
handleFS(elemId, fsId) {
let videoPlayer = this.getId(elemId);
let btnFs = this.getId(fsId);
this.setTippy(fsId, 'Full screen', 'top');
btnFs.addEventListener('click', () => {
if (!this.isHidden(avatarId)) {
this.userLog('info', 'Full screen mode work when video is on', 'top-end');
return;
}
videoPlayer.style.pointerEvents = this.isVideoOnFullScreen ? 'auto' : 'none';
this.toggleFullScreen(videoPlayer);
this.isVideoOnFullScreen = this.isVideoOnFullScreen ? false : true;
});
videoPlayer.addEventListener('click', () => {
if (!this.isHidden(avatarId)) {
this.userLog('info', 'Full screen mode work when video is on', 'top-end');
return;
}
if ((this.isMobileDevice && this.isVideoOnFullScreen) || !this.isMobileDevice) {
videoPlayer.style.pointerEvents = this.isVideoOnFullScreen ? 'auto' : 'none';
this.toggleFullScreen(videoPlayer);
@@ -1506,14 +1498,10 @@ class RoomClient {
// TAKE SNAPSHOT
// ####################################################
handleTS(elemId, tsId, avatarId) {
handleTS(elemId, tsId) {
let videoPlayer = this.getId(elemId);
let btnTs = this.getId(tsId);
btnTs.addEventListener('click', () => {
if (!this.isHidden(avatarId)) {
this.userLog('info', 'SnapShot work when video is on', 'top-end');
return;
}
this.sound('snapshot');
let context, canvas, width, height, dataURL;
width = videoPlayer.videoWidth;