初始化dom

/**
     */
    <input type="file" id="upload"/>

点播初始化

/** 
     * 调用 vhallDemandSDK 方法
     */
         vhallDemandSDK('#upload',{
            params: {
                sign:sign,  /**sign**/
                signed_at:time, /**获取sign的时间戳**/
                app_key:appKey
            },
            ready: function() {
                /**
                  * 初始化完成的回调函数
                **/
            },
            beforeUpload:function() {
                /**
                  * 准备中...(文件进行MD5转换过程)
                **/
            },
            progress:function(percent, file){
               /**
                 * 上传中...'
                 * 'percent 上传进度百分比'
                 * 'file 上传文档具体信息
               **/
            },
            uploadSuccess: function(res){
               /**
                 * 上传成功!'
                 * 'res 成功返回的回放ID records_id 和 活动ID webinar_id
               **/
            },
            error: function(msg,file,e){
                /**
                  * 上传出错'
                  * 'msg 错误返回的状态码信息'
                **/
            }
        })

错误状态码对应信息参见消息体

错误码 说明
10000 当前浏览器不支持断点上传
10001 请传入类似于"#id"选择器
10003 当前传入的dom不是input file
10004 不支持该文件格式
10005 上传文件大于10GB
10006 获取上传临时授权失败
10008 没有上传权限
10009 回放标题不能为空
11010 活动标题不能为空
11011 视频路径不能为空
10104 子账号信息不存在