Beispiel #1
0
        /// <summary>
        /// Constructor, point to the corresponding MediaElement.
        /// </summary>
        internal AVElementHelper(MediaElement element)
        {
            Debug.Assert((element != null), "Element is null");

            _element = element;

            _position = new SettableState <TimeSpan>(new TimeSpan(0));

            //
            // We always start off in a closed state.
            //
            _mediaState = new SettableState <MediaState>(MediaState.Close);

            _source = new SettableState <Uri>(null);

            _clock = new SettableState <MediaClock>(null);

            _speedRatio = new SettableState <double>(1.0);

            _volume = new SettableState <double>(0.5);

            _isMuted = new SettableState <bool>(false);

            _balance = new SettableState <double>(0.0);

            _isScrubbingEnabled = new SettableState <bool>(false);

            _mediaPlayer = new MediaPlayer();

            HookEvents();
        }
Beispiel #2
0
 internal AVElementHelper(MediaElement element)
 {
     this._element            = element;
     this._position           = new SettableState <TimeSpan>(new TimeSpan(0L));
     this._mediaState         = new SettableState <MediaState>(MediaState.Close);
     this._source             = new SettableState <Uri>(null);
     this._clock              = new SettableState <MediaClock>(null);
     this._speedRatio         = new SettableState <double>(1.0);
     this._volume             = new SettableState <double>(0.5);
     this._isMuted            = new SettableState <bool>(false);
     this._balance            = new SettableState <double>(0.0);
     this._isScrubbingEnabled = new SettableState <bool>(false);
     this._mediaPlayer        = new MediaPlayer();
     this.HookEvents();
 }