Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-1264

Media.stop() puts media into an unplayable state.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1, 1.9.0, 2.0.0
    • 2.1.0
    • cordova-android
    • None

    Description

      1. Record something – recording will stop after 10 seconds, or just hit the ‘stop record’ button
      2. Play it back – should play back fine
      3. Play it again, but hit ‘stop’ half way through
      4. Now try and play again – you will get the ‘state’ errors below – it appears that using ‘media.stop’ is ‘breaking’ the internal state of the media, but letting the media stop of it’s own accord is just fine.

      After calling ‘.stop()’ ,and then trying to call ‘.play()’ again, Logcat spits out a bunch of errors such as:

      >>>>>>>>>>>>
      08-20 12:20:32.381: E/MediaPlayer(13077): Attempt to perform seekTo in wrong state: mPlayer=0x190f478, mCurrentState=64
      08-20 12:20:32.381: E/MediaPlayer(13077): error (-38, 0)
      08-20 12:20:32.381: E/MediaPlayer(13077): Error (-38,0)
      08-20 12:20:32.381: E/MediaPlayer(13077): mOnErrorListener is null. Failed to send MEDIA_ERROR message.
      08-20 12:20:32.381: E/MediaPlayer(13077): pause called in state 0
      08-20 12:20:32.381: E/MediaPlayer(13077): error (-38, 0)
      08-20 12:20:32.381: E/MediaPlayer(13077): Error (-38,0)
      08-20 12:20:32.381: E/MediaPlayer(13077): mOnErrorListener is null. Failed to send MEDIA_ERROR message.
      08-20 12:20:32.381: E/MediaPlayer(13077): start called in state 0
      08-20 12:20:32.381: E/MediaPlayer(13077): error (-38, 0)
      08-20 12:20:32.381: E/MediaPlayer(13077): Error (-38,0)
      08-20 12:20:32.381: E/MediaPlayer(13077): mOnErrorListener is null. Failed to send MEDIA_ERROR message.
      <<<<<<<<<<<<<<

      Attachments

        Activity

          People

            macdonst Simon MacDonald
            macdonst Simon MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: