Note that there are some explanatory texts on larger screens.

plurals
  1. POSecurityPanel close event
    primarykey
    data
    text
    <p>is there a way to detect the close event on the Local Storage Settings Panel of the Flash Player?</p> <pre><code>package { import flash.display.Sprite; import flash.system.Security; import flash.system.SecurityPanel; import flash.system.fscommand; import flash.media.Video; import flash.media.Camera; import flash.media.Microphone; import flash.net.NetStream; import flash.net.NetConnection; import flash.events.FocusEvent; import flash.events.NetStatusEvent; [SWF (width="320", height="240", backgroundColor="#ffffff", frameRate="10")] public class Publisher extends Sprite { public var nc: NetConnection; public var ns: NetStream; public var video:Video; public var camera: Camera; public var microphone: Microphone; public function stage_FocusEvent(e:FocusEvent):void { stage.removeEventListener(FocusEvent.FOCUS_IN, stage_FocusEvent); checkAccess(); } public function checkAccess():void { if (camera.muted) { stage.focus = this; stage.addEventListener(FocusEvent.FOCUS_IN, stage_FocusEvent); Security.showSettings(SecurityPanel.PRIVACY); } else { connect(); } } public function ns_onStatus(e:NetStatusEvent):void { fscommand("NetStream::onStatus", e.info.code); } public function nc_onStatus(e:NetStatusEvent):void { fscommand("NetConnection::onStatus", e.info.code); if (e.info.code != "NetConnection.Connect.Success") return; ns = new NetStream(nc); ns.addEventListener(NetStatusEvent.NET_STATUS, ns_onStatus); ns.attachCamera(camera); microphone = Microphone.getMicrophone(); microphone.gain = 60; ns.attachAudio(microphone); ns.publish(streamId); } public function connect():void { fscommand("connecting", ""); camera.setMode(320, 240, 10, false); camera.setQuality(0, 80); camera.setKeyFrameInterval(3); video = new Video(); video.attachCamera(camera); addChild(video); nc = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS, nc_onStatus); nc.connect("rtmp://exmaple.com/appName"); } public function Publisher() { stage.showDefaultContextMenu = false; camera = Camera.getCamera(); checkAccess(); } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload