1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    4
    Vote Rating
    0
    Mr zhang is on a distinguished road

      0  

    Default Answered: How to do with startRecord

    Answered: How to do with startRecord


    Start to record an audio when I press a button and stop to record when I release the button.However,when I press,it begins to record,but I don't release the button,the touchend event is fired.What's wrong?
    Code:
            var media = new Media('file:///storage/sdcard0/1.mp3',function(){},function(){});
            var recordAudio = function(){
                var success = function(){
                    alert("success");
                };
                var fail = function(){
                    alert("error");
                };
                media.startRecord();
            };
            var stopRecordAudio = function(){
                media.stopRecord();
                
            }
            var repeater =Ext.create('Ext.util.TapRepeater',{
                el: you.getRecordAudio().element//the button
            });
            repeater.on({'touchstart':recordAudio,'touchend':stopRecordAudio});

  2. You could try increasing the interval on the tap repeater.
    http://docs.sencha.com/touch/2.2.1/#...r-cfg-interval

  3. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    2,839
    Answers
    220
    Vote Rating
    89
    fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice

      0  

    Default


    You could try increasing the interval on the tap repeater.
    http://docs.sencha.com/touch/2.2.1/#...r-cfg-interval
    Get more personalized support via a support subscription.

    Want to learn Sencha Touch 2? Check out
    Sencha training
    Sencha Touch in Action

    Need more help with your app? Hire Sencha Services services@sencha.com

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar