This message was deleted.
# helpdesk
s
This message was deleted.
a
This is the code snippet for reference.
Copy code
function handleTrackSubscribed(
  track: RemoteTrack,
  publication: RemoteTrackPublication,
  participant: RemoteParticipant,
) {
  if (track.kind === Track.Kind.Video || track.kind === Track.Kind.Audio) {
    // attach it to a new HTMLVideoElement or HTMLAudioElement
    const element = track.attach();
    parentElement.appendChild(element);
  }
}
I can get the audio and video feed from my webcam, I just don't understand how to display it on my webpage.
d
Akhil, take a look at this simple example to get a better idea of how it works. As a beginner, I would recommend playing with changing the sample project first to understand the concepts and events.
a
Thank you, David. Yeah, I've been doing exactly that if not for the heaps of errors I've received while creating an Angular component and pasting the example code into it. Most were jQuery related. It also seems like example depends on the src folder. I believe that's what the
Copy code
npm install livekit-client --save
command is for. I cloned, did an "npm install" and then did a "yarn run" on sample. The example worked! Happy to see some progress. The yarn command is new to me. I'll look further into my Angular errors and come back if I don't have any luck with fixing them.