Download the PHP package takepart-media/vidiq without Composer

On this page you can find all versions of the php package takepart-media/vidiq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vidiq

vidiQ — 3q.video Integration for Statamic

Latest Version on Packagist License PHP Version Statamic

A Statamic addon that integrates the 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

Requirements

Installation

Install the package via Composer:

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

Environment variables

Add the following to your .env file:

Asset container

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

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

How It Works

Flysystem adapter (ThreeQAdapter)

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

Operation Behaviour
listContents Fetches all files from GET /v2/projects/{id}/files and yields FileAttributes. Listing is cached for 1 hour by default (configurable via VIDIQ_CACHE_TTL).
fileExists Resolved from the listing cache.
read For .meta/ paths: returns generated YAML. Direct reads of asset paths are not supported and throw UnableToReadFile.
readStream For .meta/ paths: streams the generated YAML. For asset paths: downloads 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

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

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

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

CP JavaScript (thumbnail injection, status strips & player)

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 enriches several CP views:

  1. Asset browser — intercepts folder listing responses for any 3Q-backed container, fetches the thumbnail & status map from GET /cp/vidiq/assets (once per page load), and injects is_image: true + thumbnail: <url> into each asset object. A coloured left-edge strip is added to each thumbnail to indicate the release status (green = published, yellow = unpublished, grey = draft).
  2. Asset editor — when a 3Q video is opened in the editor modal, the default <video> element is replaced with a 3Q player iframe fetched from GET /cp/vidiq/player-url.
  3. Assets fieldtype — when an entry form contains an Assets field referencing a 3Q container, the interceptor injects thumbnails and status indicators into the fieldtype row display.

Blade Component

<x-vidiq::embed>

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

Props

Prop Type Default Description
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

Value Output
JavaScript Renders the JS embed snippet ({!! $embedCodes['JavaScript'] !!}) provided by 3Q.
iFrame Renders an <iframe> 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

config/vidiq.php (addon)

Key Env variable Default Description
cache.ttl VIDIQ_CACHE_TTL 3600 Cache TTL in seconds for listings and embed codes
cache.permanent VIDIQ_CACHE_PERMANENT false When true, caches are stored forever (ignores TTL)
cache.prefix vidiq Prefix for all cache keys (scoped per project ID)
embed_fallback_method VIDIQ_FALLBACK_METHOD JavaScript Default embed method (JavaScript, iFrame, PlayerURL)

config/vidiq-disk.php (addon)

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

Key Env variable Default Description
api_token VIDIQ_API_TOKEN 3Q API token
project_id VIDIQ_PROJECT_ID 3Q project identifier
endpoint VIDIQ_API_ENDPOINT https://sdn.3qsdn.com/api 3Q API base URL
timeout VIDIQ_API_TIMEOUT 30 HTTP timeout in seconds

Multiple Projects

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

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

Development

Clone the repository and install dependencies:

Build CP assets

Cache management

CP Utility

The addon registers a vidiQ Cache utility in the Statamic Control Panel under Utilities → vidiQ Cache. It displays the number of cached videos and the current cache mode (TTL or Permanent). Two actions are available:

Warm the cache (CLI)

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

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

Flush caches

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

License

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


All versions of vidiq with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
statamic/cms Version ^5.0 || ^6.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package takepart-media/vidiq contains the following files

Loading the files please wait ...