Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

287
Visualizações
Uncaught DOMException: Failed to execute 'toBlob' on 'HTMLCanvasElement': Tainted canvases may not be exported

I am trying to capture the video Screenshot but it is not working on the Linkedln learning, when i add crossOrigin = "Anonymous" manually inside the video tag by inspecting then i am able to capture the screenshot, but when i write the code for the same purpose then it is not working, the error in the title is shown.

Code without adding the crossOrigin = "Anonymous" to the video tag.

    const title = "Screenshot";
    const player = document.getElementsByClassName("vjs-tech")[0];
    const canvas = document.createElement("canvas");
    canvas.width = player.videoWidth;
    canvas.height = player.videoHeight;
    canvas.getContext("2d").drawImage(player, 0, 0, canvas.width, canvas.height);
    
    const downloadElement = document.createElement("a");
    downloadElement.download = title;
  
    canvas.toBlob((blob) => {
        downloadElement.href = URL.createObjectURL(blob);
        downloadElement.click();
    }, "image/png");
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda