コード例 #1
0
        /// <summary>
        /// Callback for response to play() device method.
        /// </summary>
        public override void onPlay(SmcAvPlayer device, SmcItem item, SmcAvPlayer.PlayInfo contentInfo, int error)
        {
            if (error != Smc.SUCCESS)
            {
                // Error has occurred.
                return;
            }

            // Notify controller of state change.
            State = PlayerState.PLAYING;
        }
コード例 #2
0
        private void playItem()
        {
            registerListeners();

            State = PlayerState.INITIALIZING;

            SmcItem item = new SmcItem(new SmcItem.LocalContent(mContentUri.Path, mMimeType));

            // If seek() was called before player connected, it stored the position
            // and we can start playback from that position.
            SmcAvPlayer.PlayInfo info = new SmcAvPlayer.PlayInfo(mPosition);
            mPlayer.play(item, info);
            Log.d("MusicPlayer", "Starting playback at: " + mPosition);
        }
コード例 #3
0
        private void playItem()
        {
            registerListeners();

            State = PlayerState.INITIALIZING;

            SmcItem item;

            if (mSubtitlesUri != null)
            {
                item = new SmcItem((new SmcItem.LocalContent(mContentUri.Path, mMimeType)).setSubTitle(mSubtitlesUri.Path));
            }
            else
            {
                item = new SmcItem(new SmcItem.LocalContent(mContentUri.Path, mMimeType));
            }

            // If seek() was called before player connected, it stored the position
            // and we can start playback from that position.
            SmcAvPlayer.PlayInfo info = new SmcAvPlayer.PlayInfo(mPosition);
            mPlayer.play(item, info);
        }
コード例 #4
0
		private void playItem()
		{
			registerListeners();

			State = PlayerState.INITIALIZING;

			SmcItem item;
			if (mSubtitlesUri != null)
			{
				item = new SmcItem((new SmcItem.LocalContent(mContentUri.Path, mMimeType)).setSubTitle(mSubtitlesUri.Path));
			}
			else
			{
				item = new SmcItem(new SmcItem.LocalContent(mContentUri.Path,mMimeType));
			}

			// If seek() was called before player connected, it stored the position
			// and we can start playback from that position.
			SmcAvPlayer.PlayInfo info = new SmcAvPlayer.PlayInfo(mPosition);
			mPlayer.play(item, info);
		}
コード例 #5
0
		private void playItem()
		{
			registerListeners();

			State = PlayerState.INITIALIZING;

			SmcItem item = new SmcItem(new SmcItem.LocalContent(mContentUri.Path,mMimeType));
			// If seek() was called before player connected, it stored the position
			// and we can start playback from that position.
			SmcAvPlayer.PlayInfo info = new SmcAvPlayer.PlayInfo(mPosition);
			mPlayer.play(item, info);
			Log.d("MusicPlayer", "Starting playback at: " + mPosition);
		}