Menu

Handling video and podcast links in a Laravel app with queued jobs
🎙️

Handling video and podcast links in a Laravel app with queued jobs

DEV Community: laravel·Yusuf Yildiz·9 days ago
#KUDcGnRW
#devtolaravel#devto#dev#importly#function
Long article (1359 words) — no AI summary yet.
Reading 0:00
15s threshold

A lot of Laravel apps end up with the same feature: a user pastes a YouTube, TikTok or podcast link, and the app needs the transcript or the file. It usually works on your machine. Then it runs on a server and the media job is the one that breaks: sites block datacenter IPs, and plenty of videos have no captions to read.

I built Importly for this, so that's what this post calls. You send it a link and get back the transcript, a download link for the file, or the video's details, and it works from servers. The part worth getting right in Laravel is the queue side, so that's most of this post.

Long imports can take a few minutes, so don't hold a worker for them. One job starts the Importly job and stores its ID, and a second job checks the status and dispatches itself again 20 seconds later until it's done.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.