Replace video url with video player

There appear to be a few problems with your plugin as written.

  1. As mentioned in the comments above, WordPress has the built-in ability to automatically embed certain types of media, including YouTube videos, given a URL. See the Codex page on Embeds. So it’s likely that your plugin isn’t necessary, at least for a YouTube embed.
  2. the_content is a filter hook, not an action hook. So typically you’d use add_filter() to filter the post’s content.
  3. Even if you were to attach your function to a proper action hook, you wouldn’t see any output from it. Your function, as written, returns a variable, but add_action() ignores your returnaccording to the Codex, add_action() always returns true.

Actions typically either echo() content to the screen (well, the response buffer) or modify a variable; Filters typically accept one or more variables, and return a (possibly modified) version of that variable. See this question for an in-depth look at the differences.