import React, { useState } from 'react'; import { Card } from '../ui/card'; import { Button } from '../ui/button'; import { Input } from '../ui/input'; import { Radio, Copy, Eye, EyeOff, Play, Square, Settings, Monitor, Mic, } from 'lucide-react'; import { useToast } from '../../context/ToastContext'; export const GoLiveView: React.FC = () => { const { addToast } = useToast(); const [streamKeyVisible, setStreamKeyVisible] = useState(false); const [isLive, setIsLive] = useState(false); const [title, setTitle] = useState('My Awesome Stream'); const [category, setCategory] = useState('Production'); const streamKey = 'live_83921_abc123xyz789_secret_key'; const serverUrl = 'rtmp://live.veza.io/app'; const copyToClipboard = (text: string, label: string) => { navigator.clipboard.writeText(text); addToast(`${label} copied to clipboard`, 'success'); }; const toggleStream = () => { if (!isLive) { addToast('Starting stream... Waiting for signal...', 'info'); setTimeout(() => { setIsLive(true); addToast('You are LIVE!', 'success'); }, 2000); } else { setIsLive(false); addToast('Stream ended', 'info'); } }; return (
{/* Header */}

BROADCAST STUDIO

Configure your stream and go live.

{isLive ? 'LIVE' : 'OFFLINE'}
{/* Left: Preview & Info */}
{/* Preview Player */}
{isLive ? (
{/* Mock live feed */}

Receiving Stream Data...

) : (

Stream Offline

Connect OBS to start preview

)}
1080p 60fps
{/* Stream Info Form */}

Stream Information

setTitle(e.target.value)} />
{/* Right: Setup Keys */}

Encoder Setup

Never share your stream key!

Quick Instructions

  1. Open OBS or Streamlabs.
  2. Go to Settings {'>'} Stream.
  3. Select "Custom" service.
  4. Paste Server URL and Stream Key.
  5. Start Streaming in OBS.
Microphone
); };