Esempio n. 1
0
    public UploaderService(ConfigInfo configInfo, HttpService httpService,
                           UploadVideoService uploadVideoService,
                           GetAllVideosService getAllVideosService,
                           GetStatusAnimatedThumbnailService getStatusAnimatedThumbnailService,
                           GetAnimatedThumbnailService getAnimatedThumbnailService,
                           AddAnimatedThumbnailsToVideoService addAnimatedThumbnailsToVideoService,
                           UploadSubtitleToVideoService uploadSubtitleToVideoService,
                           DeleteVideoService deleteVideoService,
                           GetVideoService getVideoService,
                           ILogger <UploaderService> logger)
    {
        _configInfo = configInfo;
        httpService.SetAuthorization(_configInfo.Token);
        _uploadVideoService  = uploadVideoService;
        _getAllVideosService = getAllVideosService;
        _addAnimatedThumbnailsToVideoService = addAnimatedThumbnailsToVideoService;
        _uploadSubtitleToVideoService        = uploadSubtitleToVideoService;
        _getAnimatedThumbnailService         = getAnimatedThumbnailService;
        _getStatusAnimatedThumbnailService   = getStatusAnimatedThumbnailService;
        _getVideoService    = getVideoService;
        _deleteVideoService = deleteVideoService;
        _logger             = logger;
        var clientHttp = new System.Net.Http.HttpClient();

        clientHttp.BaseAddress = new Uri(_configInfo.ApiLink);
        clientHttp.DefaultRequestHeaders.Add(API_KEY_NAME, _configInfo.ApiKey);

        var videoInfoHttpService = new HttpService(clientHttp);

        _addVideoInfo          = new AddVideoInfo(videoInfoHttpService);
        _updateVideoThumbnails = new UpdateVideoThumbnails(videoInfoHttpService);
        _deleteVideo           = new DeleteVideo(videoInfoHttpService);
    }
Esempio n. 2
0
    public TestFileHelper()
    {
        var httpService = HttpServiceBuilder.Build();

        _uploadVideoService = UploadVideoServiceBuilder.Build(httpService);
        _deleteVideoService = DeleteVideoServiceBuilder.Build(httpService);
    }
Esempio n. 3
0
        private async void Upload_Clicked(object sender, EventArgs e)
        {
            if (ValidateForm() == true)
            {
                CurrentVideo.Repetitions = int.Parse(Repetitions.Text);
                CurrentVideo.Weight      = int.Parse(Weight.Text);
                bytes = File.ReadAllBytes(CurrentVideo.VideoPath);
                progressBar.IsVisible   = true;
                ProgressLabel.IsVisible = true;
                MainGrid.IsVisible      = false;
                await UploadVideoService.InsertItem(CurrentVideo);

                await StorageService.UploadFileAsync("videocontainer", new MemoryStream(bytes), CurrentVideo.VideoName, progress);

                progressBar.IsVisible   = false;
                ProgressLabel.IsVisible = false;

                await DisplayAlert("Success", "File has been uploaded", "OK");

                await Navigation.PushModalAsync(new UploadVideo(UserName), true);
            }
            else
            {
                await DisplayAlert("Failure", "It seems one or more of the information is incorrect, please try again", "OK");
            }
        }
Esempio n. 4
0
    public UploadVideoTest()
    {
        _testFileHelper = new TestFileHelper();
        var httpService = HttpServiceBuilder.Build();

        _uploadVideoService = UploadVideoServiceBuilder.Build(httpService);
    }
Esempio n. 5
0
 public CreateModel(IMapper mapper, UploadVideoService uploadVideoService)
 {
     _mapper             = mapper;
     _uploadVideoService = uploadVideoService;
 }
 public VideoController(UploadVideoService videoService, DisplayVideoService displayService)
 {
     VideoService   = videoService;
     DisplayService = displayService;
 }
Esempio n. 7
0
        public static void init()
        {
            ExtentCenter.initialize();
            //Profiler.setPoint("ServiceCenterStart");
            //CrashLogMgr.SendCrashInfo();
            //Profiler.setPoint("CrashReport");
            //GConfigMgr.init();
            //ConfigMgr.init();
            //ContactMgr.init();
            //Profiler.setPoint("ConfigMgr");
            //ÔÝʱ²»ÓÃ
            asyncExecInit();
            //StorageMgr.init();
            AccountMgr.init();
            //Profiler.setPoint("AccountMgrInit");
            //HeadImageMgr.init();
            //FMsgMgr.init();
            //MobileContactMgr.init();
            //SnsMsgMgr.init();
            SnsAsyncMgr.init();
            //GetPackageListMgr.checkInit();
            //Profiler.setPoint("MgrInit");
            //qconversationMgr = new QConversationMgr();
            //bconversationMgr = new BConversationMgr();
            //conversationMgr = new ConversationMgr();
            //bannerManager = new BannerManager();
            //occonversationMgr = new OfficialAccountConversationMgr();
            //webMMMgr = new WebMMMgr();
            //Profiler.setPoint("NewMgr");
            NetSceneSyncCheck.initSyncCheck();
            sceneAuth    = new NetSceneAuth();
            sceneNewInit = new NetSceneNewInit();
            sceneNewSync = new NetSceneNewSync();

            sceneReg                = new NetSceneReg();
            sceneNewReg             = new NetSceneNewReg();
            sceneGetUserName        = new NetSceneGetUserName();
            sceneBindOpMobileForReg = new NetSceneBindOpMobileForReg();
            //sceneResetPwd = new NetSceneResetPwd();
            sceneSearchContact = new NetSceneSearchContact();
            sceneVerifyUser    = new NetSceneVerifyUser();
            //sceneBatchGetHeadImg = new NetSceneBatchGetHeadImg();
            //sceneBindQQ = new NetSceneBindQQ();
            //sceneBindMobile = new NetSceneBindOpMobile();
            sceneUploadVoice = new UploadVoiceService();
            //sceneDownloadVoiceService = new DownloadVoiceService();
            //sceneSendInviteEmail = new NetSceneSendInviteEmail();
            sceneSendMsg    = new NetSceneSendMsg();
            sceneSendMsgOld = new NetSceneSendMsgOld();
            //sceneCreateChatRoomService = new CreateChatRoomService();
            sceneAddChatRoomMemberService = new AddChatRoomMemberService();
            //sceneDelChatRoomMemberService = new DelChatRoomMemberService();
            //sceneGroupCardService = new GroupCardService();
            //sceneSendFeedback = new NetSceneSendFeedback();
            //sceneSendVerifyEmail = new NetSceneSendVerifyEmail();
            //sceneGetVerifyImage = new NetSceneGetVerifyImage();
            //sceneChatTyping = new NetSceneChatTyping();
            sceneDownloadVideo = new DownloadVideoService();
            sceneUploadVideo   = new UploadVideoService();
            //scenePushChannelReg = new NetScenePushChannelReg();
            //scenePushChannelUnReg = new NetScenePushChannelUnReg();
            //pushNotifyMgr = new PushNotifyMgr();
            //sceneNetUploadMContact = new NetSceneUploadMContact();
            //sceneNetGetMFriend = new NetSceneGetMFriend();
            //sceneLogout = new NetSceneLogout();
            //sceneGetUpdateInfo = new NetSceneGetUpdateInfo();
            //sceneUploadHDHeadImg = new NetSceneUploadHDHeadImg();
            //sceneDownloadHDHeadImg = new NetSceneDownloadHDHeadImg();
            //sceneGeneralSet = new NetSceneGeneralSet();
            //sceneBatchGetContactProfile = new NetSceneBatchGetContactProfile();
            sceneBatchGetContact = new NetSceneBatchGetContact();
            //sceneExpose = new NetSceneExpose();
            //sceneGetPSMImg = new NetSceneGetPSMImg();
            //sceneGetQRCode = new NetSceneGetQRCode();
            sceneSendCard = new NetSceneSendCard();
            //sceneClientPerfReport = new NetSceneClientPerfReport();
            sendAppMsg = new NetSceneSendAppMsg();
            //Profiler.setPoint("NewScene");
            //sessionMgr = new SessionMgr();
            //statReportMgr = new StatReportMgr();
            //vuserInfoMgr = new VUserInfoMgr();
            //mobileContactMgr = new MobileContactMgr();
            //perfReportMgr = new ClientPerfReportMgr();
            //reportService = new ReportService();
            AccountMgr.loginStartupNotify();
            //Profiler.setPoint("ServiceCenterEnd");
        }