# Activate your webcam In this section we're going to learn how to use your webcam to capture the video. We're also going to polish our work and make it presentable to users. ## Change the source of data Instead of using a video file, we're going to use your webcam. We simply need to change the source of data and instruct encantar.js to use your webcam. We'll do it with one new line of code! ```js title="ar-demo.js" hl_lines="20-22" async function startARSession() { if(!AR.isSupported()) { throw new Error( 'This device is not compatible with this AR experience.\n\n' + 'User agent: ' + navigator.userAgent ); } const tracker = AR.Tracker.ImageTracker(); await tracker.database.add([{ name: 'my-reference-image', image: document.getElementById('my-reference-image') }]); const viewport = AR.Viewport({ container: document.getElementById('ar-viewport') }); //const video = document.getElementById('my-video'); // comment this line //const source = AR.Source.Video(video); // comment this line const source = AR.Source.Camera(); const session = await AR.startSession({ mode: 'immersive', viewport: viewport, trackers: [ tracker ], sources: [ source ], stats: true, gizmos: true, }); return session; } ``` Let's also comment (or remove) the `