moved mediaSource info fetcher to module-level method