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

301
Views
video.play() occurred unhandled rejection (notallowederror) on IOS

using peer.js for stream video on React APP

  addVideoStream(video: HTMLVideoElement, stream: MediaStream) {
    video.srcObject = stream

    video?.addEventListener('loadedmetadata', () => {
      video.play()
    })
    if (this.videoGrid) this.videoGrid.append(video)
  }

got this error at 'video.play()'

the request is not allowed by the user agent or the platform in the current context

already I allowed permission for Audio and video on IOS.

this code works well other platforms except IOS.

I have no idea.

If I deploy then I just get black screen on IOS.

how can I fix this?

thanks in advance

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

the problem was how video tag works in IOS with WebRTC.

used HTTPS environment(production) then add these attributes

if (isMobile && isSafari) {
      this.myVideo.playsInline = true
      this.myVideo.autoplay = true
    }

then it works.

about 4 years ago · Juan Pablo Isaza Report
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!