Repository navigation
Technical Plugin AD_Server
Selects advertising campaigns and generates VAST/VMAP responses.
Audience: developers, advanced administrators and AI-assisted diagnosis. Plugin catalog.
- Review date: 2026-10-29. Method: static source analysis; runtime/provider behavior was not exercised.
- Code ownership: AVideo Streamer repository.
- Reported version:
5.0. - Source revision:
7d48f2dfc0289236718a3f9fba7c5ffecff4a37f. - Entry class file: AD_Server.php.
Confirm the installed plugin version independently of the Streamer version. Configuration defaults below are not a dump of this installation's saved settings.
| Plugin | Required by declaration | Source reason |
|---|---|---|
| AD_Server_Location | Optional | Optional geographic targeting for VAST campaigns |
| GoogleAds_IMA | Optional | Optional fallback/alternate ad rendering integration |
| YPTWallet | Optional | Optional per-view ad revenue payout to the wallet |
Literal runtime plugin references: AD_Server_Location, User_Location, YPTWallet. These calls do not mean every referenced plugin is mandatory.
| Override | Implementation |
|---|---|
getTags() |
AD_Server.php:45 |
afterNewVideo($videos_id) |
AD_Server.php:173 |
getHeadCode() |
AD_Server.php:237 |
afterVideoJS() |
AD_Server.php:294 |
getPluginMenu() |
AD_Server.php:480 |
onNewVideo($videos_id) |
AD_Server.php:509 |
These are direct assignments inside getEmptyDataObject(), not evaluated effective defaults. Stored plugins.object_data, globals, structured values and conditional branches may alter runtime behavior. Private/default credential values are omitted.
| Field | Literal default or expression type | Literal source label/help | Evidence |
|---|---|---|---|
prerollLive |
true |
Pre Roll Live Stream | source |
start |
true |
Show Pre-Roll ads | source |
mid25Percent |
true |
Show Mid-Roll ads at 25% | source |
mid50Percent |
true |
Show Mid-Roll ads at 50% | source |
mid75Percent |
true |
Show Mid-Roll ads at 75% | source |
end |
true |
Show Post-Roll ads | source |
skipoffset |
Computed/structured; inspect source | Skip Offset: This is the percentage where the skip button should appear | source |
showMarkers |
true |
Show Markers: Check it if you want to show the yellow markers on the video, where the advertising should appear | source |
showAdsOnEachVideoView |
Computed/structured; inspect source | Show Ads on: This defines how often advertisements will appear, for example: if it is set to 2, you will see ads each 2 videos, but if it is set to 1 you will see ads on every video | source |
showAdsOnRandomPositions |
Computed/structured; inspect source | Show Ads On Positions: This will pick random positions to display the ads, but it will pic only the positions you have checked above. For example, if you want to have 2 random positions, but do not want to have videos on the start position, you must uncheck the start video position checkbox; | source |
autoAddNewVideosInCampaignId |
Computed/structured; inspect source | Auto Add New Videos In Campaign | source |
autoAddNewVideosInCampaignId |
Computed/structured; inspect source | Auto Add New Videos In Campaign | source |
onlyRewardLoggedUsers |
true |
Rewards for impressions in your campaigns will only be given to logged-in users | source |
This inventory distinguishes implementation files from an API specification. Includes, templates, callbacks and CLI workers are not interchangeable HTTP endpoints. Request-field names below are direct source references, not a complete schema or permission declaration.
| File | Source role | Direct request fields observed |
|---|---|---|
| AD_Server.php | plugin entry class |
return_vars, video_length, vmap_id, vmaps
|
| Objects/VastCampaigns.php | class/helper implementation | — |
| Objects/VastCampaignsLogs.php | class/helper implementation | — |
| Objects/VastCampaignsVideos.php | class/helper implementation | — |
| VAST.php | PHP page/include/worker; inspect caller |
campaign_has_videos_id, campaign_id, imagesOnly
|
| VMAP.php | PHP page/include/worker; inspect caller |
video_length, vmap_id, vmaps
|
| footer.php | PHP page/include/worker; inspect caller | — |
| getCSV.php | PHP page/include/worker; inspect caller |
downloadNow, end_date, start_date, vast_campaigns_id
|
| getData.json.php | JSON entry point; inspect caller and guard | — |
| index.php | PHP page/include/worker; inspect caller | — |
| index_body.php | PHP page/include/worker; inspect caller | — |
| index_head.php | PHP page/include/worker; inspect caller | — |
| install/install.sql | schema/migration SQL | — |
| install/updateV3.0.sql | schema/migration SQL | — |
| install/updateV4.0.sql | schema/migration SQL | — |
| install/updateV5.0.sql | schema/migration SQL | — |
| log.php | PHP page/include/worker; inspect caller |
campaign_has_videos_id, label, video_position, videos_id
|
| reports.json.php | JSON entry point; inspect caller and guard |
campaignType, endDate, eventType, referrerType, reportType, startDate, users_id, vast_campaigns_id, videos_id
|
| reports.php | PHP page/include/worker; inspect caller | — |
| videojs-markers/videojs-markers.js | browser/worker JavaScript; verify loader | — |
| view/addCampaign.php | PHP page/include/worker; inspect caller |
campId, city_name, country_name, end_date, maxPrints, name, region_name, reward_per_impression, start_date, status
|
| view/addCampaignVideo.php | PHP page/include/worker; inspect caller |
inputVideoAd_id, title, uri, vast_campaigns_id, videos_id
|
| view/campaigns.json.php | JSON entry point; inspect caller and guard | — |
| view/campaignsVideos.json.php | JSON entry point; inspect caller and guard | id |
| view/deleteCampaign.json.php | JSON entry point; inspect caller and guard | id |
| view/deleteCampaignVideo.json.php | JSON entry point; inspect caller and guard | id |
Tables named in available CREATE TABLE statements: vast_campaigns, vast_campaigns_has_videos, vast_campaigns_logs.
Apply installation/update behavior through the owning plugin; this reference is not a script for running historical migrations manually.
Visibility and implementation semantics must be checked in source. Nonempty string defaults are represented as . This is a symbol reference, not a stable public API promise.
| Function or method | Source |
|---|---|
getPluginDependencies() |
16 |
getTags() |
45 |
getDescription() |
55 |
getName() |
61 |
getUUID() |
66 |
getPluginVersion() |
71 |
getEmptyDataObject() |
76 |
addVideoIdIntoCampaignId($videos_id, $vast_campaigns_id) |
144 |
afterNewVideo($videos_id) |
173 |
canLoadAds() |
180 |
getHeadCode() |
237 |
getVideoLength() |
255 |
getVMAPSFromRequest() |
267 |
addVMAPS($url, $vmaps) |
284 |
afterVideoJS() |
294 |
getRandomPositions() |
343 |
getVMAPs($video_length) |
396 |
VMAPsHasVideos() |
432 |
showAdsNow() |
444 |
getVideos() |
451 |
getRandomVideo() |
464 |
getRandomCampaign() |
472 |
getPluginMenu() |
480 |
getValidCampaignsFromVideo($videos_id) |
487 |
getVASTLinks($videos_id = 0) |
493 |
onNewVideo($videos_id) |
509 |
__construct($time, VAST $VAST, $video_length = 0) |
532 |
setTimeOffset($time) |
545 |
format($seconds) |
563 |
__construct($id) |
578 |
These symbols are grouped by source file; inspect the class declaration and visibility before calling them.
Declared classes: VastCampaigns.
| Named symbol | Source |
|---|---|
getSearchFieldsNames() |
31 |
getTableName() |
36 |
getName() |
41 |
getType() |
46 |
getStatus() |
51 |
getStart_date() |
56 |
getEnd_date() |
61 |
getPricing_model() |
66 |
getPrice() |
71 |
getMax_impressions() |
76 |
getMax_clicks() |
81 |
getPriority() |
86 |
getUsers_id() |
91 |
getVisibility() |
96 |
getCpc_budget_type() |
101 |
getCpc_total_budget() |
106 |
getCpc_max_price_per_click() |
111 |
getCpm_max_prints() |
116 |
getCpm_current_prints() |
121 |
getPrintsLeft() |
126 |
setName($name) |
131 |
setType($type) |
137 |
setStatus($status) |
142 |
setStart_date($start_date) |
147 |
setEnd_date($end_date) |
152 |
setPricing_model($pricing_model) |
157 |
setPrice($price) |
162 |
setMax_impressions($max_impressions) |
167 |
setMax_clicks($max_clicks) |
172 |
setPriority($priority) |
177 |
setUsers_id($users_id) |
182 |
setVisibility($visibility) |
187 |
setCpc_budget_type($cpc_budget_type) |
192 |
setCpc_total_budget($cpc_total_budget) |
197 |
setCpc_max_price_per_click($cpc_max_price_per_click) |
202 |
setCpm_max_prints($cpm_max_prints) |
207 |
setCpm_current_prints($cpm_current_prints) |
212 |
getId() |
217 |
setId($id) |
222 |
getReward_per_impression() |
227 |
setReward_per_impression($reward_per_impression) |
232 |
save() |
237 |
addVideo($videos_id, $status = '<string>') |
259 |
getValidCampaigns() |
272 |
getAll() |
305 |
addView() |
329 |
delete() |
343 |
getValidCampaignsFromVideo($videos_id) |
363 |
getAllActive() |
385 |
Declared classes: VastCampaignsLogs.
| Named symbol | Source |
|---|---|
getVideo_position() |
21 |
setVideo_position($video_position) |
26 |
getExternal_referrer() |
31 |
setExternal_referrer($external_referrer) |
36 |
getSearchFieldsNames() |
41 |
getTableName() |
46 |
getId() |
51 |
getUsers_id() |
56 |
getType() |
61 |
getVast_campaigns_has_videos_id() |
66 |
setId($id) |
71 |
setUsers_id($users_id) |
76 |
setType($type) |
81 |
setVast_campaigns_has_videos_id($vast_campaigns_has_videos_id) |
86 |
getIp() |
91 |
getVideos_id() |
97 |
setVideos_id($videos_id) |
102 |
save() |
113 |
isRewardOnCooldown($users_id, $vast_campaigns_has_videos_id) |
146 |
reward($vast_campaigns_logs_id) |
160 |
getViews() |
179 |
getData($vast_campaigns_has_videos_id) |
195 |
getDataFromCampaign($vast_campaigns_id) |
212 |
getCampaignLogs($vast_campaigns_id, $start_date, $end_date) |
231 |
getAdsByVideoAndPeriod($vast_campaigns_id, $startDate = null, $endDate = null, $videos_id = null, $event_type = null, $campaign_type = '<string>', $external_referrer = null) |
259 |
getAdTypesByPeriod($vast_campaigns_id, $startDate = null, $endDate = null, $event_type = null, $campaign_type = '<string>', $external_referrer = null) |
322 |
getAdsByUserAndEventType($users_id, $startDate = null, $endDate = null, $event_type = null, $campaign_type = '<string>') |
375 |
getAdsByVideoAndEventType($videos_id, $startDate = null, $endDate = null, $event_type = null, $campaign_type = '<string>', $external_referrer = null) |
420 |
getAdsByVideoForUser($users_id, $startDate = null, $endDate = null, $event_type = null, $campaign_type = '<string>', $external_referrer = null) |
471 |
getEventType() |
526 |
getExternalReferrer() |
541 |
Declared classes: VastCampaignsVideos.
| Named symbol | Source |
|---|---|
getSearchFieldsNames() |
19 |
getTableName() |
24 |
loadFromCampainVideo($vast_campaigns_id, $videos_id) |
29 |
getCampainVideo($vast_campaigns_id, $videos_id) |
42 |
getRandomCampainVideo($vast_campaigns_id) |
60 |
getAllFromCampaign($vast_campaigns_id, $getImages = false) |
89 |
getValidVideos($vast_campaigns_id) |
118 |
getId() |
139 |
getVast_campaigns_id() |
144 |
getVideos_id() |
149 |
getStatus() |
154 |
setId($id) |
159 |
setVast_campaigns_id($vast_campaigns_id) |
164 |
setVideos_id($videos_id) |
169 |
setStatus($status) |
174 |
getLink() |
179 |
getAd_title() |
184 |
setLink($link) |
189 |
setAd_title($ad_title) |
194 |
delete() |
199 |
save() |
212 |
| Named symbol | Source |
|---|---|
generateCSV($vast_campaigns_id, $start_date, $end_date) |
12 |
- Check the installed/enabled version and the dependencies/settings above.
- Identify the actual failing page, request, callback or worker and correlate its timestamp with the AVideo log.
- Follow the linked method and caller. Check business-state changes and output artifacts as well as HTTP status.
- Reproduce the relevant workflow in a test environment. External provider, Encoder, live-server, storage, payment and authenticated flows require their real integrations.
Shared diagnostic workflow. This page is not a security audit or a claim of end-to-end validation.
Start
Install and update
- Install on Ubuntu 24.04 or 26.04
- Installation Setup Page
- Scheduler cron job (required)
- Set up email
- Use HTTPS
- Own Encoder
- Docker
- Update AVideo
- Backup
- Secure file permissions
- Server command-line tools
- Hidden configuration options
Videos
- Upload a video
- Local Encoder (on your computer)
- Bulk upload by FTP
- Import a channel
- Publish on YouTube and social media
- Privacy options
- Only for logged-in users
- Resolutions by user group
- Storage options
- Move and protect video files
- Video does not play
Users
Live
- Make a live stream
- Stream with OBS
- Own live server
- One live server, many sites
- Live server install errors
- Live does not play
Plugins
Problems
Other
- Translate your site
- Write a plugin (developers)
- Technical reference (developers and advanced administrators)
Old and retired guides