Both are correct.
The gerund (playing) is more common in British English, while the infinitive ( to play) is more common in American English.
For people who use both constructions, there can be a subtle difference in meaning.
٧ أكتوبر ٢٠١٨
1
2
1
From the Cambridge dictionay:
There is a very small difference in meaning between the two forms. The -ing form emphasises the action or experience. e.g.: I like making jam
The to-infinitive gives more emphasis to the results of the action or event.
e.g.: I like to make jam every year
We often use the -ing form to suggest enjoyment (or lack of it), and the to-infinitive form to express habits or preferences.
The -ing form is more common than the to-infinitive form after hate and love.