conditionally check for window so headless tests dont bomb
conditionally check for window so headless tests dont bomb

Colum-SMA-Dev/MediaPlaybackFramework,UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy,Colum-SMA-Dev/MediaPlaybackFramework,Colum-SMA-Dev/MediaPlaybackFramework,UoSMediaFrameworks/uos-media-playback-framework-legacy