Giter Club home page Giter Club logo

frontrowtrailers's People

Contributors

conath avatar dependabot[bot] 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

Watchers

 avatar  avatar  avatar  avatar

frontrowtrailers's Issues

Add data to be shown when first launched offline

App Store Review rejected the app because it doesn't do anything if launched while offline or unable to download the trailers. I suggest including a trailers XML file with the app for this purpose, and showing a more informative alert when unable to download the latest trailers.

Cover Flow UI broken on iOS 15

The cover flow UI is unusable on iOS 15, using version 1.3.1 from the App Store. Apparently, something has changed in the way SwiftUI layouts the view and it now never settles on a poster - just scrolls infinitely. This surprises me as I didn't recompile & submit the app for iOS 15 API.

Add 1080p trailer streams with fallback to 720p if unavailable

The Apple Trailers website provides 720p and 1080p streams via a quality selector, but no XML feed for 1080p files. So we need to find a way to determine the 1080p URLs from the 720p ones. Then we need to add this to the app and automatically load the 1080p version if available, else load the 720p one.

Sort by movie release date

Currently, the movies are sorted alphabetically by title. It would be nicer if they were sorted by release date, with future movies first and past movies last.

Fixing this should only require changes to the Model/MovieInfo.swift file. The release date must be parsed into a Date object. Then, the movies can be sorted using the built in sorting function before they are returned to the SceneDelegate.

Add Share watched trailer

Add a share button that appears after a trailer has been watched.

This requires getting the URL to a trailer's webpage. Might be too complex, so might link directly to the trailer video file.

Crash when rotating iPhone 11 Pro Max to landscape

Steps to reproduce:

  1. Launch app on a vertically regular and horizontally compact device in portrait (e. g. iPhone 11 Pro).
  2. Rotate the device to landscape mode.
  3. Tap < Theatrical Trailers and tap any movie trailer in the list.
  4. Rotate the device back to portrait mode.
  5. Observe the crash:
AttributeGraph precondition failure: setting value during update: 45488.

Workaround:

Exclusively use the app in portrait or landscape mode on affected devices.

Proposed Fix:

A: Separate UI

Create two separate Movie Trailer List views, one for horizontally and vertically regular devices and one for other devices. The one for other devices must not include a NavigationView to avoid entering a split screen navigation phase.

B: Altered UI

On horizontally compact environments, change the play Button to a NavigationLink that leads to a MovieTrailerView that auto-plays the trailer. This way, maybe the transition to split view and from split view can be handled by SwiftUI because now actual navigation is happening in both compact and regular environments.

Add vertical scroll to CoverFlow that reveals the movie metadata

The movie meta view currently moves along inside the ScrollView. Instead it should be its own (vertical) ScrollView and float centered in the view.

Could work like this:

ScrollView(.vertical) {
    VStack {
        CoverFlowScrollView($centeredItem)
        
        CoverFlowMetaView($centeredItem)
            .opacity(isMovieInfo($centeredItem) ? 1 : 0)
    }
}

CoverFlowMetaView would be a new view that shows settings and movie info as needed. The Watch trailer button would show the trailer in full screen (overlay) with an own close button (?).

This requires the CoverFlowScrollView's reflection portion to be layered behind the CoverFlowMetaView.

Clean up code

As expected from my second SwiftUI project, the code can be improved in many places:

AppDelegate

Make AppDelegate @Published vars publish on main, e. g. isPlaying, idsAndImages.

Replace force unwrapped selectedTrailerModel with Optional. (thanks @sharedRoutine)

More generally, the AppDelegate is looking very much like a data source. All those properties should be moved to a new view model object.

Cover Flow glitches when swiping slowly

The reason is that the CoverFlowScrollView always tries to center a movie poster, even if the user still had their finger on the screen.

A possible solution would be to re-write this behavior to only center a poster after the finger is lifted. Additionally there is currently a bit of a "dead zone" on between two posters where no poster will be centered. This dead zone should be removed.

Keyboard shortcuts

This should be easy to implement because the functions to call are all already there.

Add widgets

Widgets:

  • next releasing
  • newest trailers, which means either highest id or furthest out release date

Sound effects cause playing media to be paused

The sound effects player in Theatricals seems to be configured wrong, as it interrupts playing media in the system media player. E. g. a podcast is playing and you open Theatricals. Podcast pauses immediately when the "click" selection sound plays.

Secrets.swift File

Can you share some dummy secret class just to run this project?

thank you very much :D

Slow trailer streams

Sometimes the trailers server seems to have a hard time serving the 720p files fast enough for smooth playback. It should be possible to find alternative servers, maybe also with a different XML source.

Add something that appears on app launch on iPad

When the app starts on iPad in portrait orientation, it shows a blank screen with the a "Theatrical Trailers" button in the top left. This is the default behavior of the NavigationView in portrait orientation, even with .navigationViewStyle(DoubleColumnNavigationViewStyle()) set.

To make the UX a little better in this case, there should be some kind of default view shown. Maybe even a Cover Flow style overview of available trailers.

Fix Cover Flow view on iPad

Currently, the Cover Flow view is inaccessible on iPad. It should be updated to adapt to iPad screen sizes and enabled in MovieInfoOverView.

Add rating prompt

The StoreKit API provides SKStoreReviewController.requestReview(). Some logic should be applied before showing the prompt. E. g. user has watched a trailer. This could be tied in with possible future telemetry data collection logic.

import StoreKit

/**
 Shows the App Store review prompt if appropriate.
 Appropriate means:
 - TODO
 */
class AppStoreReviewManager {
    static func requestReviewIfAppropriate() {
        let settings = Settings.instance
        // check if app was first launched more than one minute ago
        guard Date().timeIntervalSince(settings.firstLaunchedDate) > 2 * 60/* seconds */ else {
            return
        }
        // further checks, e.g. has watched at least one trailer
        
        // check that a no request for review of this app version has been made
        let currentVersion = UIApplication.shared.version
        let lastVersion = settings.lastReviewRequestAppVersion
        guard lastVersion == nil || lastVersion! != currentVersion else {
            return
        }
        
        // request for the review popup to be shown
        SKStoreReviewController.requestReview()
        
        // update last requested version number
        settings.lastReviewRequestAppVersion = currentVersion
    }
}

The above code includes a reference to the following extension of UIApplication:

extension UIApplication {
    /// Returns the `CFBundleShortVersionString` from *Info.plist*.
    var version: String {
        guard let appVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String else {
            fatalError("Couldn't find CFBundleShortVersionString in Info.plist")
        }
        return appVersion
    }
}

Update trailers more often and silently

The list of trailers should be updated without interrupting the user, and it should update more often. Currently, it is possible for the widget to display more up to date info than the app.

Widgets always show the same movie

The widgets are supposed to show a new movie each day, however that doesn't seem to be working as intended. The timeline provider code is likely where to fix this.

Remove Loading screen

App Review noted that showing a full screen modal that just says "Loading…" on first launch is not a good experience. For example, if the device is connected to the internet but maybe slowly (like App Review is these days - working from home over a VPN!), downloading the posters will take quite a while.

Ideas for improvement:

  • Launch app without any downloads, by loading the bundled XML from disk
  • If online, get updated XML
  • download movie posters at lower resolution
  • download movie posters asynchronously on a separate global DispatchQueue (add a spinner to MoviePosterView to indicate loading in progress)

Remove List View

The list view is visually less appealing than Cover Flow and doesn't include all features.

Dependencies for this: Cover Flow must work on iPad #16 and VoiceOver support #26 must be added for Cover Flow.

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.