Optimized the multimedia player click and keyboard events

Combined the seperate if into if/else if