Modify Laravel Video Upload System to Accept All Iframe Embed Codes
Budget: $10 – $30 USD
We have a Laravel-based video streaming platform (based on the Streamit 1.5.1 template) that currently supports video uploads via local file, YouTube, or Vimeo embeds.
However, we want to extend support to allow any valid iframe embed code, including links from third-party hosts like StreamTape, DoodStream, JevyPeli, etc. Right now, the system shows a validation error like:
“Please enter a valid embed code or iframe URL.”
when trying to embed anything other than YouTube or Vimeo.
What Needs to Be Done:
Frontend Validation (Blade/JavaScript):
Update the form in create.blade.php to allow any iframe (not just YouTube/Vimeo).
Modify or disable JavaScript validation that currently restricts to specific domains.
Backend Controller:
Ensure the VideosController.php accepts and stores full iframe embed code as-is when video_upload_type === 'Embedded'.
View/Playback Compatibility:
Ensure that videos saved via generic iframe are rendered correctly in the frontend and play within the video detail page.
Optional Enhancements:
Add a warning if the iframe format is incorrect (e.g., not wrapped in <iframe> tags).
Add basic sanitization for security (e.g., strip scripts or external JS from iframe input).
Stack Details:
Laravel 9.x
Blade templating
JavaScript (vanilla) for form validation
Streamit 1.5.1 frontend theme
Goal:
We want to support any valid iframe as an embed code for videos. The current YouTube/Vimeo-only restriction needs to be removed without breaking anything else in the video upload or playback flow.
However, we want to extend support to allow any valid iframe embed code, including links from third-party hosts like StreamTape, DoodStream, JevyPeli, etc. Right now, the system shows a validation error like:
“Please enter a valid embed code or iframe URL.”
when trying to embed anything other than YouTube or Vimeo.
What Needs to Be Done:
Frontend Validation (Blade/JavaScript):
Update the form in create.blade.php to allow any iframe (not just YouTube/Vimeo).
Modify or disable JavaScript validation that currently restricts to specific domains.
Backend Controller:
Ensure the VideosController.php accepts and stores full iframe embed code as-is when video_upload_type === 'Embedded'.
View/Playback Compatibility:
Ensure that videos saved via generic iframe are rendered correctly in the frontend and play within the video detail page.
Optional Enhancements:
Add a warning if the iframe format is incorrect (e.g., not wrapped in <iframe> tags).
Add basic sanitization for security (e.g., strip scripts or external JS from iframe input).
Stack Details:
Laravel 9.x
Blade templating
JavaScript (vanilla) for form validation
Streamit 1.5.1 frontend theme
Goal:
We want to support any valid iframe as an embed code for videos. The current YouTube/Vimeo-only restriction needs to be removed without breaking anything else in the video upload or playback flow.