YouTube video in comments?

Hey guys I see people share YouTube videos in the comments here in the community, and video shows directly on the site/app. However I shared a link and it only shows as a link instead of the actual video. How do you get it show as a video instead of just a YouTube link?