[Webkit-unassigned] [Bug 192849] getUserMedia() kills the existing streamtrack and returns a black screen.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 20 21:26:01 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=192849

--- Comment #9 from Ramya D <ramyaddurairaj at gmail.com> ---
I have received the stream using call.answer(window.localStream) without getUserMedia. Now I'm facing another problem of alpha transparency in canvas

Alpha transparency works in all browsers but not in safari and this how I'm removing the black screen and trying to make it as transparency.This one works in all browsers but not in safari.

function draw(img) {
        var buffer = document.createElement('canvas');
  var bufferctx = buffer.getContext('2d');
  bufferctx.drawImage(img, 0, 0);
  var imageData = bufferctx.getImageData(0,0,buffer.width,  buffer.height);
  var data = imageData.data;
  var removeBlack = function() {
    for (var i = 0; i < data.length; i += 4) {
      if(data[i]+ data[i + 1] + data[i + 2] < 10){ 
        data[i + 3] = 0; // alpha
       }
    }
    ctx.putImageData(imageData, 0, 0);
  };
  removeBlack();
}

Help will be greatly appreciated. @youennfablet

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181221/56ae3bec/attachment.html>


More information about the webkit-unassigned mailing list