Difference between revisions of "Ad Plugin"

From MSX - Wiki
Jump to navigation Jump to search
(Created page with "This is a special video plugin that integrates example ads (i.e. pre-rolls, mid-rolls, and post-rolls) into a video. The plugin can be used with version '''0.1.146''' or highe...")
 
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
This is a special video plugin that integrates example ads (i.e. pre-rolls, mid-rolls, and post-rolls) into a video. The plugin can be used with version '''0.1.146''' or higher.  
+
This is a special video plugin that integrates example ads (i.e. pre-rolls, mid-rolls, and post-rolls) into a video. It can be used as a template for integrating different ad providers. The plugin can be used with version '''0.1.146''' or higher.  
  
 
== Usage ==
 
== Usage ==
 
The plugin must be loaded with a video URL. Optionally, the content type and GUID can be indicated. Please see following action syntax example.
 
The plugin must be loaded with a video URL. Optionally, the content type and GUID can be indicated. Please see following action syntax example.
  
* <code>video:plugin:http://msx.benzac.de/plugins/background.html?url={URL}&type={TYPE}&guid={GUID}</code>
+
* <code>video:plugin:http://msx.benzac.de/plugins/ad.html?url={URL}&type={TYPE}&guid={GUID}</code>
  
If you would like to use the plugin as reference to implement your own plugin, please have a look at this implementation script: http://msx.benzac.de/plugins/js/ad.js.
+
If you would like to use the plugin as reference to implement your own plugin, please have a look at these implementation scripts:
 +
* http://msx.benzac.de/plugins/js/ad.js
 +
* http://msx.benzac.de/plugins/js/ad-manager.js
  
 
== Syntax ==
 
== Syntax ==
Line 17: Line 19:
 
The URL of the video. It is recommended to encode the value to ensure that it is evaluated correctly (e.g. <code>"http://msx.benzac.de/media/video1.mp4"</code> → <code>"http%3A%2F%2Fmsx.benzac.de%2Fmedia%2Fvideo1.mp4"</code>).
 
The URL of the video. It is recommended to encode the value to ensure that it is evaluated correctly (e.g. <code>"http://msx.benzac.de/media/video1.mp4"</code> → <code>"http%3A%2F%2Fmsx.benzac.de%2Fmedia%2Fvideo1.mp4"</code>).
 
|-
 
|-
| <code>type</code> || <code>string</code> || <code>null</code> || No ||
+
| <code>type</code> || <code>string</code> || <code>"video"</code> || No ||
 
The type of the content.
 
The type of the content.
  
Line 28: Line 30:
  
 
== Example ==
 
== Example ==
 +
Please note that this example uses the [[MRSS Feeds]] interaction plugin to load example content.
 +
 
=== Screenshot ===
 
=== Screenshot ===
 
[[File:ad_plugin.png|thumb|640px|none|Example Screenshot (Ad Plugin)]]
 
[[File:ad_plugin.png|thumb|640px|none|Example Screenshot (Ad Plugin)]]
Line 40: Line 44:
  
 
=== Demo ===
 
=== Demo ===
* Launch via App: https://msx.benzac.de/?start=menu:https://msx.benzac.de/info/xp/data/plugin_test_7.json
+
* Launch via App: https://msx.benzac.de/?start=content:https://msx.benzac.de/info/xp/data/plugin_test_7.json
* Launch via Demo Page: https://msx.benzac.de/info/?start=menu:https://msx.benzac.de/info/xp/data/plugin_test_7.json
+
* Launch via Demo Page: https://msx.benzac.de/info/?start=content:https://msx.benzac.de/info/xp/data/plugin_test_7.json
 +
 
 +
'''Note: This demo will only work properly if ad blockers are disabled.'''
  
 
== See also ==
 
== See also ==
 
* [[Video/Audio Plugin]]
 
* [[Video/Audio Plugin]]
* [[Interaction Plugin]]
+
* [[IMA Plugin]]
* [[Image Plugin]]
 
* [[HTML5X Plugin]]
 
* [[Panorama Plugin]]
 
* [[Background Plugin]]
 
 
* [[Plugin API Reference]]
 
* [[Plugin API Reference]]

Latest revision as of 12:06, 12 June 2023

This is a special video plugin that integrates example ads (i.e. pre-rolls, mid-rolls, and post-rolls) into a video. It can be used as a template for integrating different ad providers. The plugin can be used with version 0.1.146 or higher.

Usage[edit]

The plugin must be loaded with a video URL. Optionally, the content type and GUID can be indicated. Please see following action syntax example.

If you would like to use the plugin as reference to implement your own plugin, please have a look at these implementation scripts:

Syntax[edit]

Parameter syntax of ad plugin
Parameter Type Default Value Mandatory Description
url string null Yes

The URL of the video. It is recommended to encode the value to ensure that it is evaluated correctly (e.g. "http://msx.benzac.de/media/video1.mp4""http%3A%2F%2Fmsx.benzac.de%2Fmedia%2Fvideo1.mp4").

type string "video" No

The type of the content.

  • "video": Video content.
  • "audio": Audio content. If this type is set, the plugin will not serve any ads.
guid string null No

The GUID of the content that can be used for tracking.

Example[edit]

Please note that this example uses the MRSS Feeds interaction plugin to load example content.

Screenshot[edit]

Example Screenshot (Ad Plugin)

Code[edit]

{
    "reference": "request:interaction:http://msx.benzac.de/info/data/mrss/example.xml|||http://msx.benzac.de/plugins/ad.html?url={URL}&type={TYPE}&guid={GUID}@http://msx.benzac.de/interaction/mrss.html",
    "pages": []
}

Demo[edit]

Note: This demo will only work properly if ad blockers are disabled.

See also[edit]