Skip to content

Commit

Permalink
Fixed VideoRoom local buttons not being clickable on Chrome in demos
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Apr 10, 2024
1 parent 3639a0e commit bbbdbc1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions html/demos/mvideoroom.js
Expand Up @@ -276,7 +276,7 @@ $(document).ready(function() {
toastr.warning("Our video stream has been rejected, viewers won't see us");
// Hide the webcam video
$('#myvideo').addClass('hide');
$('#videolocal').append(
$('#videolocal').prepend(
'<div class="no-video-container">' +
'<i class="fa-solid fa-video fa-xl no-video-icon" style="height: 100%;"></i>' +
'<span class="no-video-text" style="font-size: 16px;">Video rejected, no webcam</span>' +
Expand Down Expand Up @@ -308,7 +308,7 @@ $(document).ready(function() {
if(localVideos === 0) {
// No video, at least for now: show a placeholder
if($('#videolocal .no-video-container').length === 0) {
$('#videolocal').append(
$('#videolocal').prepend(
'<div class="no-video-container">' +
'<i class="fa-solid fa-video fa-xl no-video-icon"></i>' +
'<span class="no-video-text">No webcam available</span>' +
Expand Down Expand Up @@ -339,7 +339,7 @@ $(document).ready(function() {
if(localVideos === 0) {
// No video, at least for now: show a placeholder
if($('#videolocal .no-video-container').length === 0) {
$('#videolocal').append(
$('#videolocal').prepend(
'<div class="no-video-container">' +
'<i class="fa-solid fa-video fa-xl no-video-icon"></i>' +
'<span class="no-video-text">No webcam available</span>' +
Expand All @@ -355,7 +355,7 @@ $(document).ready(function() {
Janus.log("Created local stream:", stream);
Janus.log(stream.getTracks());
Janus.log(stream.getVideoTracks());
$('#videolocal').append('<video class="rounded centered" id="myvideo' + trackId + '" width=100% autoplay playsinline muted="muted"/>');
$('#videolocal').prepend('<video class="rounded centered" id="myvideo' + trackId + '" width=100% autoplay playsinline muted="muted"/>');
Janus.attachMediaStream($('#myvideo' + trackId).get(0), stream);
}
if(sfutest.webrtcStuff.pc.iceConnectionState !== "completed" &&
Expand Down
8 changes: 4 additions & 4 deletions html/demos/videoroom.js
Expand Up @@ -274,7 +274,7 @@ $(document).ready(function() {
toastr.warning("Our video stream has been rejected, viewers won't see us");
// Hide the webcam video
$('#myvideo').addClass('hide');
$('#videolocal').append(
$('#videolocal').prepend(
'<div class="no-video-container">' +
'<i class="fa-solid fa-video fa-xl no-video-icon" style="height: 100%;"></i>' +
'<span class="no-video-text" style="font-size: 16px;">Video rejected, no webcam</span>' +
Expand Down Expand Up @@ -305,7 +305,7 @@ $(document).ready(function() {
if(localVideos === 0) {
// No video, at least for now: show a placeholder
if($('#videolocal .no-video-container').length === 0) {
$('#videolocal').append(
$('#videolocal').prepend(
'<div class="no-video-container">' +
'<i class="fa-solid fa-video fa-xl no-video-icon"></i>' +
'<span class="no-video-text">No webcam available</span>' +
Expand Down Expand Up @@ -336,7 +336,7 @@ $(document).ready(function() {
if(localVideos === 0) {
// No video, at least for now: show a placeholder
if($('#videolocal .no-video-container').length === 0) {
$('#videolocal').append(
$('#videolocal').prepend(
'<div class="no-video-container">' +
'<i class="fa-solid fa-video fa-xl no-video-icon"></i>' +
'<span class="no-video-text">No webcam available</span>' +
Expand All @@ -352,7 +352,7 @@ $(document).ready(function() {
Janus.log("Created local stream:", stream);
Janus.log(stream.getTracks());
Janus.log(stream.getVideoTracks());
$('#videolocal').append('<video class="rounded centered" id="myvideo' + trackId + '" width=100% autoplay playsinline muted="muted"/>');
$('#videolocal').prepend('<video class="rounded centered" id="myvideo' + trackId + '" width=100% autoplay playsinline muted="muted"/>');
Janus.attachMediaStream($('#myvideo' + trackId).get(0), stream);
}
if(sfutest.webrtcStuff.pc.iceConnectionState !== "completed" &&
Expand Down

0 comments on commit bbbdbc1

Please sign in to comment.