コード例 #1
0
 public void didPush()
 {
     StatusBarManager.hideStatusBar(true);
     Promise.Delayed(TimeSpan.FromMilliseconds(400)).Then(() => {
         var width   = MediaQuery.of(this.context).size.width;
         var height  = width * 9 / 16;
         var originY = (MediaQuery.of(this.context).size.height - height) / 2;
         AVPlayerPlugin.initVideoPlayer(this.widget.url, HttpManager.getCookie(), 0, originY, width, height,
                                        false,
                                        this.widget.needUpdate, this.widget.limitSeconds);
     });
 }
コード例 #2
0
        public override void initState()
        {
            base.initState();
            StatusBarManager.statusBarStyle(false);
            this._showNavBarShadow = true;
            this._isHaveTitle      = false;
            this._controller       = new AnimationController(
                duration: new TimeSpan(0, 0, 0, 0, 300),
                vsync: this
                );
            this._titleAnimationController = new AnimationController(
                duration: TimeSpan.FromMilliseconds(100),
                vsync: this
                );
            RelativeRectTween rectTween = new RelativeRectTween(
                RelativeRect.fromLTRB(0, 44, 0, 0),
                RelativeRect.fromLTRB(0, 13, 0, 0)
                );

            this._titleAnimation = rectTween.animate(this._titleAnimationController);
            SchedulerBinding.instance.addPostFrameCallback(_ => {
                AVPlayerPlugin.initVideoPlayer("", "",
                                               0, (int)MediaQuery.of(this.context).padding.top, MediaQuery.of(this.context).size.width,
                                               MediaQuery.of(this.context).size.width * 9 / 16, true);
                AVPlayerPlugin.hiddenPlayer();
                this.widget.actionModel.showChatWindow(false);
                this.widget.actionModel.startFetchEventDetail();
                this.widget.actionModel.fetchEventDetail(this.widget.viewModel.eventId, EventType.online);
            });
            this._loginSubId = EventBus.subscribe(EventBusConstant.login_success, args => {
                this.widget.actionModel.startFetchEventDetail();
                this.widget.actionModel.fetchEventDetail(this.widget.viewModel.eventId, EventType.online);
            });
            this._shareActionSubId = EventBus.subscribe(EventBusConstant.shareAction, args => {
                if (this.widget.viewModel.eventsDict.ContainsKey(this.widget.viewModel.eventId))
                {
                    this._showShareView(this.widget.viewModel.eventsDict[this.widget.viewModel.eventId]);
                }
            });
        }