Changeset 90c2f4d952815839d21c5f55b188f2f84d9847ab for flex
- Timestamp:
- 11/02/09 19:58:13 (2 years ago)
- Parents:
- 101487233bef68b4c66c47115e6e3c959e61b134
- Children:
- 0afeabd69f300d36a22b3e3a695c7e04fc9d1e16
- git-committer:
- Robin Gareus <robin@gareus.org> / 2009-11-02T20:58:13Z+0100
- Files:
-
- 1 modified
-
flex/inout-av/src/main.mxml (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flex/inout-av/src/main.mxml
r0a012df r90c2f4d 1 1 <?xml version="1.0" encoding="iso-8859-1"?> 2 2 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 3 width="400" height="3 60" creationComplete="onAppInit()" >3 width="400" height="380" creationComplete="onAppInit()" > 4 4 5 5 <mx:Script> … … 10 10 private var stream:NetStream; 11 11 private var uploadName:String; 12 private var baseName:String; 12 13 private var cam:Camera; 13 14 private var mic:Microphone; … … 21 22 { 22 23 var argv:Object = Application.application.parameters; 23 //uploadName="test1"; // just testing 24 uploadName=argv['name']; 24 baseName=argv['name']; 25 25 server="rtmp://io.citu.info/recorder"; 26 26 username="4dc84c9279d0fcaa793eecfbc544cdbe7ea5f6e4"; … … 31 31 if (!cam || !mic) { 32 32 bt.enabled=false; 33 // TODO Alert.. 33 tg.enabled=false; 34 Alert.show('You do need a camera for live streaming.\nPlease connect one and then reload this Page.', 35 'No camera detected', mx.controls.Alert.OK); 34 36 return 35 37 } … … 90 92 var rnd:uint = Math.floor(Math.random()*1000); 91 93 uploadName=now.valueOf().toString()+"-"+rnd.toString(); 92 */ 94 */ 95 uploadName=baseName+"-("+tg.text.replace(" ","_")+")"; 93 96 conn = new NetConnection(); 94 97 conn.client = this; … … 110 113 private function stopRecording():void 111 114 { 112 video.attachCamera(null);115 //video.attachCamera(null); 113 116 stream.close(); 114 117 conn.close(); … … 117 120 public function camBt(event:Event):void { 118 121 if(bt.selected) { 122 tg.enabled=false; 119 123 startConnection(); 120 124 } else { 121 125 stopRecording(); 126 tg.enabled=true; 122 127 } 123 128 } … … 126 131 127 132 <mx:VideoDisplay id="video" width="340" height="280" /> 128 <mx:Button id="bt" toggle="true" change="camBt(event)" label="Start Camera"/> 133 <mx:Box direction="horizontal" > 134 <mx:Label text="Tags:" /> 135 <mx:TextInput id="tg" width="150" text="Live,Camera" restrict="a-zA-Z0-9, " maxChars="64"/> 136 <mx:Button id="bt" toggle="true" change="camBt(event)" label="Start Camera"/> 137 </mx:Box> 138 129 139 </mx:Application>
