PHPackages                             takepart-media/vidiq - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. takepart-media/vidiq

ActiveStatamic-addon[File &amp; Storage](/categories/file-storage)

takepart-media/vidiq
====================

Statamic addon for 3q.video hosting platform integration

1.0.3(1mo ago)017↓50%MITPHPPHP ^8.3

Since Mar 4Pushed 1mo agoCompare

[ Source](https://github.com/takepart-media/vidiq)[ Packagist](https://packagist.org/packages/takepart-media/vidiq)[ Docs](https://github.com/takepart-media/vidiq)[ RSS](/packages/takepart-media-vidiq/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (5)Used By (0)

vidiQ — 3q.video Integration for Statamic
=========================================

[](#vidiq--3qvideo-integration-for-statamic)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0f5da4ac5eb8acb6454fa49089756cdbc899a73b9c9ebd0d44190d96c61ab436/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74616b65706172742d6d656469612f76696469712e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/takepart-media/vidiq)[![License](https://camo.githubusercontent.com/e204bec820073bac80f6efa1e1d73725fbcad984a5c91f339bcc5824fdf7f5a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f74616b65706172742d6d656469612f76696469712e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/takepart-media/vidiq)[![PHP Version](https://camo.githubusercontent.com/1d2a79a3f22524bc723ed318b18e36a93b488d287736edf0abbe47e3dbadae68/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f74616b65706172742d6d656469612f76696469712e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/takepart-media/vidiq)[![Statamic](https://camo.githubusercontent.com/f1bece75e94f109bc35d2690cf27d40bbeb736d10203389d00f397d65356b12d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746174616d69632d352e782d4646323639453f7374796c653d666c61742d737175617265)](https://statamic.com)

A Statamic addon that integrates the [3q.video](https://3q.video) hosting platform into the Statamic Control Panel asset browser. Videos hosted on 3q appear as browsable, deletable assets with thumbnail previews. A Blade component is provided for embedding videos in frontend templates.

This addon has only been tested with **Statamic 5** and **3Q's SDN API v2**.

Features
--------

[](#features)

- **Asset browser integration** — 3Q videos appear in Statamic's CP file browser with thumbnail previews
- **Read-only (for now)** — browse videos directly from the CP; write operations (upload, delete, rename, move) are currently unsupported — manage content in 3Q's own dashboard. Full write support may be added in a future release.
- **Cache warm-up command** — `vidiq:warm-cache` Artisan command pre-populates listing and embed-code caches during deployment
- **Flysystem v3 adapter** — custom `ThreeQAdapter` implements the Flysystem interface backed by the 3Q SDN API
- **Embed codes** — fetches the full `FileEmbedCodes` array per video via the 3Q playout API (cached)
- **Virtual meta files** — generates `.meta/` YAML on the fly so Statamic stores title, thumbnail URL and video ID without writing to disk
- **Blade component** — `` for embedding the 3Q player in frontend templates

Requirements
------------

[](#requirements)

- PHP 8.2+
- Statamic 5.x
- GuzzleHTTP 7.x
- A [3q.video](https://3q.video) account with API access

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require takepart-media/vidiq
```

Statamic will auto-discover the addon's service provider. No additional registration steps are needed.

### Environment variables

[](#environment-variables)

Add the following to your `.env` file:

```
VIDIQ_API_TOKEN=your-api-token-here
VIDIQ_PROJECT_ID=your-project-id-here

# Optional — defaults shown
VIDIQ_API_ENDPOINT=https://sdn.3qsdn.com/api
VIDIQ_API_TIMEOUT=30
```

### Asset container

[](#asset-container)

Create `content/assets/vidiq.yaml` in your Statamic project:

```
title: '3Q Videos'
disk: 3q
allow_uploads: false
allow_downloading: false
allow_renaming: false
allow_moving: false
create_folders: false
```

Statamic will display this container as **"3Q Videos"** in the CP under **Assets**.

How It Works
------------

[](#how-it-works)

### Flysystem adapter (`ThreeQAdapter`)

[](#flysystem-adapter-threeqadapter)

The adapter connects to the 3Q SDN REST API and implements `League\Flysystem\FilesystemAdapter`:

OperationBehaviour`listContents`Fetches all files from `GET /v2/projects/{id}/files` and yields `FileAttributes`. Listing is cached for 10 minutes.`fileExists`Resolved from the listing cache.`read` / `readStream`For `.meta/` paths: returns generated YAML. For asset paths: streams the video thumbnail from 3Q for Statamic/Glide to cache.`delete`Accepted only for `.meta/` paths (no-op, virtual files have no remote counterpart). All other paths throw `UnableToDeleteFile`.`getUrl`Calls `GET /v2/projects/{id}/files/{fileId}/playouts/default/embed` and returns the full `FileEmbedCodes` array (e.g. `JavaScript`, `PlayerURL`). Cached per file ID via `VIDIQ_CACHE_TTL`.`write` / `writeStream`Accepted only for `.meta/` paths (Statamic metadata edits stored in Laravel cache). All other writes throw `UnableToWriteFile`.`move`, `copy`, `createDirectory`, `deleteDirectory`Not supported; throw the corresponding Flysystem exceptions.#### Path convention

[](#path-convention)

Each video's path is its sanitized display title (e.g. `My Interview.mp4`). If two videos share the same title, the last 6 characters of the FileId are appended to avoid collisions. The FileId→path mapping is stored in the listing cache.

#### Virtual meta files

[](#virtual-meta-files)

`listContents` also yields a virtual `.meta/{path}.yaml` entry for every video. This YAML contains:

```
size: 12345678
last_modified: 1700000000
mime_type: 'video/mp4'
data:
  alt: 'Video title'
  thumbnail_url: 'https://...'
  video_id: '12345678'
```

Statamic reads this file automatically; because the file exists virtually, Statamic skips calling `writeMeta()` and leaves the adapter's read-only behaviour intact.

### Thumbnail injection (CP JavaScript)

[](#thumbnail-injection-cp-javascript)

Statamic's asset browser only renders thumbnail images for assets where `is_image: true`. The addon registers an Axios response interceptor (via `Statamic.booted()`) that:

1. Intercepts the folder API response for the `vidiq` container (`GET /cp/assets/browse/folders/vidiq`).
2. Fetches the thumbnail map from the addon's own endpoint (`GET /cp/vidiq/assets`), once per page load.
3. Injects `is_image: true` and `thumbnail: ` into each asset object before Vue renders the list.

Blade Component
---------------

[](#blade-component)

### ``

[](#x-vidiqembed)

Embeds a 3Q video using one of three output methods. The method defaults to the config value `vidiq.embed_fallback_method` (default: `JavaScript`).

```
{{-- Default method from config --}}

{{-- Explicit method --}}

```

**Props**

PropTypeDefaultDescription`asset``Statamic\Assets\Asset|null``null`The asset object. Renders nothing if `null` or if no player URL can be resolved.`method``string|null``config('vidiq.embed_fallback_method')`Embed output method: `JavaScript`, `iFrame`, or `PlayerURL`.**Methods**

ValueOutput`JavaScript`Renders the JS embed snippet (`{!! $embedCodes['JavaScript'] !!}`) provided by 3Q.`iFrame`Renders an `` with the `PlayerURL` as `src` and the `video-embed` CSS class.`PlayerURL`Outputs only the plain player URL string (useful for custom markup or JS integration).Configuration
-------------

[](#configuration)

### `config/vidiq.php` (addon)

[](#configvidiqphp-addon)

KeyEnv variableDefaultDescription`api.token``VIDIQ_API_TOKEN`—3Q API token`api.endpoint``VIDIQ_API_ENDPOINT``https://sdn.3qsdn.com/api`3Q API base URL`api.timeout``VIDIQ_API_TIMEOUT``30`HTTP timeout in seconds`cache.ttl``VIDIQ_CACHE_TTL``3600`Cache TTL in seconds for listings and embed codes`embed_fallback_method``VIDIQ_FALLBACK_METHOD``JavaScript`Default embed method (`JavaScript`, `iFrame`, `PlayerURL`)### `config/vidiq-disk.php` (addon)

[](#configvidiq-diskphp-addon)

Configures the `3q` Laravel filesystem disk that is registered automatically by the ServiceProvider. The disk uses the custom `3q` driver backed by `ThreeQAdapter`.

Multiple Projects
-----------------

[](#multiple-projects)

To connect a second 3Q project, add another disk entry in `config/filesystems.php` and a matching asset container YAML:

```
// config/filesystems.php
'3q-project-b' => [
    'driver'     => '3q',
    'api_token'  => env('VIDIQ_PROJECT_B_API_TOKEN', ''), // or use your default token VIDIQ_API_TOKEN
    'project_id' => env('VIDIQ_PROJECT_B_PROJECT_ID', ''),
    'endpoint'   => env('VIDIQ_API_ENDPOINT', 'https://sdn.3qsdn.com/api'),
    'timeout'    => env('VIDIQ_API_TIMEOUT', 30),
],
```

```
# content/assets/vidiq-project-b.yaml
title: '3Q Videos — Project B'
disk: 3q-project-b
allow_uploads: false
allow_downloading: false
allow_renaming: false
allow_moving: false
create_folders: false
```

After that update `.env` with the new credentials and clear or refresh caches:

```
php artisan cache:clear
php artisan config:clear
```

Development
-----------

[](#development)

Clone the repository and install dependencies:

```
git clone https://github.com/takepart-media/vidiq.git
cd vidiq
composer install
npm install
```

### Build CP assets

[](#build-cp-assets)

```
npm run dev      # Vite dev server
npm run build    # Production build
```

### Cache management

[](#cache-management)

#### Warm the cache

[](#warm-the-cache)

Pre-populate the video listing cache (and optionally embed codes) so the first frontend request avoids an API round-trip:

```
php artisan vidiq:warm-cache           # Warm listing cache only
php artisan vidiq:warm-cache --embed   # Also pre-fetch embed codes for every video
```

This is intended to run once during deployment (e.g. in a post-deploy script or CI pipeline).

#### Flush caches

[](#flush-caches)

```
php artisan cache:clear                # Flush all Laravel caches (including vidiq)
php artisan statamic:stache:clear      # Clear Statamic file cache
php artisan config:clear               # Clear Laravel config cache
```

The `vidiq:warm-cache` command automatically flushes all vidiq-specific cache entries (listing, embed codes, meta edits) before re-populating.

License
-------

[](#license)

The MIT License (MIT). Please see the [LICENSE](LICENSE) file for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance92

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

4

Last Release

37d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68af371ee0a4219abacbe3e7ea6b79ce485160cd7a482ce325b2c0b8ead3e76a?d=identicon)[takepart-media](/maintainers/takepart-media)

---

Top Contributors

[![Gabor-Kiss-TP](https://avatars.githubusercontent.com/u/231195318?v=4)](https://github.com/Gabor-Kiss-TP "Gabor-Kiss-TP (6 commits)")

---

Tags

Flysystemvideoassetaddonstatamic3q3q.video

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/takepart-media-vidiq/health.svg)

```
[![Health](https://phpackages.com/badges/takepart-media-vidiq/health.svg)](https://phpackages.com/packages/takepart-media-vidiq)
```

###  Alternatives

[masbug/flysystem-google-drive-ext

Flysystem adapter for Google Drive with seamless virtual&lt;=&gt;display path translation

2631.7M14](/packages/masbug-flysystem-google-drive-ext)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[shitware-ltd/flysystem-msgraph

A Flysystem 3.0 adapter for Sharepoint 365 / OneDrive using Microsoft Graph API with support for uploading large files

19360.4k3](/packages/shitware-ltd-flysystem-msgraph)[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

2381.5k10](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
