Coder Social home page Coder Social logo

playerkit's People

Contributors

bryantjustin avatar dependabot[bot] avatar ghking avatar jasonhawkins avatar jumhyn avatar legonaftik avatar mikew-personal avatar nicolelehrer avatar sof4real avatar supperspidey avatar wilrnh 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

playerkit's Issues

Swift version bump.

Reading the code, I realized a good part of it stills uses Swift 4.2
Are there any plans to bump project specs to use Swift 5.1.3? If not, would you mind if I submitted a pull-request with these changes?

Plans to migrate to swift 4?

It looks like this project is somewhat recently active, but I don't see a swift 4 branch or any reference to the new language version. Will this project support swift4 at any point?

Play a video

How do you play a video after getting the videos using VimeoNetworking?

Thanks!

Playing 360 video - explore

When playing 360 video player doesn't support "looking around" with device or rotating using drag gestures.

Is it planned to support this like most players do ? Or only way is to handle that on our own ?

Question about Architecture

Great library! I have a question about architecture. I checked out your included sample project and this is how the view controller is setup:

class PlayerViewController: UIViewController, PlayerDelegate {
    private let player = RegularPlayer()
}

Notice how the view controller does not use dependency injection. The view controller simply creates its player directly.

My question, is let's say I create my own custom players using PlayerKit such as:

final class MusicPlayer: NSObject, Player, ProvidesView { }
final class AudioBookPlayer: NSObject, Player, ProvidesView { }

Would you suggest having custom view controllers for each player such as the following?

final class MusicPlayerViewController: UIViewController, PlayerDelegate {
    private let player = MusicPlayer()
}

final class AudioBookPlayerViewController: UIViewController, PlayerDelegate {
    private let player = AudioBookPlayer()
}

Basically, each view controller creates it's player directly.

Does this make sense? Any thoughts?

How do I tell that the video is finished playing?

PlayerKit's been pretty easy to use but I have a few issues that have been a bit of a struggle.
I've been trying to determine when a video has finished playing with the following:

    if player.time >= player.duration {
            delegate?.didFinishPlaying(controller: self)
        }

But there are times when a streaming video never quite reaches the end. i.e. time is a couple seconds off from duration but I can't get the thing to play to the end.

Is the solution to extend RegularPlayer to callback when AVPlayerItemDidPlayToEndTime gets posted?

Slow start of stream videos

If user doesn't have fast internet connection then the player starts too late (sometimes it starts only when the whole video is downloaded). Could you, please, allow PlayerKit users to choose if they want to configure the player so it starts playing video ASAP. It should be very easy to implement since you're using AVPlayer under the hood. Providing us ability to set its automaticallyWaitsToMinimizeStalling property will be enough.

Loop a video

@ghking Iam a pro account holder of Vimeo.
Integrated PlayerKit as per instructions.
I am unable to loop a video.
Moreover, I am unable to determine when a video ends.

Authentication support for Vimeo .mp4 files

Hello,
I am using Vimeo Pro account to access the private videos. Our server team provides us the actual .mp4 CDN url from the Vimeo as part of their api response and I am able to play the video in the mobile app. But considering security aspect, the user/hacker can get the actual url by snooping the api using proxy like Charles and get access to actual videos. Can we use any authentication mechanism from the mobile app to prevent access to .mp4 url without prior authentication?

Any support for offline video?

Hi there! I'm wondering if this SDK (or perhaps a future planned release) will include any support for playing videos while the user is offline?

Architecture Question (Follow-Up to #69)

I have a follow-up question about #69 and would love to get an opinion on this to make sure I am using PlayerKit correctly.

With PlayerKit, there is a protocol ProvidesView which allows the player to return a view. In my app, I have two objects: Video and Song. Therefore, I have two different players: VideoPlayer and AudioPlayer. The VideoPlayer returns a view backed by AVPlayerLayer just like your sample project. However, AudioPlayer returns a UIView with an image.

In my PlayerViewController, I have next/previous buttons so that a user can skip items. This means the view from ProvidesView needs to update after every tap to next/previous button.

My question is, since the view from ProvidesView is completely different between a VideoPlayer and AudioPlayer, would you have just 1 PlayerViewController to handle this? I included the code below of how this would be done (thanks to your help in #69 ). If not 1 PlayerViewController, maybe I should create 2 different view controllers: VideoPlayerViewController and AudioPlayerViewController? For songs (audio), I would use SDWebImage to load images for the view where as with videos, I would follow what is in your sample project with RegularPlayer --- it seems this should not all be done with 1 view controller?

Thank you!

protocol Player { // Omitted for brevity }
protocol ProvidesView { // Omitted for brevity }

class VideoPlayer: Player, ProvidesView { // Omitted for brevity }
class AudioPlayer: Player, ProvidesView { // Omitted for brevity }

class MyViewController<T: Player & ProvidesView>: UIViewController {

    var player: T!
    
    static func configured(with player: T) -> MyViewController {
        let vc = MyViewController()
        vc.player = player
        return vc
    }

    private func didTapNextButton() {
        // Need to update view with a video or image depending on if the object is a `Video` or `Song` object
    }

    private func didTapPreviousButton() {
        // Need to update view with a video or image depending on if the object is a `Video` or `Song` object
    }
}

TextTracks are empty

Hi there... I was checking the availableTextTracks property and also the closure fetchTextTracks, but both are empty, although there are subtitles at the player on website... Is there any configuration we area missing? Thanks a lot!

Example project is not playing the video

I downloaded the pod and tried to play the example project in the Simulator. However, I got the ErrorOptional(Error Domain=NSOSStatusErrorDomain Code=-12938 "(null)"), even without clicking on the play button.

Question about AVPlayerItemDidPlayToEndTime

I noticed that AVPlayerItemDidPlayToEndTime is not part of PlayerKit. Do you plan on supporting this?

If not, how would you suggest to implement it -- should it be part of PlayerDelegate? If yes, then we would need to fork the repo right to include it? Or maybe it should not be part of the delegate?

Note, I seen issue #45

Full Screen View

Hi,
How to make it in the full-screen toggle option?
Can you help. please

CredStore - performQuery - Error copying matching creds

Hi, I added the player to a view as in the example project, but I am getting this error:

CredStore - performQuery - Error copying matching creds. Error=-25300, query={
class = inet;
"m_Limit" = "m_LimitAll";
"r_Attributes" = 1;
sync = syna;
}

I have no idea how to debug this. Any ideas?

My implementation in Swift 4 to set the video is a little bit different

    player.set(AVURLAsset(url: URL(string: videoURLString)!))
    player.play()

Extended example for playing w/ Vimeo Video URL?

Hello!

I'm successfully using the Vimeo API to retrieve information about my Business account videos.

I'm trying to incorporate PlayerKit into our iOS application and am using your example code to just do the very baseline.

I'm receiving an error back of '-999'.

screen shot 2018-02-22 at 3 24 33 pm

Not sure if I'm using the right URL. I'm pulling it out of the returned JSON from a GET request for that video.

screen shot 2018-02-22 at 3 27 55 pm

Am I using the wrong URL? Are there newer examples I can reference?

Error playing Vimeo videos

Hello!
I'm developing an app with Vimeo Pro videos.
Backend gives urls like this: "https://vimeo.com/283472685/e184291bed", but PlayerKit reports error "PlayerKit_Example[1709:19210] ๐Ÿšซ Optional(Error Domain=NSOSStatusErrorDomain Code=-12660 "(null)")".
Is there "getting started" for newbies (looking for it on developer.vimeo.com, but have no success)?
Thank you in advance!

Sutitles

Hi there! Does the VideoPlayer support subtitles? How It works? Thanks a lot!

New Logo/Icon proposal

Good day sir. I am a graphic designer and i am interested in designing a logo for your good project. I will be doing it as a gift for free. I just need your permission first before I begin my design. Hoping for your positive feedback. Thanks

UIWebview is deprecated

Hi! I'm using the SDK for playing videos and worked fine, however, when I'm send the app for the AppStore, I get an warning complaining about the UIWebview (I think it's on the AFNewtorking lib)... Any plans to update the lib or us Alamofire for example? Thanks a lot!

Error Playing Video on iOS 11

Getting following errors while trying to load same URL multiple times in iOS 11
1)
Error=-25300, query={
class = inet;
"m_Limit" = "m_LimitAll";
"r_Attributes" = 1;
sync = syna;

  1. Task <188925AF-FA5D-4310-BB4D-45CC9E45A41F>.<2> finished with error - code: -1002

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.