MorphCast Dynamic Camera Selector
by morphcast
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MorphCast Dynamic Camera Selector</title>
<script src="https://ai-sdk.morphcast.com/v1.16/ai-sdk.js"></script>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.camera-controls {
margin-bottom: 20px;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
select, button {
padding: 8px 12px;
margin: 5px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #007bff;
color: white;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
button:disabled {
background-color: #6c757d;
cursor: not-allowed;
}
#status {
margin-top: 10px;
padding: 10px;
border-radius: 4px;
}
.status-success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.status-error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.status-info {
background-color: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
#video-preview {
margin-top: 20px;
}
video {
max-width: 100%;
border: 1px solid #ddd;
border-radius: 4px;
}
</style>
</head>
<body>
<h1>MorphCast Dynamic Camera Selector</h1>
<div...