licode
licode copied to clipboard
ERROR: Error when publishing the stream Error adding External Input
I was going to publish the stream of video file, and modified some code of sample. Below is part code.
DEMO.init_demo = function (my_name) {
//localStream = Erizo.Stream({audio: true, video: true, attributes: {name: my_name}});
localStream = Erizo.Stream({audio: true, video: true, url: 'file:///path_to_file/movie.mkv', attributes: {name: my_name}});
DEMO.chat_stream = localStream;
DEMO.create_token(my_name, "presenter", function (response) {
var token = response;
room = Erizo.Room({token: token});
localStream.addEventListener("access-accepted", function () {
var subscribeToStreams = function (streams) {
for (var index in streams) {
var stream = streams[index];
if (localStream.getID() !== stream.getID()) {
room.subscribe(stream);
}
}
};
room.addEventListener("room-connected", function (roomEvent) {
console.log('room-connected');
room.publish(localStream);
subscribeToStreams(roomEvent.streams);
});
room.addEventListener("stream-added", function (streamEvent) {
console.log('stream-added');
var streams = [];
streams.push(streamEvent.stream);
subscribeToStreams(streams);
});
room.connect();
localStream.show("my_video");
});
localStream.init();
});
};
When I run this code, I get errors on browser's console.
DEBUG: Creating URL from stream undefined GET https://xxx.com/null 404 (Not Found) ERROR: Error when publishing the stream Error adding External Input
And I've wondered the topic of groups.google.com, and found same issue; https://groups.google.com/forum/?hl=en#!searchin/lynckia/Error$20when$20publishing$20the$20stream$20Error$20adding$20External$20Input/lynckia/hfQagazzFSQ/oVNrWtkICQAJ