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

122
Views
Showing iframe when youtube channel is live

I want to implement a system on my website, where a YouTube livestream is shown in an iframe, if the youtube channel is live (Permanent youtube live links can be created like this: https://www.youtube.com/embed/live_stream?channel= and will always display the livestream, if the channel is active, if not, it will show "Video not available")

Now, since the video not available screen looks oh so good, I want to hide it when the channel is not online and show another element on the website. However, since XSS attacks are a thing, I cannot just select the contents of the iframe and search for the "video not available" or the class of the span and disable the iframe if that element exists, so I have been looking for another solution, but have not found any that are applicable to this useacase.

I have tried with the YouTube API, however this yields no results, as it is only applicable to predetermined video ID's and not static livestreams.

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!