livekit / server-sdk-go

Client and server SDK for Golang
Apache License 2.0
191 stars 83 forks source link

packetization payload size should not greater than 1200 bytes #518

Open huxinggg opened 1 month ago

huxinggg commented 1 month ago

packetization payload size should not greater than 1200 bytes

frameDuration := 20 * time.Millisecond gotrack, _ := lksdk.NewLocalFileTrack("/Users/huxing/Desktop/work/jibengong/server/ai_server/test.ogg", lksdk.ReaderTrackWithFrameDuration(frameDuration), lksdk.ReaderTrackWithOnWriteComplete(func() { fmt.Println("track finished") }))

s.roomClient.LocalParticipant.PublishTrack(gotrack, &lksdk.TrackPublicationOptions{ Name: "test", })

Why does this problem occur? Is there no fragment in SDK when sending? In addition, if it is a data stream, how should I fragment and send it myself? The demo only gives this example, can you send the data stream?