//------------------------------------------------------------- // 概要:MovieStartイベントが発生するか確認 //------------------------------------------------------------- private static void OpenTest(string streamUrl) { // 再生中の判定 bool isPlaying = false; // イベント登録 PecaPlayerForm form = new PecaPlayerForm(); form.Show(); PecaPlayerControl pecaPlayer = form.pecaPlayer; PrivateObject accessor = new PrivateObject(pecaPlayer); IMoviePlayer moviePlayer = (IMoviePlayer)accessor.GetField("moviePlayer"); moviePlayer.MovieStart += (sender, e) => { isPlaying = true; }; // テスト対象を実行 pecaPlayer.Open(streamUrl); // 再生されるまで待つ while (isPlaying == false) { Application.DoEvents(); Thread.Sleep(100); } }
//------------------------------------------------------------- // 概要:コンストラクタ // 詳細:コントロールの初期化 //------------------------------------------------------------- public PecaPlayerControl() { Logger.Instance.Debug("PecaPlayer()"); InitializeComponent(); // チャンネル情報更新スレッド:キャンセル許可 updateChannelInfoWorker.WorkerSupportsCancellation = true; this.SuspendLayout(); string[] commandLineArgs = Environment.GetCommandLineArgs(); if (commandLineArgs.Length > 2 && string.Equals(commandLineArgs[2], "FLV", StringComparison.OrdinalIgnoreCase)) { moviePlayer = new FlashMoviePlayerControl(this); } else { moviePlayer = new WindowsMediaPlayerControl(); } this.Controls.Add(this.moviePlayer.MovieControl); this.ResumeLayout(false); // ウィンドウドラッグ用 moviePlayer.MouseDownEvent += (sender, e) => { // クリック開始位置を保持 ClickPoint = new Point(e.fX, e.fY); }; }
protected override void Awake() { base.Awake(); this.AssertRequiredObjects(movieImage, fadeImage); moviePlayer = Engine.GetService <IMoviePlayer>(); }
public PauseCommand(IMoviePlayer player) { Player = player; }
public void setPlayer(IMoviePlayer player) { command.setPlayer(player); }
//------------------------------------------------------------- // 概要:コンストラクタ // 詳細:コントロールの初期化 //------------------------------------------------------------- public PecaPlayerControl() { Logger.Instance.Debug("PecaPlayer()"); InitializeComponent(); // チャンネル情報更新スレッド:キャンセル許可 updateChannelInfoWorker.WorkerSupportsCancellation = true; this.SuspendLayout(); string[] commandLineArgs = Environment.GetCommandLineArgs(); if (commandLineArgs.Length > 2 && commandLineArgs[2] == "FLV") { moviePlayer = new FlashMoviePlayerControl(); } else { moviePlayer = new WindowsMediaPlayerControl(); } this.Controls.Add(this.moviePlayer.MovieControl); this.ResumeLayout(false); // ウィンドウドラッグ用 moviePlayer.MouseDownEvent += (sender, e) => { // クリック開始位置を保持 ClickPoint = new Point(e.fX, e.fY); }; }
public PauzeCommand() { player = new SamsungMoviePlayer(); }
public void setPlayer(IMoviePlayer player) { this.player = player; }
public PlayCommand(IMoviePlayer player) { Player = player; }