Exemple #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="options"></param>
 public VideoDS(RegionOptions options)
     : base(options.width, options.height, options.top, options.left)
 {
     _filesPlayed = 0;
     _videoPlayer = new VideoPlayer();
     _videoPlayer.Width = options.width;
     _videoPlayer.Height = options.height;
     _videoPlayer.Location = new System.Drawing.Point(0, 0);
     //_videoPlayer.SetPlaylist(options.mediaNodes, options.CurrentIndex);
     
     Controls.Add(_videoPlayer);
 }
Exemple #2
0
        public Video(RegionOptions options)
            : base(options.width, options.height, options.top, options.left)
        {
            this.filePath = options.uri;
            this.duration = options.duration;

            videoPlayer = new VideoPlayer();
            videoPlayer.Width = options.width;
            videoPlayer.Height = options.height;
            videoPlayer.Location = new System.Drawing.Point(0, 0);

            this.Controls.Add(videoPlayer);
        }
Exemple #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="options"></param>
        public Video(RegionOptions options)
            : base(options.width, options.height, options.top, options.left)
        {
            _filePath = Uri.UnescapeDataString(options.uri).Replace('+',' ');
            _duration = options.duration;

            _videoPlayer = new VideoPlayer();
            _videoPlayer.Width = options.width;
            _videoPlayer.Height = options.height;
            _videoPlayer.Location = new System.Drawing.Point(0, 0);

            // Capture any video errors
            _videoPlayer.VideoError += new VideoPlayer.VideoErrored(_videoPlayer_VideoError);

            Controls.Add(_videoPlayer);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="options"></param>
        public Video(RegionOptions options)
            : base(options.width, options.height, options.top, options.left)
        {
            _filePath = Uri.UnescapeDataString(options.uri).Replace('+',' ');
            _duration = options.duration;

            _videoPlayer = new VideoPlayer();
            _videoPlayer.Width = options.width;
            _videoPlayer.Height = options.height;
            _videoPlayer.Location = new System.Drawing.Point(0, 0);

            // Should we loop?
            _videoPlayer.SetLooping((options.Dictionary.Get("loop", "0") == "1" && _duration != 0));

            // Should we mute?
            _videoPlayer.SetMute((options.Dictionary.Get("mute", "0") == "1"));

            // Capture any video errors
            _videoPlayer.VideoError += new VideoPlayer.VideoErrored(_videoPlayer_VideoError);
            _videoPlayer.VideoEnd += new VideoPlayer.VideoFinished(_videoPlayer_VideoEnd);

            Controls.Add(_videoPlayer);
        }