Monetization

Video ads

Pre/mid-roll VAST & VMAP video ad breaks

RamTV can insert real pre-roll, mid-roll and post-roll video ads using the industry-standard VAST/VMAP formats — the same standard real ad networks and ad servers speak, not a simplified in-house format. It's a separate, optional plugin on top of the base Ads system, and is off by default.

Campaign types

Set up under Business → Advertisement alongside your other ad campaigns, a video-ads campaign is either:

  • VAST tag — a single ad-server URL for one ad slot.
  • VMAP schedule — a single URL where the ad server itself dictates the whole break layout (how many breaks, when, what's in each). When both a VAST and VMAP campaign are active, VMAP wins — a full schedule from the ad server takes priority over RamTV's own placement rules below.

VPAID (a similar but different, code-executing ad format) isn't supported and is refused outright — this is deliberate, not a gap: VPAID hands an ad third-party executable code inside your player, which is a real security tradeoff most self-hosted platforms are right to avoid.

Where and when breaks happen

For a VAST campaign (not VMAP — see above), Business → Advertisement → Video Break setting controls placement directly:

SettingWhat it controls
Pre-roll / Mid-roll / Post-rollIndependent on/off toggles for each break position
Mid-roll frequencyHow often a mid-roll can occur, in minutes
Mid-roll max per titleA hard cap on mid-rolls in one playback, regardless of length
Lead-in guardProtects the opening minutes of a title from an early mid-roll
Tail guardProtects the closing minutes from a late mid-roll
Minimum title durationTitles shorter than this skip mid-rolls entirely
Minimum gap between breaksDrops a break that would land too soon after another — this is what prevents a resume-from-pause immediately triggering a second break seconds after the last one

Post-roll isn't guaranteed to fire on every playback — it only plays if the player still reports active playback right at the very end, so a viewer who closes the tab a few seconds early won't see it.

During a break

  • Skippable + skip-after seconds — your own fallback setting, only used when the ad creative itself doesn't declare its own skip offset. A creative with its own skip timing always wins over your setting.
  • Max ads per pod — caps how many ads can be strung together in a single break, for a VMAP schedule that tries to pack more in.

Who sees video ads

The same per-role ads flag the base Ads system uses also governs video breaks — a role with ads turned off skips video breaks too, with no separate setting to manage. Video ads are web-only by design: the native/Cordova app never even sees this feature and shows AdMob ads instead, the same as the base Ads system's app behaviour.

How ad requests actually work

This runs server-side, not in the viewer's browser — the browser is only ever given an opaque, signed reference to a break, never the real ad-server URL. RamTV's server verifies that reference, fetches the actual VAST/VMAP tag itself, resolves it (following up to 5 wrapper redirects, a normal part of how ad networks chain to each other), and only then hands the viewer's player the resolved creative. This also means RamTV validates that any URL it's about to fetch is a real, public, resolvable address before fetching it — it won't follow a redirect to an internal/private address.

Every stage of an ad break is logged — request, empty response, impression, each quarter watched, completion, skip, click, error. Billing (the impression/click costs from the base Ads system) is charged only on a confirmed impression or click, not just because an ad was selected.

Testing without a real ad server

The Settings screen includes a Samples tab with several built-in sample ad tags, so you can confirm breaks, skip behaviour and tracking end-to-end before you've signed up with a real ad network or ad server.

Troubleshooting

  • The ad plays underneath the player's control bar — a known display-layering issue with the ad overlay; if you see this, it's a recognised bug, not a misconfiguration on your end.
  • A pre-roll plays again every time the same session resumes — also a known issue with resume handling, not something the Minimum gap between breaks setting is meant to fix (that setting is for spacing between different breaks, not resume replay).
  • An ad tag returns nothing — confirm the ad-server URL is a real, publicly resolvable address; RamTV's own SSRF protection deliberately refuses to fetch anything else, which will look like "no ad returned" rather than a clear error.
  • Skip button doesn't appear when you expect it — check whether the ad creative itself declares a skip offset; if so, it overrides your own skip-after setting entirely.