Https://terumahradio.com/

Why in my phone in the control center, the player show your link:
elfsight.com
I need to remove NOW

1 Like

Hi there, @Freddy_Alarcon :wave:

I’ve checked your website and couldn’t see the Elfsight link there:


If you still see this link, please send me a screenshot of how it looks.

1 Like

Got you, thanks!

We’ve removed it, by adding this code to the Custom JS field on the Style tab of your widget’s settings:

const WIDGET_CLASS = 'elfsight-app-86f58327-5bdb-496b-ba2d-034347088304';

const waitForElem = (selector) =>
  new Promise((resolve) => {
    if (document.querySelector(selector)) {
      return resolve(document.querySelector(selector));
    }

    const observer = new MutationObserver(() => {
      if (document.querySelector(selector)) {
        observer.disconnect();
        resolve(document.querySelector(selector));
      }
    });

    observer.observe(document.body, {
      childList: true,
      subtree: true,
    });
  });

waitForElem(`.${WIDGET_CLASS} video`).then((video) => {
  const player = video.closest('[class*="eapps-radio-player"]');

  const findEl = (...selectors) => {
    for (let sel of selectors) {
      const el = player.querySelector(sel);
      if (el) return el;
    }
  };

  video.addEventListener('play', () => {
    const cover =
      findEl(
        '[class*="Full__ImageContainer-sc"] img',
        '[class*="BigImage__ImageContainer-sc"] img'
      )?.src || '';

    if ('mediaSession' in navigator) {
      navigator.mediaSession.metadata = new MediaMetadata({
        title: 'Radio en vivo',
        artist: 'Radio en vivo',
        artwork: [
          {
            src: cover,
          },
        ],
      });
    }
  });
});

Please check it out and let me know if everything is fine now :slightly_smiling_face:

Thanks so much

1 Like

No sweat!

If anything else comes up, we’re always here to help :wink: