Giter Club home page Giter Club logo

Comments (8)

piemonte avatar piemonte commented on May 22, 2024

hey @confile that's a nice idea.

from player.

confile avatar confile commented on May 22, 2024

@piemonte Player is a really great lib. Thanks for sharing.
Are there any other fillModes supported right now. Like aspect fill?

from player.

vbergae avatar vbergae commented on May 22, 2024

(I know it's a bit old, but may help)

@confile AVFoundation defines 3 constants:

AVLayerVideoGravityResizeAspect
AVLayerVideoGravityResizeAspectFill
AVLayerVideoGravityResize

More Info: https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVFoundation_Constants/index.html#//apple_ref/doc/constant_group/Video_Gravity

from player.

matthewspear avatar matthewspear commented on May 22, 2024

@piemonte Has this been implemented? I'd like to jump into open source and this seems a simple enough addition.

from player.

piemonte avatar piemonte commented on May 22, 2024

hey @matthewspear thanks for checking in. i'm swamped with some other things so feel free to submit a PR. contributions are always welcome. ✌️

from player.

matthewspear avatar matthewspear commented on May 22, 2024

Quite new to submitting to OS projects - How does this look?
I took inspiration from the way a UIImageView handles content mode:

public enum FillMode: String
{
    case resize = "AVLayerVideoGravityResize"
    case resizeAspectFill = "AVLayerVideoGravityResizeAspectFill"
    case resizeAspectFit = "AVLayerVideoGravityResizeAspect"
}

one other alternative would be to just use resize, aspect, aspectFill, which would you prefer?

Can make a pull request once happy with preference or have any other ideas!

Matt

from player.

piemonte avatar piemonte commented on May 22, 2024

Hey @matthewspear apologies, i didn't see your last comment. The way you have it is great, I'll just paste it into the class and give you props in the comment.

from player.

matthewspear avatar matthewspear commented on May 22, 2024

👍

from player.

Related Issues (20)

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.