Details

      Description

      When I add an event listener to an AudioPlayer's 'change' event, I try to test e.state against the various constants, like Ti.Media.AudioPlayer.STATE_BUFFERING. When I do, I get an error because Ti.Media.AudioPlayer is undefined.

      I can work around the problem by referencing the constants from my AudioPlayer instance variable.

      var _player = Ti.Media.createAudioPlayer ();
      _player.addEventListener ('change', function (e) {
      switch (e.state)

      { case Ti.Media.AudioPlayer.STATE_BUFFERING: // crash and burn break; case _player.STATE_BUFFERING: // this is OK break; }

      });

        Attachments

          Activity

            People

            • Assignee:
              sliang Shuo Liang
              Reporter:
              jpriebe Jason Priebe
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Integration