Beispiel #1
0
        void _playInfoFactory_HttpSucceed(object sender, HttpFactoryArgs <Object> args)
        {
            _playMessage.PlayInfos      = _playInfoFactory.PlayInfos;
            _playMessage.HasPreProgram  = ChannelUtils.CreatePreviousIndex(_playInfo.ProgramIndex, _playInfo.ChannelDetailInfo) >= 0 ? true : false;
            _playMessage.HasNextProgram = ChannelUtils.CreateNextIndex(_playInfo.ProgramIndex, _playInfo.ChannelDetailInfo) >= 0 ? true : false;
            _playMessage.ShareInfo      = new PlayShareInfo(
                ChannelUtils.CreateChannelId(_playInfo.ProgramIndex, _playInfo.ChannelDetailInfo),
                _playMessage.Title, _playInfo.ChannelDetailInfo.ImageUri);

            var info = _playInfoFactory.CreatePlayInfo(_playFileType);

            if (info != null)
            {
                _playMessage.CurrentPlayInfo = info;
                Play(info);
                if (PlayMessageAction != null)
                {
                    PlayMessageAction(_playMessage);
                }
            }
            else
            {
                if (PlayErrorAction != null)
                {
                    PlayErrorAction("无法获取影片播放地址");
                }
            }
        }
Beispiel #2
0
        public override void NextProgram()
        {
            int nextIndex = ChannelUtils.CreateNextIndex(_playInfo.ProgramIndex, _playInfo.ChannelDetailInfo);

            if (nextIndex >= 0)
            {
                End();
                InitInformation();
                _playInfo.UpdateProgramIndex(nextIndex);
                BeginGetPlayInfo();
            }
        }