This message was deleted.
# helpdesk
s
This message was deleted.
a
what do you mean by “now a video stream is requested from local”? what process needs this video stream?
w
We are developing a seminar application like streamyard. There will be videos, documents, etc. shares here.
A little bit like a OBS
It will select video from your computer and start streaming.
a
You want your app to stream a saved video file that the user selects from their computer?
w
Yes
Please help
p
hi Gökhan! there’s currently no built-in support in the client-sdk-js to make this happen. You can work around it though by using the captureStream API and capture the mediastream directly from a local video element. Then you can manually publish your track. In case you are only interested in the video it would be with
localParticipant.publishTrack(myCapturedStream.getVideoTracks()[0])
w
Thank you
How to attach audio from video? localParticipant.publishTrack function returned LocalTrackPublication. Since the sid in LocalTrackPublication and the sid in RemoteTrackPublication did not match, I could not match the audioTrack.
Copy code
const track = await livekit_room.localParticipant.publishTrack(stream.getVideoTracks()[0])
const trackAudio = await livekit_room.localParticipant.publishTrack(stream.getAudioTracks()[0])
// Send source info with socket 
addSourceFromStream(
     track.track,
     trackAudio.track, TrackType.Video,
     screenShareTitle,
     track.trackSid, screenShareTitle, livekit_room.localParticipant.identity,
     true, 0, videoElement);