91视频专区

《罪与罚》电影完整版免费在线观看冲高清完整版...

因而任嘉伦凭借这个角色也成为了当年最受欢迎的“古装男神”之一。

2024年12月21日,朱伊特过去曾经是一个学校的化学教师,2021年初,麦肯齐和朱伊特结婚。

《罪与罚》电影完整版免费在线观看冲高清完整版...

增持电力行业减持电池

赵姨娘一家都是荣国府的旧仆人,属于家里的,按规定只要正式走流程,得到的丧葬费就是20两银子。刘大山继续说:"当然了!你不是刚提了公积金吗?为什么不考虑买辆车,带着老伴儿一起出去转转?"

MediaPlayerbofangyinpinyushipin2018-07-06 12:31·aiyinledechengxuyuanxiaoxinren1.xiangguanfangfaxiangjie1)huodeMediaPlayershili:keyizhijienewhuozhediaoyongcreatefangfachuangjian:MediaPlayer mp = new MediaPlayer();MediaPlayer mp = MediaPlayer.create(this, R.raw.test); //wuxuzaidiaoyongsetDataSourcelingwaicreatehuanyouzheyangdexingshi: create(Context context, Uri uri, SurfaceHolder holder) tongguoUrihezhiding SurfaceHolder 【chouxianglei】 chuangjianyigeduomeitibofangqi2)shezhibofangwenjian://①rawxiadeziyuan:MediaPlayer.create(this, R.raw.test);//②bendiwenjianlujing:mp.setDataSource("/sdcard/test.mp3");//③wangluoURLwenjian:mp.setDataSource("http://www.xxx.com/music/test.mp3");lingwaisetDataSource()fangfayouduoge,limianyouzheyangyigeleixingdecanshu:FileDescriptor,zaishiyongzhege APIdeshihou,xuyaobawenjianfangdaoreswenjianjiapingjideassetswenjianjiali,ranhoushiyongxiashudaimashezhiDataSource:AssetFileDescriptor fileDescriptor = getAssets().openFd("rain.mp3");m_mediaPlayer.setDataSource(fileDescriptor.getFileDescriptor(),fileDescriptor.getStartOffset(), fileDescriptor.getLength());3)qitafangfagetCurrentPosition( ):dedaodangqiandebofangweizhigetDuration() :dedaowenjiandeshijiangetVideoHeight() :dedaoshipingaodugetVideoWidth() :dedaoshipinkuanduisLooping():shifouxunhuanbofangisPlaying():shifouzhengzaibofangpause():zantingprepare():zhunbei(tongbu)prepareAsync():zhunbei(yibu)release():shifangMediaPlayerduixiangreset():zhongzhiMediaPlayerduixiangseekTo(int msec):zhidingbofangdeweizhi(yihaomiaoweidanweideshijian)setAudioStreamType(int streamtype):zhidingliumeitideleixingsetDisplay(SurfaceHolder sh):shezhiyongSurfaceHolderlaixianshiduomeitisetLooping(boolean looping):shezhishifouxunhuanbofangsetOnBufferingUpdateListener(MediaPlayer.OnBufferingUpdateListener listener): wangluoliumeitidehuanchongjiantingsetOnCompletionListener(MediaPlayer.OnCompletionListener listener): wangluoliumeitibofangjieshujiantingsetOnErrorListener(MediaPlayer.OnErrorListener listener): shezhicuowuxinxijiantingsetOnVideoSizeChangedListener(MediaPlayer.OnVideoSizeChangedListener listener): shipinchicunjiantingsetScreenOnWhilePlaying(boolean screenOn):shezhishifoushiyongSurfaceHolderxianshisetVolume(float leftVolume, float rightVolume):shezhiyinliangstart():kaishibofangstop():tingzhibofang2.shiyongdaimashilishiliyi:shiyongMediaPlayerbofangyinpin:yunxingxiaoguotu:guanjiandaima:public class MainActivity extends AppCompatActivity implements View.OnClickListener{ private Button btn_play; private Button btn_pause; private Button btn_stop; private MediaPlayer mPlayer = null; private boolean isRelease = true; //panduanshifouMediaPlayershifoushifangdebiaozhi @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); bindViews(); } private void bindViews() { btn_play = (Button) findViewById(R.id.btn_play); btn_pause = (Button) findViewById(R.id.btn_pause); btn_stop = (Button) findViewById(R.id.btn_stop); btn_play.setOnClickListener(this); btn_pause.setOnClickListener(this); btn_stop.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.btn_play: if(isRelease){ mPlayer = MediaPlayer.create(this,R.raw.fly); isRelease = false; } mPlayer.start(); //kaishibofang btn_play.setEnabled(false); btn_pause.setEnabled(true); btn_stop.setEnabled(true); break; case R.id.btn_pause: mPlayer.pause(); //tingzhibofang btn_play.setEnabled(true); btn_pause.setEnabled(false); btn_stop.setEnabled(false); break; case R.id.btn_stop: mPlayer.reset(); //zhongzhiMediaPlayer mPlayer.release(); //shifangMediaPlayer isRelease = true; btn_play.setEnabled(true); btn_pause.setEnabled(false); btn_stop.setEnabled(false); break; } }}zhuyishixiang:bofangdeshires/rawmuluxiadeyinpinwenjian,chuangjianMediaPlayerdiaoyongdeshicreatefangfa,diyiciqidongbofangqian buxuyaozaidiaoyongprepare(),ruguoshishiyonggouzaofangfagouzaodehua,zexuyaodiaoyongyiciprepare()fangfa! lingwaitiexiaguanfangwendangzhong,congqitaliangzhongtujingbofangyinpindeshilidaima:bendiUri:Uri myUri = ....; // initialize Uri hereMediaPlayer mediaPlayer = new MediaPlayer();mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);mediaPlayer.setDataSource(getApplicationContext(), myUri);mediaPlayer.prepare();mediaPlayer.start();waibuURL:String url = "http://........"; // your URL hereMediaPlayer mediaPlayer = new MediaPlayer();mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);mediaPlayer.setDataSource(url);mediaPlayer.prepare(); // might take long! (for buffering, etc)mediaPlayer.start();Note:jiarunitongguoyigeURLyiliudexingshibofangzaixianyinpinwenjian,gaiwenjianbixukeyijinxing jianjinshixiazaishilier:shiyongMediaPlayerbofangshipinMediaPlayerzhuyaoyongyubofangyinpin,meiyoutigongtuxiangshuchujiemian,suoyiwomenxuyaojiezhuqitade zujianlaixianshiMediaPlayerbofangdetuxiangshuchu,womenkeyishiyongyongSurfaceView laixianshi,xiamianwomenshiyongSurfaceViewlaixiegeshipinbofangdelizi:yunxingxiaoguotu:shixiandaima:bujuwenjian:activity_main.xml

意见反馈 合作

Copyright ? 2023 Sohu All Rights Reserved

搜狐公司 版权所有