How to use the oembed-parser.setProviderList function in oembed-parser

To help you get started, we’ve selected a few oembed-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lowwebtech / low-web-extension / src / scripts / content_script / video / players / ClickToPlayer.js View on Github external
(function(){

  console.log('ClickToPlayer')
  setProviderList(providersJson)

  let players = document.querySelectorAll('.lowweb__click-to-load')
  players.forEach(( player )=>{

    let videoUrl, oembedUrl
    const type = player.dataset.lowtype
    const data = videoToBlock[type]

    // button
    if( data.icon ){
      player.innerHTML = data.icon 
    }

    const id = getId( player.dataset.lowsrc, type )

    if( data.video_url != '' && data.oembed != '' && id ) {

oembed-parser

Get oEmbed data from given URL.

MIT
Latest version published 1 year ago

Package Health Score

67 / 100
Full package analysis