コード例 #1
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);
        }
コード例 #2
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);
        }