Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upError when trying to stream video torrent #836
Closed
Comments
This comment has been minimized.
This comment has been minimized.
|
This way of streaming into a video tag is no longer supported: file.createReadStream().pipe(video);Instead you should do: file.renderTo(video); |
This comment has been minimized.
This comment has been minimized.
|
This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm building a video streamming application with Electron and I'm facing a problem for which I haven't found any solution so far.
My code is the following:
const $ = require('jquery');
const WebTorrent = require('webtorrent');
global.jQuery = $;
$(document).ready(function(){
var client = new WebTorrent();
var magnetUri = 'https://webtorrent.io/torrents/sintel.torrent';
client.add(magnetUri, function (torrent) {
var file = torrent.files[0];
var video = document.createElement('video');
video.controls = true;
$('#main-container').append(video);
file.createReadStream().pipe(video);
});
})
And after a little bit I get the following error in the console:
Uncaught TypeError: dest.on is not a function
from this file: ..app/node_modules/webtorrent/node_modules/readable-stream/lib/_stream_readable.js
and on my terminal I see those errors as well:
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185408:ERROR:webrtcsession.cc(1210)] ConnectDataChannel called when data_channel_ is NULL.
[9504:0614/185425:ERROR:sctpdataengine.cc(944)] SctpDataMediaChannelFailed to send a stream reset for 1 streams: [0x00000009] Bad file descriptor
[9504:0614/185435:ERROR:sctpdataengine.cc(944)] SctpDataMediaChannelFailed to send a stream reset for 1 streams: [0x00000002] No such file or directory
Any help would be much appreciated.