如何使用 vimeo SDK 上传视频com.vimeo.networking:vimeo-networking
?在文档和示例项目中没有示例如何上传视频。还有方法VimeoClient.getInstance().putContent
,VimeoClient.getInstance().postContent
没有记录。我已经实现了方法:
VimeoClient.getInstance().postContent(videoUri, CacheControl.FORCE_CACHE, null, new ModelCallback<Video>(Video.class) {
@Override
public void success(Video video) {
toast("Staff Picks Success! " + video);
}
@Override
public void failure(VimeoError error) {
toast("Staff Picks Failure :( " + error);
}
});
但我在尝试上传视频时收到错误消息。这是堆栈跟踪
W/System.err: java.lang.IllegalArgumentException: url == null W/System.err: at okhttp3.Request$Builder.url(Request.java:121) W/System.err: at retrofit2.RequestBuilder.build( RequestBuilder.java:204) W/System.err: 在retrofit2.RequestFactory.create(RequestFactory.java:67) W/System.err: 在retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:122) W/System.err:在 retrofit2.OkHttpCall.enqueue(OkHttpCall.java:58) W/System.err: 在 retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.enqueue(ExecutorCallAdapterFactory.java:57) W/System.err: 在 com.vimeo.networking.VimeoClient.POST (VimeoClient.java:1167) W/System.err: 在 com.vimeo.networking.VimeoClient.postContent(VimeoClient.java:1061)