Fixed the canPlayFunction