gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
create a full html file of a video only version of instagram. there is no sign up and…
- User
create a full html file of a video only version of instagram. there is no sign up and sign in.
- Assistant
create a full html file of a video only version of instagram. there is no sign up and sign in.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>InstaVideo - Video Only Instagram</title>
<style>
/* Reset and basic styles */
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
background-color: #000;
color: #fff;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
header {
height: 60px;
background: #111;
display: flex;
align-items: center;
border-bottom: 1px solid #222;
padding: 0 16px;
font-weight: 700;
font-size: 1.5rem;
letter-spacing: 0.05em;
user-select: none;
}
main {
flex: 1;
overflow-y: auto;
background: #000;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 0 20px 0;
}
.video-post {
margin: 20px 0;
width: 100%;
max-width: 600px;
background: #111;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 0 10px rgba(255 255 255 / 0.1);
display: flex;
flex-direction: column;
}
.video-post video {
width: 100%;
height: auto;
background: #000;
display: block;
}
.video-info {
padding: 12px 16px;
font-size: 0.9rem;
line-height: 1.2;
color: #aaa;
user-select: text;
}
.video-info .username {
color: #fff;
font-weight: 700;
margin-right: 8px;
}
/* Custom scrollbar for main */
main::-webkit-scrollbar {
width: 8px;
}
main::-webkit-scrollbar-track {
background: #111;
}
main::-webkit-scrollbar-thumb {
background-color: #444;
border-radius: 4px;
}
/* Responsive */
@media (max-width: 650px) {
.video-post {
max-width: 100%;
border-radius: 0;
margin: 12px 0;
}
}
</style>
</head>
<body>
<header>InstaVideo</header>
<main id="feed">
<!-- Video posts will be appended here -->
</main>
<script>
// Sample video posts data (public domain or free videos URLs)
// Because CORS restrictions may apply, we will use videos from sample sources or embed small videos.
const videoPosts = [
{
username: "naturelover",
description: "Beautiful waterfall in the forest",
src: "https://cdn.videvo.net/videvo_files/video/free/2019-10/small_watermarked/190715_05_Drone_Forest_05_preview.webm"
},
{
username: "cityvibes",
description: "Timelapse of city traffic at night",
src: "https://cdn.videvo.net/videvo_files/video/free/2016-09/small_watermarked/160813_C_19_StreetTimelapse_preview.webm"
},
{
username: "oceanwaves",
description: "Waves crashing on the shore",
src: "https://cdn.videvo.net/videvo_files/video/free/2019-03/small_watermarked/190213_07_Del_mar_Beach_Pier_4k_006_preview.webm"
},
{
username: "skyhunter",
description: "Beautiful clouds moving fast",
src: "https://cdn.videvo.net/videvo_files/video/free/2015-09/small_watermarked/150803_04_Sky_04_preview.webm"
},
{
username: "wildlife123",
description: "Bird flying over lake",
src: "https://cdn.videvo.net/videvo_files/video/free/2019-02/small_watermarked/190125_05_Bird_Fly_01_preview.webm"
}
];
const feedEl = document.getElementById('feed');
// Create and append each video post
videoPosts.forEach(post => {
const postEl = document.createElement('article');
postEl.className = 'video-post';
const videoEl = document.createElement('video');
videoEl.src = post.src;
videoEl.controls = false;
videoEl.muted = true;
videoEl.loop = true;
videoEl.playsInline = true;
videoEl.preload = "metadata";
videoEl.style.backgroundColor = '#000';
// Autoplay video when it can play; muted is required for autoplay in most browsers
videoEl.addEventListener('canplay', () => {
videoEl.play().catch(() => {});
});
// Play/pause toggle on click
videoEl.addEventListener('click', () => {
if (videoEl.paused) {
videoEl.play();
} else {
videoEl.pause();
}
});
const infoEl = document.createElement('div');
infoEl.className = 'video-info';
// format: @username description
infoEl.innerHTML = `<span class="username">@${post.username}</span>${post.description}`;
postEl.appendChild(videoEl);
postEl.appendChild(infoEl);
feedEl.appendChild(postEl);
});
// Optional: Auto pause/play videos based on viewport visibility (improve performance & UX)
// Use IntersectionObserver
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
const video = entry.target;
if (entry.isIntersecting) {
video.play().catch(() => {});
} else {
video.pause();
}
});
}, {
threshold: 0.6 // play when 60% visible
});
// Observe all videos
document.querySelectorAll('video').forEach(video => {
observer.observe(video);
});
</script>
</body>
</html>
Not yet included in a published release.