takepart-media/vidiq
A Laravel package for integrating the VidIQ API, offering a simple client to access YouTube analytics, keyword insights, and video SEO data with configuration and Laravel-friendly service bindings.
Vidiq is TakePart Media's Laravel package for rendering video embeds. The 3.1.3 patch is a small, targeted change (removal of a legacy script from JS embeds), so if you are already on 3.1.x this is a drop-in composer update takepart-media/vidiq.
Install and publish
composer require takepart-media/vidiq
php artisan vendor:publish --tag=vidiq-config
Check whether the package also ships migrations or view overrides and publish those tags too — the readme lists the exact tags for your version.
Read config/vidiq.php first. This is where player defaults, script/CDN URLs, and embed markup options live. Almost every "why does my embed look like that" question is answered here rather than in your Blade files.
Clear config cache after install/upgrade
php artisan config:clear && php artisan view:clear
First use case: render a single video in a Blade view using the package's embed helper/component (confirm the exact name in the readme for 3.1.x), pass your video identifier, and view source to confirm the markup. That raw HTML is the ground truth for every later debugging session.
Keep embed rendering in one place. Rather than scattering the package's helper across dozens of views, wrap it in a single Blade partial or a small VideoEmbed view component. When the package changes its output (as in 3.1.3), you have one file to reason about instead of a grep across resources/views.
Store references, not markup. Persist the video ID/URL on your model and render at request time. Caching a rendered embed string in the database means an upgrade like 3.1.3 silently fails to reach existing content.
Cache the rendered output, keyed by package version. Embeds are expensive to assemble and rarely change:
Cache::remember("video.embed.{$video->id}.".config('vidiq.version'), now()->addDay(), fn () => ...);
Bust the cache on deploy so the 3.1.3 markup change actually lands in production.
Sanitize and scope output. Embeds are raw HTML by definition. Only render content from trusted sources (your own CMS fields, curated IDs), and never interpolate user-supplied strings into embed attributes without escaping.
Test the markup, not the player. In feature tests, assert on the rendered HTML — presence of the iframe/script tags, correct video ID in the URL, and absence of removed legacy assets. This is exactly how you catch the 3.1.3 script removal before it reaches users.
Consistent responsive wrapper. Put your aspect-ratio/CSS wrapper in your own partial around the package output rather than relying on the package's inline styles, so a markup change doesn't shift your layout.
sdnplayer.js from JavaScript embeds. If any of your own JS calls into that legacy player's global API, or if you were relying on the script being present on the page, it is now gone and must be included yourself. Grep your resources/js and any inline scripts for sdnplayer before upgrading. If nothing references it, the upgrade is safe.config:clear, view:clear, and rebuild front-end assets before concluding the upgrade broke something.DOMContentLoaded listeners expecting the player to exist), retest them.composer.json (^3.1) and review the changelog on each bump — this package ships frequent small markup fixes, and markup fixes are the ones that quietly break front-end assumptions.vendor/ is not.{{-- dd($embed) --}} or ->toHtml()) rather than inspecting the live DOM — the browser has already executed scripts and mutated the markup by the time you look at DevTools.How can I help you explore Laravel packages today?