inital commit, basic functionality and streaming with server working
This commit is contained in:
7
preload.js
Normal file
7
preload.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const { contextBridge } = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('api', {
|
||||
getMovies: () => fetch('http://localhost:8000/movies').then(r => r.json()),
|
||||
getMovieDetails: (id) => fetch(`http://localhost:8000/movies/${id}`).then(r => r.json()),
|
||||
getStreamUrl: (id) => `http://localhost:8000/stream/${id}`
|
||||
});
|
||||
Reference in New Issue
Block a user