Ejemplo n.º 1
0
        private void initPlay(object uaiObj)
        {
            UrlAndIndex uai   = (UrlAndIndex)uaiObj;
            IUrl        ui    = uai.Url;
            int         index = uai.Index;

            if (ui.VideoInfos == null || ui.VideoInfos.Length == 0)
            {
                return;
            }
            while (index == VideoInfoManager.Instance.SourceIndex)
            {
                PlayControlViewModel vm = getPlayCtrlModel();
                if (vm.IsReadyToPlay())
                {
                    this.Dispatcher.BeginInvoke(new Action(() =>
                    {
                        playVideoInfos(vm, ui);
                    }), null);
                    break;
                }
                Thread.Sleep(100);
            }
        }