DOCS - Veedmo stories embed example

by veedmo

HTML

<!DOCTYPE html>
<html>
  <head>
    <title>Veedmo example</title>
  </head>
  <body>
    <!-- DIV into which Veedmo stories will be injected; DIV's class name is passed in "query_selector" param of slideshow config. -->
    <div class="embedded-stories"></div>

    <!-- Veedmo script, injecting the slideshow with configuration, in page. -->
    <script>
      (function veedmoSlider(config) {
        (function veedmoSliderApply() {
          var el = document.querySelector(config.query_selector);
          if (el) {
            var script = document.createElement("script");
            script.src = "https://cdn.veedmo-static.com/cdn/slideshow/v1/current.js";
            document.body ? document.body.appendChild(script) : document.head.appendChild(script);
            script.addEventListener("load", function() {
              window.veedmoSlider(config);
            });
          } else {
            setTimeout(veedmoSliderApply, 100);
          }
        })();
      })({
        "partner_id": 1,
        "rss_url": "https://www.theverge.com/rss/index.xml",
        "max_slides_amount": 5,
        "query_selector": ".embedded-stories",
        "slide_duration": 4,
        "theme_color": "#2962ff",
        "open_links_in_new_tab": 1,
        "max_number_of_injected_ads": 2,
        "enable_utm_tracking_params": 1,
        "position": {
          "type": 3,
          "config": {
            "corner": "bl",
            "vertical_margin": "20px",
            "horizontal_margin": "20px",
            "max_width": "20%",
            "min_width": "300px",
          },
        },
        "video_player_config": {
          "tag_url_desktop": "https://cdn.veedmo-static.com/cdn/samples/ads/player-dev-ads/vast-preroll-skip.xml",
          "tag_url_mobile": "https://cdn.veedmo-static.com/cdn/samples/ads/player-dev-ads/vast-preroll-skip.xml"
        },
        "branding": {
          "corner": {
            "text": "Powered by Veedmo",
            "link": "https://veedmo.com",
    ...

CSS

body {
    background-color: #eeeeee;
    padding: 10px;
    height: 3000px;
}

.embedded-stories {
  max-width: 500px;
  width: 100%;
}