fix(recording): improve recording capture quality and align preview button loading state

This commit is contained in:
2026-04-12 23:21:45 +00:00
parent 3eeb9dc46f
commit d178d6cb73
4 changed files with 17 additions and 4 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## 2026-04-12 - 3.8.5 - fix(recording)
improve recording capture quality and align preview button loading state
- request 60fps screen capture and increase recorder bitrate to 8 Mbps for smoother, higher-quality videos
- update preview button layout to use inline flex alignment so spinner and label stay properly aligned
## 2026-04-12 - 3.8.4 - fix(repo)
no changes to commit

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-wcctools',
version: '3.8.4',
version: '3.8.5',
description: 'A set of web component tools for creating element catalogues, enabling the structured development and documentation of custom elements and pages.'
}

View File

@@ -383,6 +383,9 @@ export class WccRecordingPanel extends DeesElement {
font-weight: 500;
cursor: pointer;
transition: all 0.15s ease;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.preview-btn.secondary {
@@ -549,7 +552,7 @@ export class WccRecordingPanel extends DeesElement {
border-radius: 50%;
border-top-color: white;
animation: spin 0.8s linear infinite;
margin-right: 0.5rem;
flex-shrink: 0;
}
@keyframes spin {

View File

@@ -150,7 +150,8 @@ export class RecorderService {
// Get video stream based on mode
const displayMediaOptions: DisplayMediaStreamOptions = {
video: {
displaySurface: options.mode === 'viewport' ? 'browser' : 'monitor'
displaySurface: options.mode === 'viewport' ? 'browser' : 'monitor',
frameRate: { ideal: 60 },
} as MediaTrackConstraints,
audio: false
};
@@ -207,7 +208,10 @@ export class RecorderService {
? 'video/webm;codecs=vp9'
: 'video/webm';
this.mediaRecorder = new MediaRecorder(combinedStream, { mimeType });
this.mediaRecorder = new MediaRecorder(combinedStream, {
mimeType,
videoBitsPerSecond: 8_000_000, // 8 Mbps for smooth, high-quality capture
});
this.recordedChunks = [];
this.mediaRecorder.ondataavailable = (e) => {