baidu_20385095
一把岁月刀
2017-04-07 01:24

MediaPlayer info/warning (703, 0),播放没声

  • android

04-07 09:15:53.501 3820-3820/pc.dialog.com.wutils I/MediaPlayActivity: onStart=http://jiayin-10076642.video.myqcloud.com/jsmy02/W38833d49-f783-4d27-919a-c198de8678ef.mp3
04-07 09:15:53.512 3820-3820/pc.dialog.com.wutils E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
04-07 09:15:53.512 3820-3820/pc.dialog.com.wutils E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
04-07 09:15:53.512 3820-3820/pc.dialog.com.wutils E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
04-07 09:15:53.512 3820-3820/pc.dialog.com.wutils E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
04-07 09:15:53.513 3820-3820/pc.dialog.com.wutils W/MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider: http://jiayin-10076642.video.myqcloud.com/jsmy02/W38833d49-f783-4d27-919a-c198de8678ef.mp3
04-07 09:15:53.517 3820-4027/pc.dialog.com.wutils D/MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
04-07 09:15:53.518 3820-3851/pc.dialog.com.wutils D/MediaHTTPConnection: proxy null port 0
04-07 09:15:54.746 3820-3820/pc.dialog.com.wutils D/MediaPlayer: setSubtitleAnchor in MediaPlayer
04-07 09:15:54.752 3820-3820/pc.dialog.com.wutils I/Choreographer: Skipped 77 frames! The application may be doing too much work on its main thread.
04-07 09:15:54.822 3820-3820/pc.dialog.com.wutils I/MediaPlayActivity: onPrepared
04-07 09:15:59.782 3820-3820/pc.dialog.com.wutils I/MediaPlayActivity: onStart=http://jiayin-10076642.video.myqcloud.com/jsmy02/W38833d49-f783-4d27-919a-c198de8678ef.mp3
04-07 09:15:59.783 3820-3820/pc.dialog.com.wutils E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
04-07 09:15:59.783 3820-3820/pc.dialog.com.wutils E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
04-07 09:15:59.783 3820-3820/pc.dialog.com.wutils E/ExtMediaPlayer-JNI: env->IsInstanceOf fails
04-07 09:15:59.783 3820-3820/pc.dialog.com.wutils E/MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
04-07 09:15:59.789 3820-3820/pc.dialog.com.wutils W/MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider: http://jiayin-10076642.video.myqcloud.com/jsmy02/W38833d49-f783-4d27-919a-c198de8678ef.mp3
04-07 09:15:59.800 3820-3848/pc.dialog.com.wutils D/MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
04-07 09:15:59.801 3820-3820/pc.dialog.com.wutils D/MediaPlayer: setSubtitleAnchor in MediaPlayer
04-07 09:15:59.804 3820-7079/pc.dialog.com.wutils D/MediaHTTPConnection: proxy null port 0
04-07 09:15:59.851 3820-3820/pc.dialog.com.wutils I/MediaPlayActivity: onPrepared
04-07 09:15:59.852 3820-7079/pc.dialog.com.wutils D/MediaHTTPConnection: proxy null port 0
04-07 09:15:59.863 3820-4027/pc.dialog.com.wutils W/MediaPlayer: info/warning (703, 0)
04-07 09:15:59.863 3820-4027/pc.dialog.com.wutils W/MediaPlayer: info/warning (701, 0)
04-07 09:16:02.832 3820-4027/pc.dialog.com.wutils D/MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
04-07 09:16:02.835 3820-3851/pc.dialog.com.wutils D/MediaHTTPConnection: proxy null port 0
04-07 09:16:05.885 3820-3851/pc.dialog.com.wutils D/MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
04-07 09:16:05.886 3820-4027/pc.dialog.com.wutils D/MediaHTTPConnection: proxy null port 0
04-07 09:16:06.867 3820-7079/pc.dialog.com.wutils D/MediaHTTPConnection: proxy null port 0
04-07 09:16:08.923 3820-7079/pc.dialog.com.wutils D/MediaHTTPConnection: filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)__图片说明
void init(String url){
mMediaPlayer =MediaPlayer.create(mContext,Uri.parse(url));
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mMediaPlayer.setOnErrorListener(this);
mMediaPlayer.setOnPreparedListener(this);
mMediaPlayer.setOnCompletionListener(this);
mMediaPlayer.setOnTimedMetaDataAvailableListener(this);
mMediaPlayer.setOnTimedTextListener(this);
mMediaPlayer.setOnSeekCompleteListener(this);
mMediaPlayer.setOnBufferingUpdateListener(this);
mMediaPlayer.setOnVideoSizeChangedListener(this);
}

public void playUrl(String url){
    if (mOnMediaPlayerListener!=null){
        mOnMediaPlayerListener.onStart(url);
    }
    if (mMediaPlayer!=null){
        destroy();
    }
    init(url);
}
public void stop(){
    if (mMediaPlayer!=null){
        mMediaPlayer.stop();
    }
}
public void destroy(){
    if (mMediaPlayer!=null){
        stop();
        mMediaPlayer.reset();
        mMediaPlayer.release();
        mMediaPlayer=null;
    }
}
public void pause(){
    if (isPlaying()){
        mMediaPlayer.pause();
    }
}
    -----------------------------------------
@Override
public void onPrepared(MediaPlayer mp) {
        mp.start();
    L.d(TAG,"onPrepared");
}

请教高人解答

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答