My Experience in Google Summer of Code 2024 for VLC - iOS
I want to share my experience working for VideoLan specifically in the iOS team as a part of the Google Summer of Code Program. Throughout the summer I contributed to the iOS project with many ideas most of which will be alive in the next release V4.0. I’ve had the privilege to contribute to VLC’s iOS application under the mentorship of Diogo Simao Marques.
Main Goal
Currently, the Android version has some features that do not exist in the iOS version like continue watching the last played media button and searching throughout the entire media library.
So I have focused on catching up by adding these features and adapting new features like building a lyrics UI with the ability to extract and add lyrics to the media, and adding an indicator for the last played media in the playlists indicator.
MediaCategoryViewController: Last Played Playlist Media Indicator
This feature focuses on the playlist section. It adds an indicator for the last played playlist and the last played media inside it.
The motivation for developing this feature was covering some corner cases that users face, like terminating the app suddenly, preferring to continue playing the last playlist, and configuring the last played one if the player queue contains multiple playlists.
Technical Explanation: I built this feature by adding two models that are helpers for achieving our goal LastPlayedPlaylistModel
and LastPlayed
model. Built a class called PlaybackCacheHelper
which helps us to handle the case of indicating the last played from the player queue with many appended playlists. Editing MediaCollectionViewCell
, MovieCollectionViewCell
to handle showing the indicator logic. Adding some helper methods to MediaCategoryViewController
to catch any action happening with the playlist and observe playback changes to make sure the indicator value stays updated.
Continue watching the last played video
This feature already exists in the Android version. Adding this button to the video tab enhances the user experience when resuming playback of video media content. The feature includes improving accessibility and simplifying the process continue watching videos for users.
Button Visibility: It depends on the watching history if it is cleared or is empty, the button will be hidden.
Technical Explanation: Fetching the last value from the HistoryModel
video type and passing it to playbackService
to continue playing it.
Auto-scrolling to the currently playing media
This feature's goal is to enhance the user experience when playing media in a large media library with different collection types.
Adding functionality to automatically scroll to the currently playing media and apply a highlight animation. This includes handling different media types and collection types such as playlists, albums, artists, and media groups.
Handling scrolling to the currently playing media or collection, even if it is played from other collection types, such as playlists.
AudioMiniPlayer: Refactor Previous/Next gesture
The goal of this merge is to replace the old previous and next media gestures in the audio mini-player with a new approach like the one in Spotify and Apple Music mini-players.
Technical Changes: Showing the media title and description in a collectionView cell instead of fixed labels. Refactoring the Previous/Next gestures from PanGesture to a custom paging effect using CollectionView named mediaInfoCollectionView. Previous or next scroll animation when any playback action is done.
Player Queue: Remove Media Enhancements
This merge fixes some corner cases like removing the currently playing media from the queue did not change the playback and the queue collection view wasn't being updated correctly. Removing all media from the queue did not stop the playback and produced an empty collection.
Enhancements: Handling removing the currently playing media and changing the playback to the proper media item due to the index and playing mode. Ensuring that playback is stopped when the queue becomes empty after removing all media.
Playlist Forces duplicate media items
Adding media to a playlist that already exists is leading to duplication. Playing duplicated media leads to unexpected behavior.
To prevent duplication and ensure smooth UI, implemented a pre-addition check. This check verifies if the selected media item already exists within the playlist before adding it. If the item is found, it will ask to be added.
Ability to add a group of media to many playlists without repeating the process.
Conclusion
This is my first experience with many things: my first time contributing to an open-source project and my first time working on such a large codebase with a long list of supported devices and OSes. Although it was short, I enjoyed every part of it.
Subscribe to my newsletter
Read articles from Mohamed Sliem directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by