Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

I'm not getting files of video, always been getting nil for even public videos #435

@kiramikacan

Description

@kiramikacan

I need to get .mp4 url of a Vimeo video, I'm using PlayerKit sdk in iOS, we have a pro Vimeo account, I'm using video request endpoint of VimeoNetworking sdk, endpoint returns me a VIMVideo object but the "Files" field always being nil.

Here is my code:

    let appConfiguration = AppConfiguration( clientIdentifier: "myIdentifier", clientSecret: "mySecret", scopes: [.Public, .Private, .Interact], keychainService: "")
    
    let vimeoClient = VimeoClient(appConfiguration: appConfiguration, configureSessionManagerBlock: nil)
    
    let authenticationController = AuthenticationController(client: vimeoClient, appConfiguration: appConfiguration, configureSessionManagerBlock: nil)
    
    authenticationController.accessToken(token: "myAccessToken") { result in
        switch result
        {
        case .success(let account):
            print("authenticated successfully: \(account)")
            
            let videoRequest = Request<VIMVideo>(path: "/videos/534313082")
            
            _ = vimeoClient.request(videoRequest) { (result) in
                switch result {
                case .success(let response):
                    let video: VIMVideo = response.model
                    print("retrieved video: \(video)")
                case .failure(let error):
                    print("error retrieving video: \(error)")
                }
            }
            
        case .failure(let error):
            print("failure authenticating: \(error)")
        }
    }

and here is the returned vimvideo object:

Screen Shot 2021-04-09 at 09 53 17

What am I doing wrong here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions