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

121
Visualizações
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
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