andreipitis / aspvideoplayer Goto Github PK
View Code? Open in Web Editor NEWA simple video player that allow animations to be performed on the view during playback.
License: MIT License
A simple video player that allow animations to be performed on the view during playback.
License: MIT License
Hi,
I have got UIPager with one ASPVideoPlayerView at it.
I am scrolling and for some time player don't start. State is readyToPlay and closure is triger but movie don't start.
Any idea how to fix this?
how can i stop video?
plz help me.
Pretty much the subject itself. And thank you for such a cool project :)
Hello, I have a problem with the player, in the case of me to load the player and leave the view after it, then the video not loading is not uninitialized, this generates that the audio of the video live in the app without I can remove it, this only happens when it is loading, I play and I leave the view without allowing to play the video.
Hi, thank you for a nice Video player!
I think it should be possible to change the font for the labels which shows current time and video length.
Greetings from Knut
iOS Developer at Foap
I can't find any method to change playback speed
In swift 5 I got this issue while compiling. Shall we set a default value for readyToPlayVideo?
How can I Play video from youtube link?
I am making video player in swift. I add some custom buttons and functionality for standard video player: 1. Playing video from URL (server) 2. Showing indicator while loading video like in VK 3. Add custom buttons to control (stop, pause buttons) and its working fine. I'm trying to implement custom view on player like below screen shot and play in custom duration in loop.
I need this type of view on video player
I can't understand how I can implement my tasks(For video url) there. Can you give some advice, which is the better way to do this?
Hi there,
How do I configure ASPVideoPlayer to allow audio of video assets to continue when the app enters the background?
Thanks!!!
Drew.
I am using ASPVideoPlayer
I need to detect stopping video, so I need to go to other screen at that time
After several attempts, I think I understand that your ASPVideoPlayer does not work with .mov
video files, for example with this path: /var/mobile/Containers/Data/Application/DD33257B-561C-4E8A-AC16-1794AB2846A6/Documents/myVideo.mov
. How can I use it? Thank you
There is no method related to Full-screen mode. There should be button simple at the bottom right corner so you should choose whether the fullscreen mode is portrait or landscape.
Please add this functionality or it you already added it and I don't know then sorry for my mistake and Could you please tell me whether this functionality is implemented or not?
Hi Andre,
I am using ASPVideoPlayer
and passing 4 url for video.
Here is my code
videoPlayer.videoAssets = assetURL
videoPlayer.gravity = .aspectFit
videoPlayer.shouldLoop = true
videoPlayer.startPlayingWhenReady = true
Its Playing from 1st url.
Is there any variable to pass which video have to play.
For example, I have to play 3rd video, i clicked on 3rd item of collection view then 3rd video should play. This time its playing from 1st.
Please help me asap. I have to upload this project ASAP. Only this function is left.
Thanks in advance.
hi I can't display the video, how shall I do it ? I have a view that I want to display the video in after the user has recorded a video or chooses a video from camera roll
import ASPVideoPlayer
class EditVC: UIViewController {
//Outlets
@IBOutlet weak var postBtnOutlet: UIButton!
@IBOutlet weak var videoView: ASPVideoPlayerView!
var selectedImage: UIImage?
var videoURL: URL!
let videoPlayer = ASPVideoPlayerView()
override func viewDidLoad() {
super.viewDidLoad()
videoPlayer.videoURL = videoURL
videoView.readyToPlayVideo = {
print("Video has been successfully loaded and can be played.")
}
videoView.startedVideo = {
print("Video has started playing.")
}
Hi, thank you for a nice Video player!
When you look to other players like e.g. YouTube, they usually show time left to the right, where ASPVideoPlayer currently show the length of the video. In my opinion time left is more accurate.
Greetings from Knut
iOS Developer at Foap
Hi it would be great help if you add controls Visible/Invisible method in the newly added delegate too so if we want to do certain stuff when controls are on the screen, we can do that. If you would like me to fork and send a pull request for this, let me know.
I want catch action of nextbuttonpressed. I tried but it's not working. i added optional func in delegate and called from control.didpressednextbutton {} function as strongSelf.delegate?.didpressednextbutton?().
I have just upgraded my project and I found this issue.
What shall I do? Cant afford too much modification
Hello team,
I'm not able to play the single .mp4 video format coming from the URL.
I also tried the demo example but it doesn't play the video.
Please help.
Is there any option to add a close or dismiss button so user can click on that and dismiss the view controller to go back.
I used this code for background stop
videoPlayer.configuration = ASPVideoPlayer.Configuration(videoGravity: .aspectFit, shouldLoop: false, startPlayingWhenReady: true, controlsInitiallyHidden: true, allowBackgroundPlay: false)
But this steps i am getting issue
I filed an issue with Apple about this, but it seems like all the observations break on iOS 11 (periodic time observer and KVO). Even the new Swift 4 KVO methods are broken.
It works fine on iOS 10 devices/simulators but doesn't work at all on iOS 11 or 11.1 (even against older binaries built against iOS 10 using Xcode 8.3.3).
Other players like Player do not have this problem so it strikes me as either a race condition or a framework bug.
I'll update this once I hear back, but just wanted to make you aware.
Is there a way to put auto play function to the ASPVideoPlayer class? When I load, view controller I need automatic play video file.
Want to change video speed like 1x, 2x etc
following is my code to create videoPlayer
`var videoPlayer: ASPVideoPlayer = {
let player = ASPVideoPlayer()
player.translatesAutoresizingMaskIntoConstraints = false
player.tintColor = UIColor.white
player.backgroundColor = UIColor.black
player.isUserInteractionEnabled = true
player.isOpaque = true
// player.gravity = .aspectFitvideo
return player
}()`
how do i set maximize option ? I can't see icon to maximize video.
Thank you for this pod.
Hey. Is there a way to have the progress more smooth?
Tried:
let positionDouble = Double(self.videoPlayer.currentTime)
let durationDouble = Double(self.videoPlayer.videoLength)
let float = Float(positionDouble / durationDouble)
as well as the progress
by self.videoPlayer. Both values are fired in 3-4-5% steps. So my progress slider is "jumping" from value to value. Is it possible to receive 0.5-1% value steps of the current video play progress?
Hello. First thanks you for very nice project. I just starting with it
When put ASPVideoVC inside ContainerView, ContainerView inside SlidingPanel, the problem is I can not slide the progress. Can you help?
As the screenshot below, i cant seek the progress only max 1 cm, after that it stop highlight then back to normal size
When debug i saw the func cancelTracking always call when i seek the progressbar
ASPVideoPlayer-master/ASPVideoPlayer/Classes/ASPVideoPlayerView.swift:391:52: Type 'CMTime' has no member 'kCMTimeZero'
I use ASPVideoPlayer as a splash video. I don't show any controls. On iPhone 7 and 7 plus, the video is sometimes stuck. Even if i restart the app or reinstall the app from Xcode the issue persists. If I restart the phone the video starts playing again. I tried a fix here https://github.com/alfredthekkan/ASPVideoPlayer
I added an observer to frame rate. But sometimes the player.rate is 1. Still the video is stuck.
Any help on this is appreciated.
hello. that's great lib. Does it support for rtsp/rtmp?
By using ASPVideoPlayer how to stop and play using any method handling ?
How can I change the button state on PlayPauseButton?
Video play but no sound , i add earphone sound is on in earphones.
This library is meant for video but I digged through the code base and realized that it used AVPlayer so I tried to use to play and mp3 and it works fine but play and pause functionality does not work when it is an audio file. Is there any reason why this does not work?
I want to show image as place holder and when video load then play video.
I open any video and i close viewController after 5 second. Then, i open another video and i press phone home button for app did enter background. I wait until videos time after open app (foreground) and video continue but old video (first opened video) is play again.(just voice).
My Close Button Code
self.videoPlayer.videoPlayerControls.stop()
self.videoPlayer.videoAssets.removeAll()
self.videoPlayer.delegate = nil
self.videoPlayer = nil
self.dismiss(animated: true, completion: nil)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.