Many reddit posts are video links. Most of these are links to YouTube videos, so we'll add support for them first. Videos should load in the news item view and it should be possible to expand them to fullscreen mode.
First we need to investigate the best player to use. The simplest option is the MediaPlayer API, but it may not support YouTube links out of the box. There's an official YouTube Android Player API, but it hasn't been maintained for years and open-source alternatives such as may be better. It should also be possible to use ExoPlayer to play YouTube videos, which will also support many other types of video links, but that solution might be more complex than necessary for a) the most common use case and b) keeping this app relatively simple for the purpose of being a learning tool.
Let's start by trying to load a YouTube video using MediaPlayer. If that doesn't work, we'll use android-youtube-player to support YouTube links. Implementing other video types using ExoPlayer is a lower priority and can be done as a separate issue.
Many reddit posts are video links. Most of these are links to YouTube videos, so we'll add support for them first. Videos should load in the news item view and it should be possible to expand them to fullscreen mode.
First we need to investigate the best player to use. The simplest option is the MediaPlayer API, but it may not support YouTube links out of the box. There's an official YouTube Android Player API, but it hasn't been maintained for years and open-source alternatives such as may be better. It should also be possible to use ExoPlayer to play YouTube videos, which will also support many other types of video links, but that solution might be more complex than necessary for a) the most common use case and b) keeping this app relatively simple for the purpose of being a learning tool.
Let's start by trying to load a YouTube video using MediaPlayer. If that doesn't work, we'll use android-youtube-player to support YouTube links. Implementing other video types using ExoPlayer is a lower priority and can be done as a separate issue.