UNPKG

video-ad-sdk

Version:

VAST/VPAID SDK that allows video ads to be played on top of any player

10 lines (9 loc) 279 B
export const getOrigin = () => { const { origin, protocol, hostname, port } = window.location; /* istanbul ignore else */ if (origin) { return origin; } const resultPort = port ? `:${port}` : ''; return `${protocol}//${hostname}${resultPort}`; };