예제 #1
0
        //このメソッド以降はWebBrowserプロパティはnullではない
        public void OpenVideo()
        {
            while (VideoData.ApiData == null)
            {
                Thread.Sleep(50);
            }

            //ここからInvoke可能
            WebBrowser.ObjectForScripting = new ObjectForScriptingHelper(this);
            IsPlaying     = true;
            IsInitialized = true;
            Mylist.EnableButtons();

            Console.WriteLine("VideoUrl:" + VideoData.ApiData.GetFlv.VideoUrl);

            if (VideoData.VideoType == NicoNicoVideoType.RTMP)
            {
                InvokeScript("JsOpenVideo", VideoData.ApiData.GetFlv.VideoUrl + "^" + VideoData.ApiData.GetFlv.FmsToken);
            }
            else
            {
                InvokeScript("JsOpenVideo", VideoData.ApiData.GetFlv.VideoUrl);
            }


            Volume = Properties.Settings.Default.Volume;
            ChangeVolume(Volume);

            IsRepeat = Properties.Settings.Default.IsRepeat;
        }
예제 #2
0
        public void OpenVideo()
        {
            //ここからInvoke可能
            IsPlaying     = true;
            IsInitialized = true;
            Mylist.EnableButtons();

            //RTMPの時はサーバートークンも一緒にFlashに渡す
            if (VideoData.VideoType == NicoNicoVideoType.RTMP)
            {
                InvokeScript("AsOpenVideo", VideoData.ApiData.GetFlv.VideoUrl + "^" + VideoData.ApiData.GetFlv.FmsToken);
            }
            else
            {
                InvokeScript("AsOpenVideo", VideoData.ApiData.GetFlv.VideoUrl);
            }

            IsRepeat = Properties.Settings.Default.IsRepeat;
        }