actionscript 3 - Native video in Air on iOS stopping sound and microphone -
actionscript 3 - Native video in Air on iOS stopping sound and microphone -
i'm trying play native video in stagewebview
in air ipad app plays sound , requires user interaction via microphone. seems work, when start playing video, sound , microphone stop. if dispose stagewebview
, sound , mic after 15 seconds (and need sound , mic work @ to the lowest degree straight after stagewebview
released).
i tried work on ios5 ipad1, , on ios6 ipad2, using air 3.4, 3.5 , 3.6 beta. tried switch mute button of ipad, , tried alter soundmixer.audioplaybackmode
media , ambient. didn't worked , i'm stucked.
here code deals microphone :
var microphone:microphone = microphone.getmicrophone(); microphone.addeventlistener(sampledataevent.sample_data, __michandler); private function michandler(event : sampledataevent) : void { trace("mic working !"); }
for sound :
_snd = new sound(); _snd.load(new urlrequest(path)); _sndchannel = _snd.play(); private function soundstophandler(event : mouseevent) : void { if(_sndchannel) _sndchannel.stop(); }
and video player :
_webview = new stagewebview(); _webview.stage = stage; _webview.viewport = new rectangle(10, 120, 480, 300); _webview.loadurl(path); private function videostophandler(event : mouseevent) : void { if(_webview) { _webview.dispose(); _webview = null; } }
did faced problem before me ? there forgot or did in wrong way ?
maybe problem related ios system.
in ios perspective, far know, officially not possible. when start recording sessions, except recording not occupy it. 1 time playback , recording sessions in session must solved. recording , playback session, session can not occupied simultaneously.
refer apple documentation: audio session
avaudiosessioncategoryplayandrecord or equivalent kaudiosessioncategory_playandrecord—use category application inputs , outputs audio. input , output need not occur simultaneously, can if needed. category utilize sound chat applications.
in air, if code no problem. reason.
ios actionscript-3 video air stagewebview
Comments
Post a Comment