Check out this function. https://jenkins.pmmp.io/job/PocketM...player.html#a042481ae4e522c3e50cf5e094e8a51e5