https://livekit.io logo
Join Slack
Powered by
# helpdesk
  • w

    wonderful-manchester-12533

    01/27/2021, 5:08 PM
    when I say "unpublish" I actually don't think that closes our socket
  • w

    wonderful-manchester-12533

    01/27/2021, 5:08 PM
    one moment let me confirm
  • d

    dry-elephant-14928

    01/27/2021, 5:08 PM
    which API are you using to unpublish?
  • w

    wonderful-manchester-12533

    01/27/2021, 5:08 PM
    thats another thing, I don't think we are doing anything related to livekit when we unpublish, so we might just be publishing new tracks over and over
  • d

    dry-elephant-14928

    01/27/2021, 5:09 PM
    how are you "publishing"?
  • d

    dry-elephant-14928

    01/27/2021, 5:09 PM
    or unpublish.. just trying to get a sense of the APIs
  • w

    wonderful-manchester-12533

    01/27/2021, 5:10 PM
    Copy code
    const tracks = await LiveKit.createLocalTracks({ audio: true });
                    // eslint-disable-next-line
                    // @ts-ignore
                    tracks.forEach((t) => room.localParticipant.publishTrack(t));
    
                    const mediaStreamTracks = tracks.map((t) => (t as any).mediaStreamTrack);
                    mediaStream.current = new MediaStream(mediaStreamTracks);
  • w

    wonderful-manchester-12533

    01/27/2021, 5:10 PM
    ^ publish
  • w

    wonderful-manchester-12533

    01/27/2021, 5:10 PM
    no unpublish logic right now, let me add that
  • w

    wonderful-manchester-12533

    01/27/2021, 5:10 PM
    currently its just a state change in our react app that removes some stuff off the screen
  • d

    dry-elephant-14928

    01/27/2021, 5:10 PM
    ahhh gotchu
  • w

    wonderful-manchester-12533

    01/27/2021, 5:11 PM
    nevertheless, I'd hope livekit wouldn't crash if I published a bunch of tracks without ever calling unpublish on them up to a certain level
  • d

    dry-elephant-14928

    01/27/2021, 5:11 PM
    I think if you want audio only, you'd have to pass
    video: false
    it defaults to create both
  • w

    wonderful-manchester-12533

    01/27/2021, 5:11 PM
    we do want both at the moment
  • d

    dry-elephant-14928

    01/27/2021, 5:11 PM
    how many different tracks per participant?
  • w

    wonderful-manchester-12533

    01/27/2021, 5:11 PM
    atm we will limit to 2
  • d

    dry-elephant-14928

    01/27/2021, 5:11 PM
    yeah that's not a big deal..
  • w

    wonderful-manchester-12533

    01/27/2021, 5:11 PM
    but eventually will be 3 with potential screen share
  • w

    wonderful-manchester-12533

    01/27/2021, 5:12 PM
    but when I click "Call in" -> "Leave" -> "Call in" I have a feeling I pushed 4 tracks
  • w

    wonderful-manchester-12533

    01/27/2021, 5:12 PM
    because the "Leave" doesn't unpublish anything
  • d

    dry-elephant-14928

    01/27/2021, 5:12 PM
    btw, in the latest version of the js sdk, it automatically publishes both video/audio when you connect to a room (you can disable by passing in video/audio false in
    ConnectOptions
  • w

    wonderful-manchester-12533

    01/27/2021, 5:12 PM
    and I called in + left maybe 8 times till the socket crashed
  • w

    wonderful-manchester-12533

    01/27/2021, 5:12 PM
    ah interesting, I'll take note of that
  • d

    dry-elephant-14928

    01/27/2021, 5:12 PM
    ok, that's possible! I'll take a look at how the server handles duplicate tracks
  • d

    dry-elephant-14928

    01/27/2021, 5:13 PM
    it might be causing issues
  • w

    wonderful-manchester-12533

    01/27/2021, 5:13 PM
    still on version `^0.0.1
  • w

    wonderful-manchester-12533

    01/27/2021, 5:13 PM
    for the js
  • d

    dry-elephant-14928

    01/27/2021, 5:13 PM
    latest is 0.1.0, if you want to do an yarn update
  • w

    wonderful-manchester-12533

    01/27/2021, 5:13 PM
    ok I'll pick it up now
  • d

    dry-elephant-14928

    01/27/2021, 5:14 PM
    also, if you mind pulling the server, and rebuild.. I added version into the logs to better help identify issues
1...456...91Latest