Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express.js not receiving player requests #37

Open
criticalfault opened this issue Oct 10, 2018 · 0 comments
Open

Express.js not receiving player requests #37

criticalfault opened this issue Oct 10, 2018 · 0 comments

Comments

@criticalfault
Copy link

I will definitely not claim to understand how this all works, but here is a few ways i tried it.

I have two routes.

/server-video/:id
-> This one streams buffers to my HTML5 video player. This works really well for my Video Tag! So far everything besides the Chromecast aspect of this is fantastic! I thought i would have to send this buffer stream to the Chromecast.

and

/download-video/:id
-> This is a straight out download res.

router.get('/download-video/:id', function(req, res, next){
	var file = PATH +'/public/videos/test.mp4';
	console.log(file);
  	res.sendFile(file); // Set disposition and send it.res.download()
}); 

This works great when i just go to my browser and hit that URL. However, when i fire off this call.

var options = { title: movie_name, type: 'video/mp4' };

chromecasts.players[list['The Highway TV']].play("http://localhost:3000/video-play/"+req.params.id, options);
chromecasts.players[list['The Highway TV']].play("http://localhost:3000/download-video/"+req.params.id, options);

This causes my chromecast called "The Highway TV" (I made a mapping for the names to Indexes) flicker with the proper title...but i never actually receive a request of any type to my express instance. I was hoping to dig a bit more, but i can't seem to find anything which points to why that request wouldn't be making it through.

Any ideas? I am hoping to use this repo with my repo! So far, this is the best one i have found (It actually allowed me to see my chromecasts. So that was huge by itself!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant