vimeo-networking-java
vimeo-networking-java copied to clipboard
What should be the field filter to get play links?
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
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.