Esempio n. 1
0
        public Player()
        {
            this.InitializeComponent();

            PlayerViewModel viewMD = new PlayerViewModel(this.SmoothPlayer);
            this._viewModel = viewMD;
            base.DataContext = viewMD;
            this.SmoothPlayer.MediaOpened += new RoutedEventHandler((object s, RoutedEventArgs e) => this._viewModel.UpdateDurationInfo());
            this._viewModel.PositionChanged += new EventHandler((object s, EventArgs e) => this.UpdatePlayBar());
            this.SmoothPlayer.DownloadProgressChanged += new RoutedEventHandler((object s, RoutedEventArgs e) => this.UpdateBufferBar());
            HtmlPage.RegisterScriptableObject("Page", this);
            this.slider.BufferWidth = 0;
            Application.Current.Host.Content.FullScreenChanged += new EventHandler(this.Content_FullScreenChanged);
            this.slider.MouseDownEvent += new EventHandler(this.slider_MouseDownEvent);
            this.SmoothPlayer.MediaEnded += new RoutedEventHandler(this.SmoothPlayer_MediaEnded);
            this.SmoothPlayer.SizeChanged += new SizeChangedEventHandler(this.SmoothPlayer_SizeChanged);
            this.dispatcherTimer = new DispatcherTimer();
            this.dispatcherTimer.Tick += new EventHandler(this.dispatcherTimer_Tick);
            this.dispatcherTimer.Interval = new TimeSpan(0, 0, 2);

            // this.SmoothPlayer.SmoothStreamingSource = new Uri("http://wams.edgesuite.net/media/SintelTrailer_Smooth_from_WAME_720p_Main_Profile_CENC/CENC/sintel_trailer-720p.ism/manifest(format=mpd-time-csf)");
        }
Esempio n. 2
0
        public Player()
        {
            this.InitializeComponent();

            PlayerViewModel viewMD = new PlayerViewModel(this.SmoothPlayer);

            this._viewModel  = viewMD;
            base.DataContext = viewMD;
            this.SmoothPlayer.MediaOpened             += new RoutedEventHandler((object s, RoutedEventArgs e) => this._viewModel.UpdateDurationInfo());
            this._viewModel.PositionChanged           += new EventHandler((object s, EventArgs e) => this.UpdatePlayBar());
            this.SmoothPlayer.DownloadProgressChanged += new RoutedEventHandler((object s, RoutedEventArgs e) => this.UpdateBufferBar());
            HtmlPage.RegisterScriptableObject("Page", this);
            this.slider.BufferWidth = 0;
            Application.Current.Host.Content.FullScreenChanged += new EventHandler(this.Content_FullScreenChanged);
            this.slider.MouseDownEvent    += new EventHandler(this.slider_MouseDownEvent);
            this.SmoothPlayer.MediaEnded  += new RoutedEventHandler(this.SmoothPlayer_MediaEnded);
            this.SmoothPlayer.SizeChanged += new SizeChangedEventHandler(this.SmoothPlayer_SizeChanged);
            this.dispatcherTimer           = new DispatcherTimer();
            this.dispatcherTimer.Tick     += new EventHandler(this.dispatcherTimer_Tick);
            this.dispatcherTimer.Interval  = new TimeSpan(0, 0, 2);

            // this.SmoothPlayer.SmoothStreamingSource = new Uri("http://wams.edgesuite.net/media/SintelTrailer_Smooth_from_WAME_720p_Main_Profile_CENC/CENC/sintel_trailer-720p.ism/manifest(format=mpd-time-csf)");
        }