public async void JumpTo(string videoUrl) { VideoUrl = videoUrl; WatchApi = new NicoNicoWatchApi(videoUrl + "?watch_harmful=1", this); IsActive = true; Status = "動画情報取得中"; //動画情報取得 VideoData.ApiData = await WatchApi.GetWatchApiDataAsync(); if(VideoData.ApiData == null) { LoadFailed = true; return; } Handler.Update(); CommentInstance = new NicoNicoComment(VideoData.ApiData, this); if(VideoData.ApiData.GetFlv.IsPremium && !VideoData.ApiData.GetFlv.VideoUrl.StartsWith("rtmp")) { StoryBoardStatus = "取得中"; var sb = new NicoNicoStoryBoard(VideoData.ApiData.GetFlv.VideoUrl); VideoData.StoryBoardData = await sb.GetStoryBoardAsync(); if(VideoData.StoryBoardData == null) { StoryBoardStatus = "データ無し"; } else { StoryBoardStatus = "取得完了"; } } else { StoryBoardStatus = "データ無し"; } }
public async void Initialize(System.Windows.Forms.WebBrowser browser) { var videoUrl = VideoUrl + "?watch_harmful=1"; WatchApi = new NicoNicoWatchApi(videoUrl, this); IsActive = true; Status = "動画情報取得中"; //動画情報取得 VideoData.ApiData = await WatchApi.GetWatchApiDataAsync(); if(VideoData.ApiData == null) { LoadFailed = true; return; } Handler.Initialize(browser, VideoData); CommentInstance = new NicoNicoComment(VideoData.ApiData, this); if(VideoData.ApiData.GetFlv.IsPremium && !VideoData.ApiData.GetFlv.VideoUrl.StartsWith("rtmp")) { StoryBoardStatus = "取得中"; var sb = new NicoNicoStoryBoard(VideoData.ApiData.GetFlv.VideoUrl); VideoData.StoryBoardData = await sb.GetStoryBoardAsync(); if(VideoData.StoryBoardData == null) { StoryBoardStatus = "データ無し"; } else { StoryBoardStatus = "取得完了"; } } else { StoryBoardStatus = "データ無し"; } }