Sunday, 27 July 2025

Video Transcript

 <!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

  <title>YouTube Transcription Interface</title>

  <style>

    body {

      font-family: Arial, sans-serif;

      margin: 20px;

      background-color: #f9f9f9;

    }

    .api-key-input {

      margin-bottom: 20px;

    }

    .api-key-input input {

      padding: 8px;

      width: 300px;

    }

    .video-container {

      margin-bottom: 20px;

    }

    .transcription-panel {

      border: 1px solid #ccc;

      padding: 15px;

      background: #fff;

      height: 300px;

      overflow-y: auto;

    }

    .transcription-line {

      margin-bottom: 10px;

    }

    .timestamp {

      color: #888;

      font-size: 0.9em;

    }

  </style>

</head>

<body>


  <h2>YouTube Video Transcription Interface</h2>


  <div class="api-key-input">

    <label for="apiKey">Enter API Key:</label>

    <input type="text" id="apiKey" placeholder="Your API Key here">

  </div>


  <div class="video-container">

    <iframe id="youtubeVideo" width="560" height="315" 

      src="https://www.youtube.com/embed/dQw4w9WgXcQ" 

      frameborder="0" allowfullscreen>

    </iframe>

  </div>


  <div class="transcription-panel" id="transcriptionPanel">

    <div class="transcription-line">

      <span class="timestamp">[00:01]</span> Never gonna give you up...

    </div>

    <div class="transcription-line">

      <span class="timestamp">[00:05]</span> Never gonna let you down...

    </div>

    <!-- Add more mock lines as needed -->

  </div>


  <script>

    // Example: Handle API key input (store for future use)

    const apiKeyInput = document.getElementById('apiKey');

    apiKeyInput.addEventListener('input', () => {

      const apiKey = apiKeyInput.value;

      console.log('API Key set to:',sk-b315ed15d15f449b85ab9448006d2245);

      // Store or use the API key as needed (e.g., fetch transcript)

    });


    // Placeholder: You could 

fetch real transcript here using the API key

  </script>


</body>

</html>

YouTube videos transcription

 <!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>YouTube Video Transcription</title>

    <style>

        body { font-family: Arial, sans-serif; margin: 2em; }

        .container { max-width: 600px; margin: auto; }

        label { display: block; margin-top: 1.2em; }

        input, textarea { width: 100%; padding: 0.7em; margin-top: 0.5em; }

        button { margin-top: 1.2em; padding: 0.7em 1.5em; }

        #transcription { min-height: 180px; background: #f7f7f7; margin-top: 1em; }

    </style>

</head>

<body>

<div class="container">

    <h2>YouTube Video Transcriber</h2>

    

    <label for="apiKey">API Key:</label>

    <input type="text" id="apiKey" placeholder="sk-b315ed15d15f449b85ab9448006d2245" />

    

    <label for="videoUrl">YouTube Video URL:</label>

    <input type="text" id="videoUrl" placeholder="Paste YouTube video link here..." />

    

    <button onclick="transcribeVideo()">Transcribe</button>

    

    <label for="transcription">Transcription:</label>

    <textarea id="transcription" readonly placeholder="Transcription will appear here..."></textarea>

</div>

<script>

    // This is a placeholder. Real implementation requires backend.

    function transcribeVideo() {

        const apiKey = document.getElementById('apiKey').value.trim();

        const videoUrl = document.getElementById('videoUrl').value.trim();

        const transcriptionBox = document.getElementById('transcription');

        if (!apiKey || !videoUrl) {

            transcriptionBox.value = 'Please enter both an API key and a YouTube video URL.';

            return;

        }

        transcriptionBox.value = 'Fetching transcription (demo only: integration needed with backend/API)...';

        // Here you would add JS logic to send the video URL and API key to your backend or API service.

    }

</script>

</body>

</html>