Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

281
Vistas
How to Chromecast a file (not a link) with javascript

I want to create a program that casts a file with subtitles using javascript

const ChromecastAPI = require('chromecast-api')

const client = new ChromecastAPI()

client.on('device', function (device) {
    if(device.friendlyName === "S70PCI" ){ 

      **//this one works**
      var mediaURL = "http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4"
      **//this one doesn't work**
      var mediaURL = "file:///E:/Download/Movies/Curb.Your.Enthusiasm.S11E02.1080p.WEB.H264-GGWP[TGx]/curb.your.enthusiasm.s11e02.1080p.web.h264-ggwp.mp4"

      console.log("Playting the device:")
      device.play(mediaURL, function (err){
        if(!err) {
          console.log("Playing success")}
        else{
          console.log(err, "run into an error while trying to play ", device.friendlyName)}
      })
    }

})

When I play a link to the tv it works fine, but when I it using a file path I get an error:

[1] Error: Load failed

I guess it fails because it just tells the TV the enter the link and not actually stream it from the computer, and the file doesn't exist on the web...

Is there any way I could stream the file to a link/webpage or stream it directly from my computer?

thanks for helping!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda