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

media.stop() should call error callback when called in MEDIA_STARTING state

    XMLWordPrintableJSON

Details

    Description

      On iOS, when calling media.stop() when media is in state MEDIA_STARTING (for example, the player is caching media file), we don't get any callback. And then, when the caching is completed, the media actually starts playing.

      The proposed fix is that when media.stop() is called in an invalid state, the plugin should send an error callback with the code MEDIA_ERR_NONE_ACTIVE

      Another approach would be to stop the playback as soon as the player finishes caching. One possible advantage of this over the proposed fix would be that MEDIA_ERR_NONE_ACTIVE is not in w3c spec:
      https://dev.w3.org/html5/spec-author-view/video.html#error-codes

      Attachments

        Issue Links

          Activity

            People

              alsorokin Alexander Sorokin
              alsorokin Alexander Sorokin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: