Video-Recording-Fixed
This commit is contained in:
parent
53cdd26f48
commit
d7305fdd53
15
dist/popup.js
vendored
15
dist/popup.js
vendored
@ -946,6 +946,12 @@ ${description}
|
|||||||
|
|
||||||
// Store the video blob for later submission
|
// Store the video blob for later submission
|
||||||
this.recordedVideo = mp4Blob;
|
this.recordedVideo = mp4Blob;
|
||||||
|
|
||||||
|
// Show the main form again and restore window size
|
||||||
|
document.body.classList.remove('recording');
|
||||||
|
this.feedbackForm.classList.remove('hidden');
|
||||||
|
window.resizeTo(400, 600); // Restore original size
|
||||||
|
|
||||||
this.showNotification('Recording saved successfully!', 'success');
|
this.showNotification('Recording saved successfully!', 'success');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error converting video:', error);
|
console.error('Error converting video:', error);
|
||||||
@ -956,7 +962,9 @@ ${description}
|
|||||||
// Start recording
|
// Start recording
|
||||||
this.mediaRecorder.start(1000); // Collect data every second
|
this.mediaRecorder.start(1000); // Collect data every second
|
||||||
|
|
||||||
// Show recording dialog
|
// Hide the main form and show recording dialog
|
||||||
|
document.body.classList.add('recording');
|
||||||
|
this.feedbackForm.classList.add('hidden');
|
||||||
this.recordingDialog.classList.remove('hidden');
|
this.recordingDialog.classList.remove('hidden');
|
||||||
|
|
||||||
// Set up stop recording button
|
// Set up stop recording button
|
||||||
@ -967,11 +975,14 @@ ${description}
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Minimize extension popup
|
// Minimize window to only show recording controls
|
||||||
window.resizeTo(300, 100);
|
window.resizeTo(300, 100);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Screen recording error:', error);
|
console.error('Screen recording error:', error);
|
||||||
this.showNotification('Error starting screen recording: ' + error.message, 'error');
|
this.showNotification('Error starting screen recording: ' + error.message, 'error');
|
||||||
|
// Make sure main form is visible if there's an error
|
||||||
|
document.body.classList.remove('recording');
|
||||||
|
this.feedbackForm.classList.remove('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async convertToMP4(webmBlob) {
|
async convertToMP4(webmBlob) {
|
||||||
|
19
dist/styles/recording-dialog.css
vendored
19
dist/styles/recording-dialog.css
vendored
@ -1,19 +1,27 @@
|
|||||||
.recording-dialog {
|
.recording-dialog {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 10px;
|
top: 0;
|
||||||
right: 10px;
|
left: 0;
|
||||||
|
right: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
width: 250px;
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.recording-dialog.hidden {
|
.recording-dialog.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.recording {
|
||||||
|
min-height: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.recording #app > *:not(.recording-dialog) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.recording-content {
|
.recording-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -52,6 +60,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#stop-recording {
|
#stop-recording {
|
||||||
|
width: 100%;
|
||||||
background: #DE350B;
|
background: #DE350B;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
|
14
js/popup.js
14
js/popup.js
@ -514,6 +514,11 @@ ${description}
|
|||||||
// Store the video blob for later submission
|
// Store the video blob for later submission
|
||||||
this.recordedVideo = mp4Blob;
|
this.recordedVideo = mp4Blob;
|
||||||
|
|
||||||
|
// Show the main form again and restore window size
|
||||||
|
document.body.classList.remove('recording');
|
||||||
|
this.feedbackForm.classList.remove('hidden');
|
||||||
|
window.resizeTo(400, 600); // Restore original size
|
||||||
|
|
||||||
this.showNotification('Recording saved successfully!', 'success');
|
this.showNotification('Recording saved successfully!', 'success');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error converting video:', error);
|
console.error('Error converting video:', error);
|
||||||
@ -524,7 +529,9 @@ ${description}
|
|||||||
// Start recording
|
// Start recording
|
||||||
this.mediaRecorder.start(1000); // Collect data every second
|
this.mediaRecorder.start(1000); // Collect data every second
|
||||||
|
|
||||||
// Show recording dialog
|
// Hide the main form and show recording dialog
|
||||||
|
document.body.classList.add('recording');
|
||||||
|
this.feedbackForm.classList.add('hidden');
|
||||||
this.recordingDialog.classList.remove('hidden');
|
this.recordingDialog.classList.remove('hidden');
|
||||||
|
|
||||||
// Set up stop recording button
|
// Set up stop recording button
|
||||||
@ -535,12 +542,15 @@ ${description}
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Minimize extension popup
|
// Minimize window to only show recording controls
|
||||||
window.resizeTo(300, 100);
|
window.resizeTo(300, 100);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Screen recording error:', error);
|
console.error('Screen recording error:', error);
|
||||||
this.showNotification('Error starting screen recording: ' + error.message, 'error');
|
this.showNotification('Error starting screen recording: ' + error.message, 'error');
|
||||||
|
// Make sure main form is visible if there's an error
|
||||||
|
document.body.classList.remove('recording');
|
||||||
|
this.feedbackForm.classList.remove('hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,19 +1,27 @@
|
|||||||
.recording-dialog {
|
.recording-dialog {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 10px;
|
top: 0;
|
||||||
right: 10px;
|
left: 0;
|
||||||
|
right: 0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
width: 250px;
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.recording-dialog.hidden {
|
.recording-dialog.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.recording {
|
||||||
|
min-height: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.recording #app > *:not(.recording-dialog) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.recording-content {
|
.recording-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -52,6 +60,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#stop-recording {
|
#stop-recording {
|
||||||
|
width: 100%;
|
||||||
background: #DE350B;
|
background: #DE350B;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user