Giter VIP home page Giter VIP logo

playsrg-apple's Introduction

SRG Media Player logo

About

Play SRG is the SRG SSR (Swiss Broadcasting Corporation) audio and video platform, provided as a distinct service for each of its business units (RSI, RTR, RTS, SRF and SWI). This repository contains the source code of the Play SRG applications for iOS and tvOS.

The Play platform is more generally available on the web, on Android phones and devices running Android TV:

Platform Play RSI Play RTR Play RTS Play SRF Play SWI
iOS / tvOS πŸŽπŸ“±πŸ“ΊπŸš— πŸŽπŸ“±πŸ“ΊπŸš— πŸŽπŸ“±πŸ“ΊπŸš— πŸŽπŸ“±πŸ“ΊπŸš—
Android / Android TV πŸ€–πŸ“±πŸ“ΊπŸš— πŸ€–πŸ“±πŸ“ΊπŸš— πŸ€–πŸ“±πŸ“ΊπŸš— πŸ€–πŸ“±πŸ“ΊπŸš—
Web πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’» πŸ–₯πŸ“±πŸ’»

Screenshots

Features

The application provides a rich set of functionalities, among which:

  • Access to our content, whether it is broadcast on TV, radio or online.
  • A TV guide.
  • An audio mini player (iOS only).
  • Subscriptions with push notifications (iOS only).
  • Resume playback and continuous playback.
  • Favorites.
  • Downloads (iOS only).
  • AirPlay, Google Cast and CarPlay support (iOS only).
  • VoiceOver and larger font support for better accessibility.
  • Handoff support (iOS only).

Depending on the business unit some functionalities might not be available (e.g. SWI has no radio content).

Compatibility

The project runs on iOS 14.1, tvOS 14 and above and must be opened with the latest Xcode version.

Required tools

  • Building the project requires command-line tools for icon generation, easily installed with Homebrew:

     brew install imagemagick ghostscript jq
    
  • Some project dependencies are retrieved using CocoaPods. Be sure that this tool is available on your system:

     which pod
     pod --version
    

    If not, install it:

     brew install cocoapods
    

Building the project

A Makefile provides several targets to prepare project dependencies. The available targets can be listed by running the following command from the project root folder:

make help

Project setup

After checking out the project run:

make setup

to setup the project and its dependencies.

Private settings

Private project settings (keys, tokens, etc.) are stored in a private repository, pulled under the Configuration directory when running make setup (or any other target depending on it). The SHA-1 of the configuration commit which is used is explicitly provided in the Makefile. Settings are therefore versioned alongside the project, providing for reproducible builds.

If you need to make changes to the settings:

  1. Perform the required changes in the Configuration directory (and in the project as well if needed).
  2. Switch to the Configuration directory and commit changes there.
  3. Update the Makefile CONFIGURATION_COMMIT_SHA1 variable to point at the configuration commit to use.
  4. Push all commits when you are ready.

The project can be built without private settings but some features might not be available (e.g. push notifications) or configured in a different way.

Running the project

Simply open the project with Xcode and wait until all dependencies have been retrieved. Then build and run the project.

Contributing

If you want to contribute to the project as an external contributor, have a look at our contributing guide.

Quality checks

Checking quality, the project requires command-line tools:

brew install swiftlint swiftformat shellcheck yamllint

For rubocop, be sure that this tool is available on your system, or execute:

bundle install --path vendor/bundle

When all command-line tools are installed, check code quality can be done using:

make check-quality

This ensures that Swift files, and scripts are conform to common best practices.

Licenses for libraries used in the project

In the iOS application settings, licenses of libraries used in the project can be consulted. To build the list, running an iOS target requires LicensePlist.

brew install licenseplist

SRGSSR project

Some links to internal Jira SRGSSR instance can be found in commit messages, branch names or pull request titles.

Git hooks installation

Project git hooks can be installed to help quality checks and commit messages for internal SRGSSR project. Install them by running the following command:

make git-hook-install

Translations

Translation tool is crowdin.com. The following scripts need Crowdin CLI.

  • Review new source translation files in Translations folder:

     make generate-translations
    
  • Pushing new source translations from Translations folder:

     make push-translations
    
  • Pulling latest translated translations:

     make pull-translations
    

Releasing binaries

The proprietary project uses fastlane to release binaries either for internal purposes or for the AppStore to release binaries.

A github page with release notes pages and help pages for builds is also published with a fastlane lane.

See release checklist and fastlane lanes for details.

Specifications

Follow the links below for feature specifications and technical details:

playsrg-apple's People

Contributors

defagos avatar jordanmontel avatar loic-dumas avatar mutaben avatar pyby avatar rts-devops avatar waliid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

0xced imonz acfancy

playsrg-apple's Issues

Offline artwork support

Currently, artworks are not supported in control center and on the lock screen for downloaded content. This could be improved (probably with an appropriate Letterbox mechanism).

Save and restore last search string

We could save the last search string and restore it when the user opens the search again. Maybe this stored value should sometimes be cleared, though.

Improve infos displayed to the user when the connection is bad

As mentioned at the bottom of https://srfmmz.atlassian.net/wiki/display/SRGPLAY/TEST-139%3A+Play+iOS+Beta+7+-+Exploratory+testing, the user might not know precisely why the player seems stuck or why the app is taking a long time to load and is not frozen. We could display a status bar notification alerting the user when the connection is poor. This way, the situation would be clear in all cases described on the Confluence page (Edge, very bad network, 100% loss).

Improve homepage performance

There are some noticeable hiccups on the homepage, when reloading data or dismissing the player with a gesture.

Consolidation work is probably taking some time. We could probably improve the situation by moving it to a background thread. Maybe SRGSSR/srgdataprovider-apple#7 could also provide an interesting answer (though in such cases extra care is required with all completion blocks).

Other possible performance improvements could probably be achieved with images (comment out image loading and measure performance difference to find the maximum performance gain) and asynchronous layout constructions, but they might require a lot of work.

Improve offline user experience

The 1st launch user experience when no connection is available could be improved (redirecting the user to the download section, e.g.)

Analytics for local playback?

We never really discussed if and how we could / should measure playback of downloaded files. We should discuss this topic with the GD and perform changes as required.

Improve landscape layouts

Layouts (e.g. shows, calendar view, player view etc.) could be enhanced for landscape display, especially on iPad.

Improve behavior when experiencing network switches on the go

Especially on the go and with SBB networks, the player might not be able to resume, or might end with a bad state (especially if the stream was already opened once).

We could improve the situation. This probably involves changes in SRGMediaPlayer, SRGDataProvider and SRGLetterbox, but this remains to be investigated further.

On SBB networks, SSL certificate errors might happen as well. Redirect improvements made at the data provider level also seem not to work anymore.

Add reset button in Settings.app

To make it possible to reset the application without reinstalling it, we could provide a reset button in the system Settings.app. This option could also be made available in App Store releases.

Autolayout warnings

Autolayout warnings are emitted at runtime. Some are probably related to Letterbox as well. Fix them.

iOS 9 minor layout issues on iPhone 5C

On iPhone 5C running iOS 9, some layouts are wrong or not optimal (e.g. player view, subtitle on two lines). Other issues can be seen when opening the player with another orientation as the presenting view controller.

These issues are probably minor and most of them should be fixed on iOS 10 and for more modern devices. Note that iPhones 5C will not be able to use iOS 11.

Side menu sometimes does not open after device rotations

This is a side menu component bug. To reproduce:

  1. Hold an iPad in landscape or portrait orientation
  2. Open the search
  3. Rotate the device
  4. Close the search

The menu is then in an incorrect state and cannot be properly opened anymore.

Improve calendar accessibility

The current calendar view is not good enough for VoiceOver access. Since we are based on FSCalendar, which itself is based on a collection, the VoiceOver focus always start at the beginning of the calendar. We currently restricted the date range to the last two months, but this is far from being optimal.

The FSCalendar user experience is cool, though. I think we should think about an alternative VoiceOver friendly implementation (maybe simply based on a standard date picker), enabled only when VoiceOver is active.

Overridable font size in app

Some users are complaining that the font size is too large, and that they must scroll too much to browse content.

The default look & feel is probably good and readable. Moreover, scrolling is a cheap interaction on mobile, having to navigate is normal.

Still, I think we could provide a settings override in the app to choose another font size for Play. Those "power-users" would then be happier.

We also should optimize the cell sizes for smaller fonts, so that more content can be displayed.

Trending collection snapping on narrow devices?

When scrolling through trending medias, it is difficult to manually stop so that the media thumbnail is not cut on the left or on the right.

UICollectionView provides a native snap mechanism to improve the user experience in such cases (without having use paging, which makes navigation slow).

Align header section title translations between iOS and Android

The radio homepage header section titles don't match (e.g. Derniers audios vs. Dernières émissions and Les dernières 24 heures vs. Derniers audios). Align both platforms according to what media lists represent.

Similarly, on the TV homepage, the live section header titles are not aligned (e.g. Jetzt auf SRF vs. Jetzt im TV).

Accessibility improvements

Accessibility could be even further improved by:

  • Having all dates and times properly spelled out
  • ... and also when navigating the calendar
  • Focusing again on the selected cell when navigating back

Smart seeks

Currently, seeking from the headset remote control settings (not using the skip buttons usually available from the control center) seeks in fix increments. We could implement smarter seeks (like Apple does) which start with small increments but, as the headset button is held, increase to larger values.

Make home concept great again

After some thoughts, it appears that the HomeSectionInfo concept should stay close to the home (as its name suggests). As it is used currently, sometimes outside the home view controller, the concept becomes difficult to understand. For example, the HomeMediasViewController concept blurs the lines and should only display media lists for a set of supported requests, and should be appropriately renamed to make the confusing Home word disappear.

An enum could be introduced for the set of requests supported by this media list view controller, close but not merging the values of the HomeSection and TopicSection enums into a single enumeration (e.g. MediaList or something similar).

The constructor of the renamed HomeMediasViewController should then mostly expect a value from this enumeration, and branch to the appropriate request. The page type used for statistics must be internally matched, probably through a dictionary mapping the MediaList values to the corresponding page type.

Stack-based cell layouts

To provide easier customization of cell layouts (especially depending on the layout traits), we could have all cell layouts be UIStackView-based.

Incorrect back button tint color

For radio SRF 1, the navigation bar tint color is black. When navigating the application (e.g. accessing the most heard media list), the tint color stays correct on all screens. But if a modal is displayed, the back button tint color will be white when navigating again on another screen.

This is probably an iOS bug (other strange tint color behaviors have been reported after modal presentation).

Remove localization in page view analytics levels and titles

As discussed during TagCommander workshops, we will remove localization from page levels and titles (if not media titles, of course) to have comparable measurements across all BUs, see https://srfmmz.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/197019081.

This will happen after complete TagCommander transition. Until comScore is dropped, we namely need to keep the same localized names to get comparable results. When the transition is complete:

  • Remove code localizing the levels and titles.
  • Remove associated useless translations on Crowdin.

Fix dominating 2.7.x crashes in production

Currently, a collection view layout issue generates several crashes in production (see e.g. https://rink.hockeyapp.net/manage/apps/105349/app_versions/27/crash_reasons/178105995).

Whichever the BU, the crash always involves 262 items in the collection. In fact, this corresponds to the number of weeks during the last 5 years (can slightly vary). This is therefore an FSCalendarcrash, probably related to the fact we have set a maximum date, see WenchaoD/FSCalendar#565.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.