private void PublishVideo()
        {
            if (publisher == null)
            {
                publisher = gameObject.AddComponent <VimeoPublisher>();
                publisher.Init(this);

                publisher.OnUploadProgress += UploadProgress;
            }

            publisher.PublishVideo(recorder.encodedFilePath);
        }
示例#2
0
        //Used if you want to publish the latest recorded video
        public void PublishVideo()
        {
            Debug.Assert(isReady);
            isUploading    = true;
            uploadProgress = 0;

            if (publisher == null)
            {
                publisher = gameObject.AddComponent <VimeoPublisher>();
                publisher.Init(this, m_byteChunkSize);

                publisher.OnUploadProgress += UploadProgress;
                publisher.OnUploadError    += UploadError;
            }

            if (replaceExisting)
            {
                if (!isReady)
                {
                    // bad situation - need some waiting point
                    Debug.LogWarning("Videos fetching is not ready for publishing with replacement - need to fetch project's videos list first");
                }

                if (currentVideo.id <= 0)
                {
                    if (!string.IsNullOrEmpty(videoName))
                    {
                        SetVimeoIdFromName();
                    }
                }

                publisher.PublishVideo(encoder.GetVideoFilePath(), currentVideo.id);
            }
            else
            {
                publisher.PublishVideo(encoder.GetVideoFilePath());
            }
        }
        private void PublishVideo(string filePath)
        {
            isUploading    = true;
            uploadProgress = 0;

            if (publisher == null)
            {
                publisher = gameObject.AddComponent <VimeoPublisher>();
                publisher.Init(this);

                publisher.OnUploadProgress += UploadProgress;
            }

            publisher.PublishVideo(filePath);
        }
        //Used if you want to publish the latest recorded video
        public void PublishVideo()
        {
            isUploading    = true;
            uploadProgress = 0;

            if (publisher == null)
            {
                publisher = gameObject.AddComponent <VimeoPublisher>();
                publisher.Init(this, m_byteChunkSize);

                publisher.OnUploadProgress += UploadProgress;
                publisher.OnNetworkError   += NetworkError;
            }

            publisher.PublishVideo(encoder.GetVideoFilePath());
        }