Comments (8)
hey @confile that's a nice idea.
from player.
@piemonte Player is a really great lib. Thanks for sharing.
Are there any other fillModes supported right now. Like aspect fill?
from player.
(I know it's a bit old, but may help)
@confile AVFoundation defines 3 constants:
AVLayerVideoGravityResizeAspect
AVLayerVideoGravityResizeAspectFill
AVLayerVideoGravityResize
from player.
@piemonte Has this been implemented? I'd like to jump into open source and this seems a simple enough addition.
from player.
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.
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.
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.
👍
from player.
Related Issues (20)
- Suppor for VTT?
- Video Controls HOT 1
- AVPlayer times out on iOS 14 beta HOT 2
- Can add playback speed support HOT 1
- Aspect ratio not working on iOS 14 beta 6 HOT 2
- iOS 14 problem with portrait video HOT 2
- PlayerDelegate playerBufferTimeDidChange, it doesnt return what player
- How to create custom view on video player
- How to add HTTP Headers with the url. HOT 1
- Setting up Player with AVPlayerItem.
- How can Local Video Play HOT 1
- cannot play locally stored mp4 files HOT 1
- Can't pause video when open from the URL. HOT 1
- Not working
- Orientation & play issue
- Video doesn't play on iPhone 6 ios 12.4 HOT 2
- Player may be crash.
- No thing display
- Dont Work
- update to better support SwiftUI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from player.