@pc.on('track')
def on_track(track):
if track.kind == 'video':
local_video = VideoTransformTrack(track, transform=params['video_transform'])
pc.addTrack(local_video)
@pc.on('datachannel')
def on_datachannel(channel):
@channel.on('message')
def on_message(message):
channel.send(str(local_video.getR()))
this is my final code
Hey all, I have a short question, that I hope you can maybe guide me in the right direction.
I want to implement a camera-service in python that distributes a live stream of a USB-Camera to other services. I want to do this without an internet connection over the local network. I have two other services that use the stream, a classification service, in python and a front-end that displays the live stream written in html and javascript.
You can find the whole question here: https://stackoverflow.com/questions/56582908/webrtc-connection-on-localhost-without-an-internet-connection
return new Promise(function(resolve) {
if (pc.iceGatheringState === 'complete') {
resolve();
} else {
function checkState() {
if (pc.iceGatheringState === 'complete') {
pc.removeEventListener('icegatheringstatechange', checkState);
resolve();
}
}
pc.addEventListener('icegatheringstatechange', checkState);
Hey guys,
Im new to the project, and was hoping for some advice.
I'm trying to use aiortc allow two clients (browser webcams) to connect to the server, and have the server broadcast both ( and it will only ever be two), video streams to each user. So they can see each other. What example on github would best help me with this ? I was thinking about merging webcam & apprtc. I'll be honest though. Im unsure how to convert the image reciver to a media player. Any advice would be appreciated.