[brightcove] Improve and generalize brightcove URL extraction from JS