Screen Recorder

Professional screen recording tool using modern browser Screen Capture API. Record entire screen, specific windows, or browser tabs with customizable quality settings. Features real-time preview, recording controls, and instant download. Perfect for creating tutorials, demos, and documentation.

Screen Capture Tab Recording Quality Settings Instant Download
Media Preview
Record entire screen Record specific window Record browser tab only
Browser Support
Screen Capture API: Checking...
Media Recorder: Checking...
Browser: Detecting...
Platform: Detecting...
Recording Settings
Choose what you want to record
5.0 Mbps
Recording Controls
Recording Status
Status: Ready
Duration: 00:00:00
File Size: 0 MB
Resolution: Not detected
Codec: Not detected
Quick Actions
Live Preview / Video Player
No Preview

Screen Recorder

Click "Start Recording" to begin screen capture or play a recorded video

Recorded Videos
No recordings yet. Start recording to see videos here.
Implementation Guide
// Basic Screen Capture API implementation
async function startScreenRecording() {
    try {
        // Request screen capture permission
        const stream = await navigator.mediaDevices.getDisplayMedia({
            video: {
                width: { ideal: 1920 },
                height: { ideal: 1080 },
                frameRate: { ideal: 30 }
            },
            audio: true
        });

        // Create MediaRecorder instance
        const mediaRecorder = new MediaRecorder(stream, {
            mimeType: 'video/webm;codecs=vp9',
            videoBitsPerSecond: 5000000
        });

        const chunks = [];

        // Handle data available event
        mediaRecorder.ondataavailable = (event) => {
            if (event.data.size > 0) {
                chunks.push(event.data);
            }
        };

        // Handle recording stop
        mediaRecorder.onstop = () => {
            const blob = new Blob(chunks, { type: 'video/webm' });
            const url = URL.createObjectURL(blob);
            
            // Create download link
            const a = document.createElement('a');
            a.href = url;
            a.download = `recording-${Date.now()}.webm`;
            a.click();
            
            URL.revokeObjectURL(url);
        };

        // Start recording
        mediaRecorder.start(1000); // Collect data every second
        
        return { mediaRecorder, stream };
    } catch (error) {
        console.error('Error starting screen recording:', error);
        throw error;
    }
}
// Advanced recording with custom settings
class ScreenRecorder {
    constructor(options = {}) {
        this.options = {
            video: {
                width: { ideal: 1920 },
                height: { ideal: 1080 },
                frameRate: { ideal: 30 },
                cursor: 'always'
            },
            audio: {
                echoCancellation: false,
                noiseSuppression: false,
                sampleRate: 44100
            },
            ...options
        };
        
        this.mediaRecorder = null;
        this.stream = null;
        this.chunks = [];
        this.startTime = null;
        this.isRecording = false;
    }

    async start() {
        try {
            // Get display media with custom constraints
            this.stream = await navigator.mediaDevices.getDisplayMedia(this.options);
            
            // Choose best available codec
            const mimeType = this.getBestMimeType();
            
            this.mediaRecorder = new MediaRecorder(this.stream, {
                mimeType,
                videoBitsPerSecond: this.options.videoBitrate || 5000000,
                audioBitsPerSecond: this.options.audioBitrate || 128000
            });

            this.setupEventHandlers();
            
            this.mediaRecorder.start(1000);
            this.startTime = Date.now();
            this.isRecording = true;
            
            return true;
        } catch (error) {
            this.handleError(error);
            return false;
        }
    }

    getBestMimeType() {
        const types = [
            'video/webm;codecs=vp9,opus',
            'video/webm;codecs=vp8,opus',
            'video/webm;codecs=h264,opus',
            'video/webm',
            'video/mp4'
        ];

        return types.find(type => MediaRecorder.isTypeSupported(type)) || '';
    }

    setupEventHandlers() {
        this.mediaRecorder.ondataavailable = (event) => {
            if (event.data.size > 0) {
                this.chunks.push(event.data);
            }
        };

        this.mediaRecorder.onstop = () => {
            this.createVideoFile();
        };

        this.stream.getVideoTracks()[0].onended = () => {
            this.stop();
        };
    }

    pause() {
        if (this.mediaRecorder && this.mediaRecorder.state === 'recording') {
            this.mediaRecorder.pause();
        }
    }

    resume() {
        if (this.mediaRecorder && this.mediaRecorder.state === 'paused') {
            this.mediaRecorder.resume();
        }
    }

    stop() {
        if (this.mediaRecorder && this.isRecording) {
            this.mediaRecorder.stop();
            this.stream.getTracks().forEach(track => track.stop());
            this.isRecording = false;
        }
    }

    createVideoFile() {
        const blob = new Blob(this.chunks, { 
            type: this.mediaRecorder.mimeType 
        });
        
        const duration = Date.now() - this.startTime;
        const filename = `screen-recording-${new Date().toISOString().slice(0, 19)}.webm`;
        
        return { blob, duration, filename };
    }
}

// Usage
const recorder = new ScreenRecorder({
    video: { frameRate: { ideal: 60 } },
    videoBitrate: 8000000
});

await recorder.start();
// Comprehensive error handling for screen recording
class ScreenRecorderWithErrorHandling {
    async startRecording() {
        try {
            // Check API support first
            if (!this.isScreenCaptureSupported()) {
                throw new Error('Screen Capture API not supported');
            }

            if (!this.isMediaRecorderSupported()) {
                throw new Error('MediaRecorder API not supported');
            }

            // Request permissions with fallback options
            const stream = await this.requestScreenCapture();
            const mediaRecorder = await this.createRecorder(stream);
            
            return { stream, mediaRecorder };
            
        } catch (error) {
            this.handleRecordingError(error);
            throw error;
        }
    }

    isScreenCaptureSupported() {
        return navigator.mediaDevices && 
               navigator.mediaDevices.getDisplayMedia;
    }

    isMediaRecorderSupported() {
        return typeof MediaRecorder !== 'undefined';
    }

    async requestScreenCapture() {
        const constraints = {
            video: {
                width: { ideal: 1920 },
                height: { ideal: 1080 },
                frameRate: { ideal: 30 }
            },
            audio: true
        };

        try {
            return await navigator.mediaDevices.getDisplayMedia(constraints);
        } catch (error) {
            // Handle specific permission errors
            if (error.name === 'NotAllowedError') {
                throw new Error('Screen recording permission denied');
            } else if (error.name === 'NotFoundError') {
                throw new Error('No screen capture source available');
            } else if (error.name === 'NotSupportedError') {
                throw new Error('Screen capture not supported');
            } else {
                throw new Error(`Screen capture failed: ${error.message}`);
            }
        }
    }

    async createRecorder(stream) {
        // Test codec support and choose best option
        const supportedTypes = [
            'video/webm;codecs=vp9,opus',
            'video/webm;codecs=vp8,opus', 
            'video/webm;codecs=h264,opus',
            'video/webm',
            'video/mp4'
        ];

        const mimeType = supportedTypes.find(type => 
            MediaRecorder.isTypeSupported(type)
        );

        if (!mimeType) {
            throw new Error('No supported video format found');
        }

        try {
            return new MediaRecorder(stream, { mimeType });
        } catch (error) {
            throw new Error(`Failed to create MediaRecorder: ${error.message}`);
        }
    }

    handleRecordingError(error) {
        console.error('Recording error:', error);
        
        // Provide user-friendly error messages
        const userMessage = this.getUserFriendlyErrorMessage(error);
        this.showErrorNotification(userMessage);
    }

    getUserFriendlyErrorMessage(error) {
        const errorMessages = {
            'Screen recording permission denied': 'Please allow screen recording permission to continue.',
            'No screen capture source available': 'No screens or windows available for recording.',
            'Screen capture not supported': 'Your browser doesn\'t support screen recording.',
            'No supported video format found': 'Your browser doesn\'t support video recording formats.'
        };

        return errorMessages[error.message] || 
               'An unexpected error occurred during recording.';
    }

    showErrorNotification(message) {
        // Show user-friendly error notification
        console.warn('User notification:', message);
    }
}

// Usage with error handling
const recorder = new ScreenRecorderWithErrorHandling();

try {
    const { stream, mediaRecorder } = await recorder.startRecording();
    console.log('Recording started successfully');
} catch (error) {
    console.log('Failed to start recording:', error.message);
}
Recording Tips
Browser Support: Works best in Chrome, Edge, and Firefox
Privacy: All recording happens locally, no data sent to servers
File Size: Higher quality = larger files. Adjust settings accordingly
Cursor: Enable cursor recording for better tutorials
Video Player: Click on video thumbnails to play in large preview
Shortcuts: Space (play/pause), Arrow keys (seek), Esc (close)

Help & Related Tools

Everything you need to know

FAQ Frequently Asked Questions

What can I record with this screen recorder?
You can record your entire screen, specific application windows, or individual browser tabs. The tool supports customizable video quality, frame rates, audio recording, and mouse cursor capture with real-time preview.
How do I start recording my screen?
Click "Start Recording", choose your preferred capture source (screen, window, or tab) when prompted by your browser, and the recording will begin immediately with live preview. Use the pause/stop controls to manage your recording.
Which browsers support screen recording?
This tool works in Chrome, Edge, Firefox, and Safari that support the Screen Capture API. Chrome and Edge offer the best experience with all features. The tool automatically detects browser capabilities.
Are my recordings stored on your servers?
No, all recording happens locally in your browser. Videos are processed and stored on your device only. Nothing is uploaded to our servers, ensuring complete privacy and security of your recordings.
Can I download my recordings in different formats?
Yes, recordings are saved in WebM format by default (best browser support) and can be downloaded immediately after recording. The tool automatically selects the best codec supported by your browser for optimal quality.

TOOLS Similar in Media

Barcode Generator (Common Types)

Generate common barcodes (EAN-13, UPC, Code 39, Code 128) cl...

Webcam Filters

Apply real-time visual effects to live webcam video includin...

Video to GIF Converter

Convert videos to animated GIFs using client-side processing...

Text-to-Speech Previewer

Convert text to spoken voice using browser Web Speech API wi...

Something not working? Idea for a great tool? Contact our team or browse all tools

Explore More Resources

Latest Articles

Weather & Astronomy
Weather Data & Astronomical Tools: Connecting with Natural Phenomena

Explore comprehensive weather analysis and astronomical tracking tools for outdoor planning, health ...

Jun 10, 2025 140
GIS & Mapping
Geographic Data Analysis: GIS Tools for Modern Applications

Unlock the power of location intelligence with professional GIS and mapping tools. From coordinate c...

Jun 9, 2025 162
Web Development
Complete Guide to Image Optimization: Free Online Tools for Web Performance

Master image optimization for faster websites and better Core Web Vitals. Discover professional tool...

Jun 9, 2025 133
Document processing
File Management & Document Processing: PDF, OCR & Conversion Tools

Master file management and document processing with professional PDF, OCR, and conversion tools. Str...

Jun 9, 2025 160

Developer Resources

BugFixCode.com

Professional code debugging and development solutions for developers.

  • Code Review & Debugging
  • Performance Optimization
  • Best Practices Guide
  • Developer Tools
Trusted by developers worldwide