如何使用vimeo SDK com.vimeoworking:vimeo-networking上传视频? 在文档和 example 项目中,没有示例如何显示上传视频.此外,方法VimeoClient.getInstance().putContent和VimeoClient.getInstance().postContent也未记录.我已经实现了方法:
How to upload video using vimeo SDK com.vimeoworking:vimeo-networking? In the documentation and example project there is no example how to upload video. Also methods VimeoClient.getInstance().putContent and VimeoClient.getInstance().postContent are not documented. I've implemented method:
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); } });但是尝试上传视频时收到错误消息.这是堆栈跟踪
but I'm receiving error when try to upload video. Here is stack trace
W/System.err:java.lang.IllegalArgumentException:url == null W/System.err:位于okhttp3.Request $ Builder.url(Request.java:121) W/System.err:在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.vimeoworking.VimeoClient.POST(VimeoClient.java:1167) W/System.err:位于com.vimeoworking.VimeoClient.postContent(VimeoClient.java:1061)
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: at retrofit2.RequestFactory.create(RequestFactory.java:67) W/System.err: at retrofit2.OkHttpCall.createRawCall(OkHttpCall.java:122) W/System.err: at retrofit2.OkHttpCall.enqueue(OkHttpCall.java:58) W/System.err: at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall.enqueue(ExecutorCallAdapterFactory.java:57) W/System.err: at com.vimeoworking.VimeoClient.POST(VimeoClient.java:1167) W/System.err: at com.vimeoworking.VimeoClient.postContent(VimeoClient.java:1061)
推荐答案
您所指的Vimeo网络库不支持上传;一个单独的上传库将在以后发布.要上传,您需要自己遵循API 文档.
The Vimeo Networking library you are referring to does not support upload; a separate upload library will be released at a later date. In order to upload you will need to follow the API documentation yourself.
如文档所述,这是一个分几个步骤的过程.我们已将过程简化为2个步骤,但是尚未向公众公开.由于没有开源的4步Java库,因此在向公众开放之前,我们尚未发布简化的Java版本,这与我们的 iOS对应版本.
As the documentation states, it's a several step process. We have simplified the process down to 2 steps, however, it is not yet available to the public. Since there was no open sourced 4 step java library, we are not yet releasing the simplified java version until we open it up to the public, which is different than our iOS counterpart.
不幸的是,如果您现在想在Android中上载,则需要遵循这些API文档.
Unfortunately for now you will need to follow those API docs if you wish to upload in Android.
更多推荐
Android Vimeo视频上传
发布评论