0

I want to ask how can I put video before my main video in my own website? Like commercial video or somethings like that. For example, the commercial video should be played first and then the main video play. Exactly like youtube! Thanks for helping me

amirali
  • 21
  • 2

2 Answers2

1

There are several ways you can do this:

  • Integrate the ad into your stream on the server side - this requires no changes on your website, unless you want to monitor and report the ad playback or disable controls during the ad. It does require expertise on the video streaming server side so may not be applicable.

  • Load the ad using its video URL into your video player or video tag on your website and play that first. When it completes load the main video into the same player using the main video URL and then play your main video.

  • A refined version of the second approach above - to avoid delays between the ad and the main video you can use two players and hide the one you are hot playing - i.e. have two video players or video tags, load both but pause the main video and hide that element on your webpage until the ad video is finished, then hide the ad video and unhide and un pause the main video.

Take a look here for more on the last approach above: https://stackoverflow.com/a/67923860/334402

Mick
  • 24,231
  • 1
  • 54
  • 120
0

Use a video ad server. The video ad server will give you a VAST tag (URL) containing ads, which you can plug in to your video player. Your video player should be able to play VAST ads as pre/mid/post-rolls.

You have basically two options when monetizing video content:

  1. Use a video ad network where advertisers bid to show ads before your main content. The network will take a share, and you'll be paid the rest. You have no or moderate control over the video ad content that you will show to your viewers.
  2. Use a "standalone" VAST video ad server. You should make direct deals with advertisers, who will give you their video ad in MP4 format. You can then upload the video ad to your ad server, and send reports (and invoices) to your advertisers afterwards.

Here's a list of VAST video ad servers:

https://adtechlist.io/video-ad-servers

Roy
  • 11
  • 1