Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!