Does laravel echo support mediastream data? I'm trying to send a video stream to laravel echo but it returns empty {}. Below is the real stream data if I console log it.
let channel = Echo.join(`consultation`)
.listenForWhisper('connectNewUserEvent',(e)=>{
console.log(e) //got empty
})
var myPeer = new Peer();
myPeer.on('open', function(peer_id) {
navigator.mediaDevices.getUserMedia({
video:true,
audio:true
}).then(stream=>{
addVideoStream(myVideo,stream)
myPeer.on('call', call => {
call.answer(stream)
const video = document.createElement('video')
call.on('stream', userVideoStream => {
addVideoStream(video, userVideoStream)
})
})
channel.whisper('connectNewUserEvent',stream)
console.log(stream) //returning stream
})
});
My Answer:
No, Laravel Echo does not support media stream data directly. Laravel Echo is primarily used for real-time broadcasting of events and messages between the server and client using websockets. If you need to send video stream data, you may need to use a different approach such as using a dedicated media streaming server or service, and then sending the necessary information or events through Laravel Echo to notify clients about the stream.
Rate this post
4 of 5 based on 8270 votesComments