1
I am streaming webRTC from a server to a web client successfully using code adapted from this jsfiddle: 

https://jsfiddle.net/z7ms3u5r/

I need the javascript client to send Picture Loss Indicator (PLI) packets in order to inform the server to form a keyframe (i-frame). Is there a way to force the javascript webRTC client to send a PLI to the server?

mholberger
  • 11
  • 1

1 Answers1

1

Unfortunately you can't using WebRTC media APIs.

If you are using Pion (where that gist comes from) I would send the PLI via the DataChannel. Then you can easily craft+send one in Go!

Sean DuBois
  • 3,972
  • 1
  • 11
  • 22
  • I am using Pion for the webRTC server. I can send PLI from the golang Pion server, but it has no effect on the server streaming when sent from the server side. Im not aware of any implementation to simulate receiving a PLI. – mholberger Oct 12 '20 at 13:49
  • Could you send a 'PLI Replacement' via the DataChannel from the client? You can send w/e messages you want via DataChannels. So you could have a DataChannel handler in Go that says `if dataChannelMsg == "PLIRequest" { generateKeyframe() }` – Sean DuBois Oct 13 '20 at 16:25
  • If I could manually generateKeyframe() from the pion server that would solve my issue. The problem is it will not generate a keyframe unless it receives a PLI from the client. I am streaming to the pion server using GStreamer UDP pipeline. – mholberger Oct 14 '20 at 15:04