We used Flutter technology to develop the mobile app on Android and iOS. For the Back-end side of the development we used Ruby on Rails, Postgres, Redis and Sidekiq in this project. We implemented Firebase Cloud Messaging to enable sending push notifications. Another solution we applied here was Firebase Dynamic Links, which allows handling links appropriately depending on the platform. If the user clicked on the link sharing the video in the app, depending on the used device and whether the user had the application installed on their phone, the service was different:
- opening a link on the phone without the application installed – redirection to the Google Play / AppStore store
- opening a link on the phone with the application installed – launching the application on the screen displaying the shared movie
- opening a link on the computer – displaying a website encouraging to install the application
What is more, we managed to introduce algorithms responsible for displaying videos. The user is able to see different kind of content depending on various factors:
- some videos may be unavailable for the user if they’re owned by private profiles that aren’t followed by the user,
- some videos may be unavailable for the users if they were blocked by the authors or if they banned someone,
- the videos were banned or restricted,
- the videos were already seen by the user.
There are also 4 different mechanisms of displaying films, implemented by 4 different feeds (Mix, Challenges, Following, User Profile) in the app.
Our client wanted the user experience to be of possibly the highest quality, irrespectively to the localization and the quality of users’ network. In order to optimize video’s loading process, despite the limited budget, we worked out a satisfying solution using the following mechanisms:
- We used Amazon CloudFront (CDN – Content Delivery Network) service which gets the data from the AWS S3 and distributes them to many databases, localized in different parts of the world. The users’ request is sent to the nearest localization, what helps to avoid delays related to the distance between the user and the central database.
- We applied a mechanism allowing for preloading videos – the films following the one currently watched are loaded in the background, so that when you go to the next one, it starts immediately.
- Optimization of the videos with the usage of ffmpeg library in order to decrease the size of videos with maintaining the best quality at the same time. The key here was to compress the videos using appropriate parameters.