Giter Site home page Giter Site logo

aspvideoplayer's People

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  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  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aspvideoplayer's Issues

A lot ASPVideoPlayerView don't play video

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?

Video loading reproduce in another views

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.

Resize Button Is Outside of View

Hi thank your for sharing this wonderful library, I tried your library to show video from URL and working great, the only problem is the Fullscreen button is always located outside of the view so I can't clicked it . So is possible to fix the Fullscreen button position? My view looked like this

Resize Button Outside

Default Font

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

How to create custom view on video player

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

Screen Shot
1

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?

Full Screen Mode

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?

How to play specific video

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.

display the video

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.")
        }

Show time left instead of length of video

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

Controls Visible

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.

How can i delegate didpressednextbutton?

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?().

Close Button For ASPVideoPlayer

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.

Background Video need to stop.

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

  • app is move from foreground to background
  • open another app like safari
  • again my app, still video is playing background (Details page have video play option but i am in list page also playing)
    can you please help me
    thanks

KVO and time observation breaks on iOS 11

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.

autoPlay

Is there a way to put auto play function to the ASPVideoPlayer class? When I load, view controller I need automatic play video file.

maximize option is not visible

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.

progress more smooth?

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?

can not seek video when put in sliding panel

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
Screen Shot 2019-06-19 at 17 25 19

When debug i saw the func cancelTracking always call when i seek the progressbar

Video Stuck on iPhone 7 and 7 Plus occassionally

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.

Button State

How can I change the button state on PlayPauseButton?

Cannot pause when pause button is clicked for audio

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?

Foreground problem

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)

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.