"Discover a treasure trove of productivity and creativity with our curated collection of free online tools! From project management to graphic design, coding to content creation, our website offers a one-stop destination for all your digital needs. Whether you're a seasoned professional or a budding enthusiast, unlock the power of innovation with intuitive interfaces and robust functionalities. Say goodbye to costly software and hello to efficiency without breaking the bank.
YouTube Subscriber and Liker Button Subscribe Like // Function to subscribe to a channel function subscribe() { alert("Subscribed!"); // You can add code here to interact with the YouTube API to subscribe to a channel } // Function to like a video function like() { alert("Liked!"); // You can add code here to interact with the YouTube API to like a video } // Event listeners for buttons document.getElementById("subscribeBtn").addEventListener("click", subscribe); document.getElementById("likeBtn").addEventListener("click", like); .container { text-align: center; margin-top: 50px; } button { padding: 10px 20px; font-size: 16px; border: none; border-radius: 5px; cursor: pointer; margin: 0 10px; } button:hover { background-color: #ddd; }
Get link
Facebook
X
Pinterest
Email
Other Apps
Screen Recorder
Screen Recorder
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f3f3f3;
}
#app {
max-width: 600px;
text-align: center;
}
.controls {
margin-bottom: 20px;
}
button {
padding: 10px 20px;
font-size: 16px;
background-color: #007bff;
color: white;
border: none;
cursor: pointer;
margin-right: 10px;
}
button:disabled {
background-color: #ccc;
cursor: not-allowed;
}
video {
width: 100%;
max-width: 100%;
}
const startRecordingButton = document.getElementById('startRecording');
const stopRecordingButton = document.getElementById('stopRecording');
const recordedVideo = document.getElementById('recordedVideo');
let recorder;
startRecordingButton.addEventListener('click', startRecording);
stopRecordingButton.addEventListener('click', stopRecording);
function startRecording() {
navigator.mediaDevices.getDisplayMedia({ video: true, audio: true })
.then(stream => {
recorder = RecordRTC(stream, {
type: 'video'
});
recorder.startRecording();
startRecordingButton.disabled = true;
stopRecordingButton.disabled = false;
})
.catch(err => console.error('Error accessing media devices: ', err));
}
function stopRecording() {
recorder.stopRecording(() => {
const blob = recorder.getBlob();
recordedVideo.src = URL.createObjectURL(blob);
recordedVideo.controls = true;
startRecordingButton.disabled = false;
stopRecordingButton.disabled = true;
});
}
About this code:
This code creates a basic screen recorder tool using the RecordRTC library. The startRecording function starts recording the screen and audio, while the stopRecording function stops the recording and displays the recorded video. The HTML and CSS provide the structure and styling for the tool.
Comments
Post a Comment