mirror of
https://github.com/ianramzy/decentralized-video-chat.git
synced 2025-02-23 00:15:04 +08:00
removed repositioning loop
- replaced it with simple delay to prevent 'buggy' behaviour on early drag
This commit is contained in:
parent
84f57bde97
commit
f1c22d2a6c
@ -310,16 +310,17 @@ var VideoChat = {
|
|||||||
VideoChat.connected = true;
|
VideoChat.connected = true;
|
||||||
// Hide caption status text
|
// Hide caption status text
|
||||||
captionText.fadeOut();
|
captionText.fadeOut();
|
||||||
// Reposition local video repeatedly, as there is often a delay
|
// Reposition local video after a second, as there is often a delay
|
||||||
// between adding a stream and the height of the video div changing
|
// between adding a stream and the height of the video div changing
|
||||||
var timesRun = 0;
|
setTimeout(() => rePositionLocalVideo(), 500);
|
||||||
var interval = setInterval(function () {
|
// var timesRun = 0;
|
||||||
timesRun += 1;
|
// var interval = setInterval(function () {
|
||||||
if (timesRun === 10) {
|
// timesRun += 1;
|
||||||
clearInterval(interval);
|
// if (timesRun === 10) {
|
||||||
}
|
// clearInterval(interval);
|
||||||
rePositionLocalVideo();
|
// }
|
||||||
}, 300);
|
// rePositionLocalVideo();
|
||||||
|
// }, 300);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -363,7 +364,7 @@ function rePositionLocalVideo() {
|
|||||||
navigator.userAgent
|
navigator.userAgent
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
bounds.top = $(window).height() * 0.75;
|
bounds.top = $(window).height() * 0.7;
|
||||||
bounds.left += 10;
|
bounds.left += 10;
|
||||||
} else {
|
} else {
|
||||||
bounds.top += 10;
|
bounds.top += 10;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user