Skip to content

Options

Shobhit Sharma edited this page Oct 4, 2017 · 9 revisions

The options are native and external based as described below:

Native Options

Parameter Type Default Description
width number null Custom width of container (gets ignored if not supported via SDK)
height number null Custom height of container (gets ignored if not supported via SDK)
strict boolean false Enable or disable auto-resizing functionality

External Options

  • Facebook - Supports maxwidth, omitscript (API Reference)
  • Twitter - See Parameters section here
  • Instagram - Supports hidecaption, maxwidth, omitscript (API Reference)
  • YouTube - See Supported Parameters section here
  • Pinterest - See API Reference
  • Google Maps - Supports zoom as integer and mapTypeId as enum as roadmap/satellite/hybrid/terrain (API Reference)
  • Others/iFrame: tagName (identifier for HTML Tag, defaults to embed)

Examples

// Embeds youtube video by passing native options
embedo.load(
  document.getElementById("embedo-youtube-embed"),
  "https://www.youtube.com/embed/vn2qXpcon-s", {
    width: 640,
    height: 480
  }
);

// Embeds instagram post by passing external options
embedo.load(
  document.getElementById("embedo-multiple"), [
    "https://www.instagram.com/p/BX3fMnRjHpZ",
    "https://www.instagram.com/p/BX3ejdJHmkD",
    "https://www.instagram.com/p/BX3VEDqFvmg"
  ], {
    hidecaption: false
  }
);

// Embeds pinterest profile by passing external and native options
embedo.load(
  document.getElementById("embedo-pinterest-profile"),
  "https://www.pinterest.com/pinterest/", {
    "data-pin-do": "embedUser",
    "data-pin-board-width": 750,
    "data-pin-scale-height": 500,
    "data-pin-scale-width": 80,
    "strict": true
  }
);
Clone this wiki locally