j-holub / Node-MPV

A NodeJs Module for MPV Player
https://www.npmjs.com/package/node-mpv
MIT License
116 stars 73 forks source link

embedding node-mpv #83

Closed jdauthre closed 3 years ago

jdauthre commented 3 years ago

Not exactly an issue, more can it be done. Is it possible to embed the player window within the application eg rendering to an html canvas etc. I am using nwjs. Thanks

j-holub commented 3 years ago

I don't think so. What this node module does, is simply starting the mpv binary on your machine and offering control through an *inter-process-communication socket. This means the mpv player is running on the local machine.

If you find some way to stream this over the web into a browser, that maybe yes. If you do, let me know, I'd love to integrate this into node-mpv directly.

jdauthre commented 3 years ago

Thanks I didn't think so, I think it is more likely to succeed using the libmpv library rather than the exec , there do seem to be a few attempts using it with react and electron, but I haven't yet managed to translate this for nwjs

AxelTerizaki commented 3 years ago

If you want to display it in a HTML window you can't via mpv and thus node-mpv.

You can bundle your app with a mpv binary though, but it'll open another window you won't have total control over

j-holub commented 3 years ago

I'll close this issue for now, since the answer seems to be no. Feel free to re-open it at any time you deem appropriate.