feat(screen): Phase 495 screen/capture span metadata (v0.8.458)
Add screen.capture span on first display frame ingest and extend screen.start/stop end metadata for diagnostics. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -61,6 +61,8 @@ Expose a single `EventEmitter` API the UI drives over IPC (`apps/pearcord/index.
|
||||
|
||||
**v0.8.444 (Phase 481):** `attachment.stage` `byteLength`/`isImage`; `attachment.read` `fromLocal`; `embed.resolve` `urlLen`. UI attachment compositor + clipboard staging meta. Bundle: `npm run test:phase481-attachments`. See [ATTACHMENTS.md](../../docs/ATTACHMENTS.md), [EMBEDS.md](../../docs/EMBEDS.md).
|
||||
|
||||
**v0.8.458 (Phase 495):** `screen.start` `captureSource`/`activeShareCount`; `screen.stop` `remainingShares`; `screen.capture` on first display frame. UI screen compositor + **screen-errors** filter. Bundle: `npm run test:phase495-screen`. See [SCREEN_SHARE.md](../../docs/SCREEN_SHARE.md).
|
||||
|
||||
**v0.8.457 (Phase 494):** `stage.join` `channelType`/`peerCount`; `stage.speaker.request` `pendingCount`; `stage.speaker.approve` `approvedFromPending`/`speakerCount`; `stage.speaker.demote` `demotedFromSpeaker`. UI stage compositor + **stage-errors** filter. Bundle: `npm run test:phase494-stage`. See [STAGE.md](../../docs/STAGE.md).
|
||||
|
||||
**v0.8.456 (Phase 493):** `voice.join` `channelType`/`peerCount`; `voice.leave` `listenOnlyWas`; `stage.join` `isModerator`; `screen.start` `wasSharing`/`listenOnly`; `screen.stop` `hadActive`. Split voice guild-loading compositor. Bundle: `npm run test:phase493-voice`. See [VOICE.md](../../docs/VOICE.md).
|
||||
|
||||
@@ -6243,6 +6243,8 @@ class PearcordPlatform extends EventEmitter {
|
||||
})
|
||||
if (ch?.type !== 'voice') throw new Error('screen share only in voice channels')
|
||||
const row = await this.screenShare.startShare(this.voice.myChannelId, label)
|
||||
const captureSource = this.screenShare?.captureSource || this.displayCapture?.source || null
|
||||
this._screenCaptureSpanLogged = false
|
||||
this.guild.gossipScreenShare(row)
|
||||
this.guild.sendScreenMedia(this.screenShare.buildAnnounce())
|
||||
await this._audit('screen.start', {
|
||||
@@ -6256,7 +6258,10 @@ class PearcordPlatform extends EventEmitter {
|
||||
label: label || null,
|
||||
hasLabel: !!(label && String(label).trim()),
|
||||
listenOnly: !!this.voiceMedia?.listenOnly,
|
||||
wasSharing: false
|
||||
wasSharing: false,
|
||||
channelType: 'voice',
|
||||
captureSource,
|
||||
activeShareCount: (this.screenShare?.shares || []).length
|
||||
})
|
||||
return row
|
||||
} catch (err) {
|
||||
@@ -6272,7 +6277,27 @@ class PearcordPlatform extends EventEmitter {
|
||||
|
||||
ingestDisplayCapture (payload) {
|
||||
if (!this.displayCapture || !this.screenShare?.active) return false
|
||||
return this.displayCapture.push(payload || {})
|
||||
try {
|
||||
const ok = this.displayCapture.push(payload || {})
|
||||
if (ok && !this._screenCaptureSpanLogged) {
|
||||
this._screenCaptureSpanLogged = true
|
||||
const capSpan = this.log.time('screen.capture', {
|
||||
channelId: this.screenShare?.channelId || this.voice?.myChannelId || null
|
||||
})
|
||||
capSpan.end({
|
||||
width: payload?.width ?? null,
|
||||
height: payload?.height ?? null,
|
||||
hasData: !!(payload?.data || payload?.base64),
|
||||
mimeType: payload?.mimeType || null
|
||||
})
|
||||
}
|
||||
return ok
|
||||
} catch (err) {
|
||||
this.log.error('screen.capture error', {
|
||||
error: err?.message || String(err)
|
||||
})
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
async stopScreenShare () {
|
||||
@@ -6304,8 +6329,10 @@ class PearcordPlatform extends EventEmitter {
|
||||
channelId: row?.channelId || null,
|
||||
guildId,
|
||||
stopped: !!row,
|
||||
hadActive: true
|
||||
hadActive: true,
|
||||
remainingShares: (this.screenShare?.shares || []).length
|
||||
})
|
||||
this._screenCaptureSpanLogged = false
|
||||
return row
|
||||
} catch (err) {
|
||||
this.log.error('screen.stop error', {
|
||||
|
||||
Reference in New Issue
Block a user