SmartTV application that allows you to play on TV video from your favorite browser. Used with PlayOnTV server.
Step 1: run local server at port 8080
with command:
npx github:htmlhero/playontv-server --port 8080
Step 2: send test video data with command:
curl -G 'http://localhost:8080/setVideo' --data-urlencode 'title=Big Buck Bunny' --data-urlencode 'url=http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'
Step 3: open application demo in browser. Take a look at the demo page, the video is playing!
The easiest way to start the server is run npx github:htmlhero/playontv-server --port 8080
on local/remote machine.
You can configure port as you need. After start, in the output you will see the server address, it will come in handy later.
Then you should build PlayOnTV application with configured server address. Follow this instruction. After that start the app.
Last step — send data to your server. There are several ways to do it. For example, data sending snippet can looks like one of this:
javascript:(() => {
const serverUrl = 'http://192.168.1.2:8080';
const videoUrl = prompt('Paste video URL');
const src = new URL(serverUrl);
src.pathname = 'setVideo';
src.searchParams.set('url', videoUrl);
new Image().src = src.href;
})();
curl -G 'http://192.168.1.2:8080/setVideo' --data-urlencode 'url=http://example.com/video.mp4'
You can choose your own way to send data using HTTP API.
If all previous steps done right, video should start to play on TV. Relax and enjoy it 🍿
You can add support for another SmartTV platforms from list.
Project licensed under MIT licence. Please read LICENSE file.