-
Notifications
You must be signed in to change notification settings - Fork 102
Tried example, didnt work #34
Comments
@Meai1 Cannot, reproduce your issue. Can you give us a rundown on how to reproduce it? For now, I've merged a slightly cleaner version of the codebase, so try another pull request.
|
Not sure if related, but I keep getting |
I am experiencing the same issue when using the provided example and instructions. The viewer does not see the video that is being transmitted by the broadcaster. The viewer seems to be receiving the magnets according to the log. Server log:
|
I also run into the same issue like @adaxi everythings looks fine but the viewer cant see the video. |
Can't really identify the error from the information provided. :/ |
@kbbqiu I also tried to access my torrent with a web torrent client but the clients hangs at fetching the torrent informations. What information do you need? Could you provide a picture of the source code of the viewer? Is it correct that the video tag has no attributes except |
@kbbqiu I have attempted to debug a bit more, and it seems that the torrent is never received once the magnet is given to the client. https://github.com/gitsummore/nile.js/blob/master/client/module/viewer.js#L316 |
@Meai1 I did the same thing - it appears the broadcast server and static server have to be on the same port (i.e. served by the same server instance) - which really dampens the "scalable" aspect. Would be nice to be able to specify a custom port. I'm also having problems running examples. $ node --version
v8.0.0
$ npm --version
v5.0.0 index.js (the magnet server code): const path = require('path');
const express = require('express');
const nile = require('nile.js/server/nileServer');
const app = express();
const server = app.listen(8000);
const nileServer = nile(server);
app.use('/', nileServer);
app.use('/broadcast', express.static(path.join(__dirname, 'broadcast'))); broadcast/index.html (for serving the broadcaster static assets): <!doctype html>
<html>
<head>
<title>Nile.js Test</title>
<script src="https://unpkg.com/nile.js/client/dist/nile.Broadcaster.min.js"></script>
</head>
<body>
<video id="viewfinder"></video>
<button id="start">Start</button>
<button id="stop">Stop</button>
<script>
const broadcaster = new Broadcaster(8000, 'viewfinder', 'start', 'stop');
</script>
</body>
</html> When I serve and visit EDIT: Nevermind; the documentation is vague. You can't use a The documentation should be updated to reflect that. Now I'm seeing myself, but it's just a still. No video. EDIT 2: Just tested with a viewer client. It's showing that it successfully connected but I'm not seeing any video on the client side. Broadcaster side is still frozen after first or second frame. Here's the current repro case: // index.js
const path = require('path');
const express = require('express');
const nile = require('nile.js/server/nileServer');
const app = express();
const server = app.listen(8000);
const nileServer = nile(server);
app.use('/', nileServer);
app.use('/broadcast', express.static(path.join(__dirname, 'broadcast')));
app.use('/view', express.static(path.join(__dirname, 'viewer'))); <!-- broadcast/index.html -->
<!doctype html>
<html>
<head>
<title>Nile.js Test Broadcaster</title>
<script src="https://unpkg.com/nile.js/client/dist/nile.Broadcaster.min.js"></script>
</head>
<body>
<div id="viewfinder"></div>
<button id="start">Start</button>
<button id="stop">Stop</button>
<script>
const broadcaster = new Broadcaster(1000, 'viewfinder', 'start', 'stop');
</script>
</body>
</html> <!-- viewer/index.html -->
<!doctype html>
<html>
<head>
<title>Nile.js Test Viewer</title>
<script src="https://unpkg.com/nile.js/client/dist/nile.Viewer.min.js"></script>
</head>
<body>
<div id="viewfinder"></div>
<script>
const viewer = new Viewer('viewfinder');
</script>
</body>
</html> |
@Qix- Thanks for the update that the docs weren't proper. I think I should have understood that when I saw video tags within video tags. I was so sleepy that I didn't even think about it. And about the broadcasting side video element, for me it doesn't freeze. It shows real movement. But nothing on Viewer side, but when I got the magnet link's contents (before it got removed) using WebTorrent, it downloaded and showed me my video. I think there are some bugs to be fixed. Other than that, I think this is super cool. I had this idea, but without the torrent and other concepts and obviously I didn't see it fit to implement because I saw lot of problems. But Nile Js uses Torrents to tackle some of them ! |
I started the demo-server.js, opened the client/index.html, click "start streaming", it asks for permission then nothing happens for a while and then these errors.
The text was updated successfully, but these errors were encountered: