Implemented a better way to detect playing using localStorage. res will be one of @"true", @"false", @"" (empty string, undefined)