getCurrentMedia = (type) => {
  const media = document.querySelectorAll(type);

  return [...media].map((m) => ({
    currentTime: m.currentTime,
    duration: m.duration,
    playbackRate: m.playbackRate,
    paused: m.paused,
    muted: m.muted,
    volume: m.volume,
    src: m.src,
  }));
}
Get the metadata of media type element(s)