mirror of
https://github.com/koush/scrypted.git
synced 2026-05-04 21:30:30 +01:00
tuya: fix crlf in candidate, fix empty stream name in rebroadcast, webrtc logging
This commit is contained in:
3
plugins/prebuffer-mixin/package-lock.json
generated
3
plugins/prebuffer-mixin/package-lock.json
generated
@@ -7,7 +7,6 @@
|
||||
"": {
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.9.34",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
@@ -35,7 +34,7 @@
|
||||
},
|
||||
"../../sdk": {
|
||||
"name": "@scrypted/sdk",
|
||||
"version": "0.0.199",
|
||||
"version": "0.0.206",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@babel/preset-typescript": "^7.16.7",
|
||||
|
||||
@@ -194,7 +194,7 @@ class PrebufferSession {
|
||||
}
|
||||
|
||||
get streamName() {
|
||||
return this.advertisedMediaStreamOptions.name;
|
||||
return this.advertisedMediaStreamOptions.name || `Stream ${this.streamId}`;
|
||||
}
|
||||
|
||||
clearPrebuffers() {
|
||||
@@ -301,7 +301,7 @@ class PrebufferSession {
|
||||
const elapsed = Date.now() - start;
|
||||
const bitrate = Math.round(total / elapsed * 8);
|
||||
|
||||
const group = this.streamName ? `Stream: ${this.streamName}` : 'Stream';
|
||||
const group = `Stream: ${this.streamName}`;
|
||||
|
||||
settings.push(
|
||||
{
|
||||
|
||||
@@ -204,7 +204,7 @@ export function createStreamSettings(device: MixinDeviceBase<VideoCamera>) {
|
||||
|
||||
enabledStreams = {
|
||||
defaultValue: getDefaultPrebufferedStreams(msos)?.map(mso => mso.name),
|
||||
choices: msos.map(mso => mso.name),
|
||||
choices: msos.map((mso, index) => mso.name || `Stream ${index}`),
|
||||
hide: false,
|
||||
};
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ class TuyaRTCSignalingSesion implements RTCSignalingSession {
|
||||
}
|
||||
|
||||
sendIceCandidate({
|
||||
candidate: candidate.candidate,
|
||||
candidate: candidate.candidate.trim(),
|
||||
sdpMid: '0',
|
||||
sdpMLineIndex: 0
|
||||
});
|
||||
|
||||
@@ -80,6 +80,9 @@ export async function createRTCPeerConnectionSource(options: {
|
||||
pc.iceConnectionStateChange.subscribe(() => {
|
||||
console.log('iceConnectionState', pc.iceConnectionState);
|
||||
});
|
||||
pc.connectionStateChange.subscribe(() => {
|
||||
console.log('connectionState', pc.connectionState);
|
||||
});
|
||||
audioTransceiver = pc.addTransceiver("audio", setup.audio as any);
|
||||
audioTransceiver.mid = '0';
|
||||
audioTransceiver.onTrack.subscribe((track) => {
|
||||
|
||||
Reference in New Issue
Block a user