Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should be the field filter to get play links? #544

Open
Cosmopal opened this issue Mar 16, 2022 · 1 comment
Open

What should be the field filter to get play links? #544

Cosmopal opened this issue Mar 16, 2022 · 1 comment

Comments

@Cosmopal
Copy link

Summary

The documentation strongly recommends applying field filters to reduce the amount of data we get back, but it doesn't explain the video output schema. What should the field filters be if we want to get the HLS/DASH links of a video we own?

The documentation only suggests:

vimeoApiClient.fetchVideo(
  uri = uri,
  fieldFilter = null,
  queryParams = null,
  cacheControl = null,
  callback = vimeoCallback(
    onSuccess = {
      // Use the video.
    },
    onError = {
      // Voice the error.
    }
  )
) 

and then

val dashLink: String? = video.play?.dash?.link
val hlsLink: String? = video.play?.hls?.link
@anthonycr
Copy link
Contributor

The field filters directly map to the JSON name in the annotation applied to each property. So for example, video.play?.dash?.link wants the link in the dash property in the play property. Looking at the JSON annotations, you need to use play.dash.link as your field filter. Since you also want the HLS link, you need to add play.hls.link as well. So your full field filter is play.dash.link,play.hls.link. Hope that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants