webrtc-streamer 0.8.4-9-g093e8b2 → 0.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ {
2
+ "files.associations": {
3
+ "array": "cpp",
4
+ "string": "cpp",
5
+ "string_view": "cpp",
6
+ "ranges": "cpp",
7
+ "span": "cpp",
8
+ "vector": "cpp"
9
+ }
10
+ }
@@ -108,12 +108,14 @@ WebRtcStreamer.prototype.onReceiveGetIceServers = function(iceServers, videourl,
108
108
  this.pc.createOffer(this.mediaConstraints).then((sessionDescription) => {
109
109
  console.log("Create offer:" + JSON.stringify(sessionDescription));
110
110
 
111
+ console.log(`video codecs:${Array.from(new Set(RTCRtpReceiver.getCapabilities("video")?.codecs?.map(codec => codec.mimeType)))}`)
112
+ console.log(`audio codecs:${Array.from(new Set(RTCRtpReceiver.getCapabilities("audio")?.codecs?.map(codec => codec.mimeType)))}`)
113
+
111
114
  if (prefmime != undefined) {
112
115
  //set prefered codec
113
- let [prefkind] = prefmime.split('/');
114
- let codecs = RTCRtpReceiver.getCapabilities(prefkind).codecs;
115
- console.log(`codecs:${JSON.stringify(codecs)}`)
116
- let preferedCodecs = codecs.filter(codec => codec.mimeType === prefmime);
116
+ const [prefkind] = prefmime.split('/');
117
+ const codecs = RTCRtpReceiver.getCapabilities(prefkind).codecs;
118
+ const preferedCodecs = codecs.filter(codec => codec.mimeType === prefmime);
117
119
 
118
120
  console.log(`preferedCodecs:${JSON.stringify(preferedCodecs)}`);
119
121
  this.pc.getTransceivers().filter(transceiver => transceiver.receiver.track.kind === prefkind).forEach(tcvr => {
@@ -194,17 +196,6 @@ WebRtcStreamer.prototype.createPeerConnection = function() {
194
196
  console.log("remote datachannel recv:"+JSON.stringify(event.data));
195
197
  }
196
198
  }
197
- pc.onicegatheringstatechange = function() {
198
- if (pc.iceGatheringState === "complete") {
199
- const recvs = pc.getReceivers();
200
-
201
- recvs.forEach((recv) => {
202
- if (recv.track && recv.track.kind === "video") {
203
- console.log("codecs:" + JSON.stringify(recv.getParameters().codecs))
204
- }
205
- });
206
- }
207
- }
208
199
 
209
200
  try {
210
201
  var dataChannel = pc.createDataChannel("ClientDataChannel");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webrtc-streamer",
3
- "version": "0.8.4-9-g093e8b2",
3
+ "version": "0.8.5",
4
4
  "description": "",
5
5
  "main": "joinjanusvideoroom.js",
6
6
  "dependencies": {