L&K REMOVALS CRM

Video Library

Manage videos for your website

No videos yet. Add your first video to get started.

How to Embed Videos on Your Website

1. Copy Embed Code

Click the "Code" button on any video to copy its embed code.

2. Create VideoEmbed Component

Add this reusable component (create components/video/VideoEmbed.jsx):

import React from 'react';
import { base44 } from '@/api/base44Client';

export default function VideoEmbed({ video_id }) {
  const [video, setVideo] = React.useState(null);

  React.useEffect(() => {
    base44.entities.Video.get(video_id).then(setVideo);
  }, [video_id]);

  if (!video) return null;

  if (video.youtube_url) {
    const videoId = video.youtube_url.split('v=')[1];
    return <iframe width="100%" height="400" 
      src={`https://www.youtube.com/embed/${videoId}`}
      frameBorder="0" allowFullScreen />;
  }

  if (video.video_url) {
    return <video width="100%" height="400" controls>
      <source src={video.video_url} type="video/mp4" />
    </video>;
  }

  return null;
}

3. Use in Any Page

Import and use the component with the video ID:

import VideoEmbed from '@/components/video/VideoEmbed';

<VideoEmbed video_id="abc123" />
base44
Edit with Base44