Download the PHP package ayacoo/video-validator without Composer
On this page you can find all versions of the php package ayacoo/video-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ayacoo/video-validator
More information about ayacoo/video-validator
Files in ayacoo/video-validator
Package video-validator
Short Description Checks online videos in TYPO3 for availability
License GPL-2.0-or-later
Homepage https://www.ayacoo.de
Informations about the package video-validator
TYPO3 Extension video_validator
1 Features
- Checks if your YouTube or Vimeo videos are still available in the TYPO3 project
- Can send you reports by email
- Can use a custom report service
- Can also check more media extensions through flexible extensibility
2 Usage
2.1 Installation
Installation using Composer
The recommended way to install the extension is using Composer.
Run the following command within your Composer based TYPO3 project:
Do not forget to activate the extension in the extension manager and to update the database once, so that the two new fields are added.
2.2 Setting up tasks / How do the tasks work together? (TYPO3 Integrator stuff)
The tasks can be set up via CLI (see Developer Corner) or directly in the scheduler.
In the scheduler we create a new task Execute console commands
. The
schedulable command videoValidator:validate
should be set up first.
This command regularly checks YouTube and Vimeo videos and stores information
about the status and crawl time in the data set.
TODO Screenshot
Afterwards, we create a task 'videoValidator:report' in the same scheme. Note the settings here and define at least one recipient.
TODO Screenshot
3 FAQ
3.1 How it works
EXT:video_validator fetches all files from the sys_file table that are linked to this media extension, e.g. YouTube. Thereby a validation_date is considered.
If the video list has been worked through, the videos are checked again by default after 7 days. These settings can be overwritten for the respective task.
Using the oEmbed API of the providers, you can read the status of a video without an API key. Private videos are marked as faulty, but cannot be saved in TYPO3 anyway. Note the difference between private videos and unlisted videos!
3.2 Supported media extensions
- YouTube
- Vimeo
- Custom media extension, see developer doc
3.3 What do I do if a video is not accessible?
It may happen that at some point videos are no longer accessible. These are listed in the report mail as invalid videos. TYPO3 offers a number next to the file in the file list. If you click on it, all references to this file are listed. Now you can take care of the corresponding corrections.
4 Administration corner
4.1 Versions and support
Version | TYPO3 | PHP | Support / Development |
---|---|---|---|
4.x | 13.x | 8.2 - 8.3 | features, bugfixes, security updates |
3.x | 12.x | 8.1 | bugfixes, security updates |
2.x | 10.x - 11.x | 7.4 - 8.0 | bugfixes, security updates |
Hint: Version 1 users should update to version 2
4.2 Release Management
video_validator uses semantic versioning, which means, that
- bugfix updates (e.g. 1.0.0 => 1.0.1) just includes small bugfixes or security relevant stuff without breaking changes,
- minor updates (e.g. 1.0.0 => 1.1.0) includes new features and smaller tasks without breaking changes,
- and major updates (e.g. 1.0.0 => 2.0.0) breaking changes which can be refactorings, features or bugfixes.
5 Developer corner (TYPO3 Developer stuff)
5.1 CLI calls
The calls can be retrieved directly via CLI or you can set up corresponding jobs in the scheduler. Advantage of the scheduler: The TYPO3 is displayed correctly in the mail: https://forge.typo3.org/issues/93940
It is unclear how many fast accesses in a row the oEmbed API allows as a maximum. Therefore, it is better to think small limits.
videoValidator:validate
Validates a defined number of videos for the defined media extension
Example:
Example for fetching only videos that are referenced on visible, non-deleted pages within visible, non-deleted references:
You can specify the --referenceRoot
option to specify a PageRoot UID where to
search for references. 0
by default means all available roots.
Pay attention to using the right upper/lowercase media extension
names (YouTube
instead of YouTube
), which are defined by the name of the
Validator instance.
videoValidator:report
Create an email report of YouTube videos from the last 7 days
Example:
The same referencedOnly
and referenceRoot
options like
in videoValidator:validate
are available.
videoValidator:reset
Resets all video states of a media extension.
Example:
videoValidator:count
Counts all videos of a media extension. This will help you to decide which limits you can work with.
Example:
5.2 Register your custom validator
EXT:video_validator is built in such a way that other media extensions can also be checked. For this, the media extension must be registered in and you must register a validator via an event.
As example you can use the EXT:tiktok.
EventListener registration
EventListener
Custom validator
With the custom validator you have to pay attention to the interface, so that you have a correct structure for the checks.
5.3 Register your custom report
There is also the possibility to register your own report services. For example, you can export the video list to a XML or CSV file. Or maybe sending a slack message?
EventListener registration
EventListener
Custom report
5.4 Email settings
To define a sender for the email, the configuration from the Install Tool is used.
Because the FluidEmail is used by TYPO3, you can of course also easily overwrite the template for the status email.
6 Support
If you are happy with the extension and would like to support it in any way, I would appreciate the support of social institutions.
7 Thanks / Notices
Special thanks to Georg Ringer and his news extension. A good template to build a TYPO3 extension. Here, for example, the structure of README.md is used.
Thanks to Garvin Hicking for adding ReferencedOnly/ReferenceRoot functionality.
And thanks to all who have tested and improved this extension.