Android Vimeo视频上传 [英] Android vimeo video uploading

查看:177
本文介绍了Android Vimeo视频上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用vimeo SDK com.vimeo.networking:vimeo-networking上传视频? 在文档和 example 项目中,没有示例如何显示上传视频.此外,方法VimeoClient.getInstance().putContentVimeoClient.getInstance().postContent也未记录.我已经实现了方法:

How to upload video using vimeo SDK com.vimeo.networking: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.vimeo.networking.VimeoClient.POST(VimeoClient.java:1167) W/System.err:位于com.vimeo.networking.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.vimeo.networking.VimeoClient.POST(VimeoClient.java:1167) W/System.err: at com.vimeo.networking.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版本,这与我们的

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视频上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆