[ 
https://issues.apache.org/jira/browse/CB-11611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15400945#comment-15400945
 ] 

zhuisui commented on CB-11611:
------------------------------

Maybe my English grade is bad and make you misunderstand.
I use this plugin https://github.com/edimuj/cordova-plugin-audioinput to record 
audio in the webpage and I can get immediate audio data which comes from iOS 
native code by dispatching event every period of time at least 300ms.
And I call {{navigator.vibrate}}(of course it is that not {{window.vibrate}}) 
every time I receive data and it satisfies condition. My purpose is to do a 
feature which is letting phone vibrate if it detects audio volume is high 
enough when is recording audio. However the result is, no matter how many times 
{{vibrate}} called in this process, phone just start vibrates when stopping 
recording and no more data. It is like vibrate is blocked by recorder process.
Can you understand now?

> iPhone doesn't vibrate in my code
> ---------------------------------
>
>                 Key: CB-11611
>                 URL: https://issues.apache.org/jira/browse/CB-11611
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Vibration
>            Reporter: zhuisui
>
> I write some code to implement a feature.
> I inspect every element of array and if some satisfy condition I call 
> {{vibrate}}.
> code like this
> {code:javascript}
> document.addEventListener('data', v, false);
> function v(arr){
> var i=0;
> while(i<arr.length){
> if(condition){
> vibrate(10);
> }
> i += arr.length / 10;
> }
> }
> {code}
> But it doesn't vibrate, until event {{data}} doesn't be dispatched.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to