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

162
Views
Tainted canvases may not be exported in android

I'm trying to use canvas to take a screenshot in the video(m3u8) that is playing and I get the following error, Error only on Android, ios and desktop web are ok.

Uncaught (in promise) DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.

this is my code

const canvas = document.createElement('canvas');
canvas.width = this.videoEl.videoWidth; // this.videoEl is video element
canvas.height = this.videoEl.videoHeight;
canvas.getContext('2d')?.drawImage(this.videoEl, 0, 0, canvas.width, canvas.height);
const imgData = canvas.toDataURL('image/jpeg', 1.0);
return imgData;

And I set crossOrigin = 'Anonymous' on video Element

What should I do?

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!