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

103
Views
Silenciar/activar video iframe de otro dominio

Implementé un iframe dentro de mi página web, el iframe apunta a otro dominio para capturar el contenido del video.

Nada elegante dentro de mi página web, el iframe también es estándar:

 <iframe id='frame' src='domain.com/stream/324/index.m3u8' width='100%' allow='autoplay; encrypted media' frameborder='0' allowfullscreen></iframe>

Me gustaría agregar botones fuera del iframe para silenciar o reactivar el video , a pesar de la presencia de los controladores del reproductor.

¿Cómo puedo conseguir esto?

almost 4 years ago · Santiago Trujillo
1 answers
Answer question

0

No use la etiqueta <iframe> para videos. En su lugar, utilice la etiqueta HTML5<video> . Con una etiqueta <video> puede establecer el atributo muted . Puedes reescribir tu <iframe> así:

 <video id="video" controls width="100%" src="domain.com/stream/324/index.m3u8"></video>

Luego puede crear un botón y agregar un detector de eventos para silenciar y reactivar la etiqueta <video> . Como esto:

 <button onclick="document.getElementById('video').muted = true">Mute</button>
<button onclick="document.getElementById('video').muted = false">Unmute</button>
almost 4 years ago · Santiago Trujillo 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!