web-monetisation-video-ads

Web Monetization Video Ads is a `utility` that allows you to `monetize videos`. It uses web monetization when available and loads ads as a fallback.


Keywords
web-monetization, imasdk, advertizing, monetization, coil, ilp, ilp-payment, interledger, javascript, webmonetization
License
ISC
Install
npm install web-monetisation-video-ads@0.1.62

Documentation

Web Monetization Video Ads

GitHub repo size GitHub contributors GitHub stars GitHub forks Twitter Follow

Web Monetization Video Ads is a utility that allows developers to do monetize videos.

It uses web monetization when available and loads ads as fallback thorugh IMA SDK.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed the latest version of <coding_language/dependency/requirement_1>
  • You have a <Windows/Linux/Mac> machine. State which OS is supported/which is not.
  • You have read <guide/link/documentation_related_to_project>.

Installing

npmn install web-monetization-video-ads --save

Set Up

The package exposes 3 submodules:

  • initVideoMonetizer start or stop web monetization whenever the video element play or pause.
  • initVideoAdvertizer a wrapper of IMA SDK used for advertize the video element
  • initVideoAdsMonetizer includes both of the submodules to provide web monetization and advertizing

Simple

The simple usage is by importing initVideoAdsMonetizer and pass some configurations as follow:

import { initVideoAdsMonetizer } from "web-monetization-video-ads";

const paymentPointer = "$paymentpointer";
const tagUrl ="linkofthetag";
const videoElement = document.querySelector("#video-to-monetize");

initVideoAdsMonetizer({
  videoElement,
  monetizationConfig: {
    paymentPointer,
  },
  adsConfig: {
    tagUrl,
  },
});

  • videoElement start or stop web monetization whenever the video element play or pause.
  • monetizationConfig a wrapper of IMA SDK used for advertize the video element
  • adsConfig includes both of the submodules to provide web monetization and

Using

To use <project_name>, follow these steps:

<usage_example>

Add run commands and examples you think users will find useful. Provide an options reference for bonus points!

Contributing to <project_name>

To contribute to <project_name>, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin <project_name>/<location>
  5. Create the pull request.

Alternatively see the GitHub documentation on creating a pull request.

Contact

If you want to contact me you can reach me at your_email@address.com.

License

This project uses the following license: <license_name>.