diff --git a/clients/flash/air-client/src/Main-app.xml b/clients/flash/air-client/src/Main-app.xml
index 754c74d444..99a83233fc 100755
--- a/clients/flash/air-client/src/Main-app.xml
+++ b/clients/flash/air-client/src/Main-app.xml
@@ -1,389 +1,390 @@
-
-
-
-
-
-
- com.bigbluebutton.AIRClient
-
-
- BigBlueButton
-
-
- BigBlueButton
-
-
- 0.1.0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Main.swf
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- direct
-
-
-
-
-
-
-
-
-
- true
- false
- true
- none
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- assets/icons/icon-29.png
- assets/icons/icon-36.png
- assets/icons/icon-40.png
- assets/icons/icon-44.png
- assets/icons/icon-48.png
- assets/icons/icon-50.png
- assets/icons/icon-57.png
- assets/icons/icon-58.png
- assets/icons/icon-60.png
- assets/icons/icon-66.png
- assets/icons/icon-72.png
- assets/icons/icon-75.png
- assets/icons/icon-76.png
- assets/icons/icon-80.png
- assets/icons/icon-87.png
- assets/icons/icon-96.png
- assets/icons/icon-100.png
- assets/icons/icon-114.png
- assets/icons/icon-120.png
- assets/icons/icon-128.png
- assets/icons/icon-144.png
- assets/icons/icon-152.png
- assets/icons/icon-167.png
- assets/icons/icon-180.png
- assets/icons/icon-192.png
- assets/icons/icon-512.png
- assets/icons/icon-732.png
- assets/icons/icon-1024.png
-
-
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 32bit
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]]>
-
-
-
-
- Assets.car
-
-
- UIDeviceFamily
-
- 1
- 2
-
-
- NSCameraUsageDescription
- Share your webcam to join video conference
-
- NSMicrophoneUsageDescription
- Share your microphone to join audio conference
-
- CFBundleIconName
- AppIcon
-
- CFBundleURLTypes
-
-
- CFBundleURLSchemes
-
- bigbluebutton
- bigbluebuttons
-
- CFBundleURLName
- org.bigbluebutton
-
-
-
- UIPrerenderedIcon
-
- ]]>
-
- high
-
-
-
- com.freshplanet.AirCapabilities
- com.juankpro.ane.LocalNotification
-
-
+
+
+
+
+
+
+ com.bigbluebutton.Main
+
+
+ BigBlueButton
+
+
+ BigBlueButton
+
+
+ 0.1.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Main.swf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ direct
+
+
+
+
+
+
+
+
+
+ true
+ false
+ true
+ none
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ assets/icons/icon-29.png
+ assets/icons/icon-36.png
+ assets/icons/icon-40.png
+ assets/icons/icon-44.png
+ assets/icons/icon-48.png
+ assets/icons/icon-50.png
+ assets/icons/icon-57.png
+ assets/icons/icon-58.png
+ assets/icons/icon-60.png
+ assets/icons/icon-66.png
+ assets/icons/icon-72.png
+ assets/icons/icon-75.png
+ assets/icons/icon-76.png
+ assets/icons/icon-80.png
+ assets/icons/icon-87.png
+ assets/icons/icon-96.png
+ assets/icons/icon-100.png
+ assets/icons/icon-114.png
+ assets/icons/icon-120.png
+ assets/icons/icon-128.png
+ assets/icons/icon-144.png
+ assets/icons/icon-152.png
+ assets/icons/icon-167.png
+ assets/icons/icon-180.png
+ assets/icons/icon-192.png
+ assets/icons/icon-512.png
+ assets/icons/icon-732.png
+ assets/icons/icon-1024.png
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 32bit
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ Assets.car
+
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+
+ NSCameraUsageDescription
+ Share your webcam to join video conference
+
+ NSMicrophoneUsageDescription
+ Share your microphone to join audio conference
+
+ CFBundleIconName
+ AppIcon
+
+ CFBundleURLTypes
+
+
+ CFBundleURLSchemes
+
+ bigbluebutton
+ bigbluebuttons
+
+ CFBundleURLName
+ org.bigbluebutton
+
+
+
+ UIPrerenderedIcon
+
+ ]]>
+
+ high
+
+
+
+ com.freshplanet.AirCapabilities
+ com.juankpro.ane.LocalNotification
+ org.bigbluebutton.BBBRtmpPlayer
+
+
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/common/views/IOSVideoView.as b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/IOSVideoView.as
new file mode 100755
index 0000000000..afde87f67e
--- /dev/null
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/common/views/IOSVideoView.as
@@ -0,0 +1,162 @@
+package org.bigbluebutton.air.common.views
+{
+ import mx.core.UIComponent;
+
+ import spark.components.Image;
+
+ import org.bigbluebutton.BBBRtmpPlayer;
+ import org.bigbluebutton.BBBRtmpPlayerEvent;
+
+ public class IOSVideoView extends UIComponent {
+
+ protected var _image:Image;
+
+ protected var player:BBBRtmpPlayer;
+
+ protected var originalVideoWidth:Number;
+
+ protected var originalVideoHeight:Number;
+
+ public function IOSVideoView():void {
+ _image = new Image();
+ addChild(_image);
+ }
+
+ public function startStream(uri:String, streamName:String, imgWidth:Number, imgHeight:Number, meetingId:String, authToken:String, externalUserId:String):void {
+
+ if(player) {
+ close();
+ }
+
+ this.originalVideoWidth = imgWidth;
+ this.originalVideoHeight = imgHeight;
+
+ var url:String = uri + "/" + streamName + " live=1 conn=S:" + meetingId + " conn=S:" + externalUserId + " conn=S:" + authToken;
+
+ player = new BBBRtmpPlayer(url);
+
+ player.addEventListener(BBBRtmpPlayerEvent.NEW_IMAGE, onNewImage);
+ player.addEventListener(BBBRtmpPlayerEvent.CONNECTING, onConnecting);
+ player.addEventListener(BBBRtmpPlayerEvent.CONNECTION_FAILED, onConnectionFailed);
+ player.addEventListener(BBBRtmpPlayerEvent.DISCONNECTED, onDisconnected);
+
+ player.play();
+
+ }
+
+ private function onConnecting(e:BBBRtmpPlayerEvent):void {
+ trace("EVENT: " + e.type + " MESSAGE: " + e.getMessage());
+ }
+
+ private function onNewImage(e:BBBRtmpPlayerEvent):void {
+ _image.source = player.getLastImage();
+ }
+
+ private function onConnectionFailed(e:BBBRtmpPlayerEvent):void {
+ close();
+ }
+
+ private function onDisconnected(e:BBBRtmpPlayerEvent):void {
+ close();
+ }
+
+ public function close():void {
+ player.removeEventListener(BBBRtmpPlayerEvent.NEW_IMAGE, onNewImage);
+ player.removeEventListener(BBBRtmpPlayerEvent.CONNECTION_FAILED, onConnectionFailed);
+ player.removeEventListener(BBBRtmpPlayerEvent.DISCONNECTED, onDisconnected);
+ _image = new Image();
+ }
+
+ override protected function updateDisplayList(w:Number, h:Number):void {
+ super.updateDisplayList(w, h);
+
+ if (player) {
+ resizeForPortrait();
+ }
+ }
+
+ public function resizeForPortrait():void {
+ // if we have device where screen width less than screen height e.g. phone
+ if (width < height) {
+ // make the video width full width of the screen
+ _image.width = width;
+ // calculate height based on a video width, it order to keep the same aspect ratio
+ _image.height = (_image.width / originalVideoWidth) * originalVideoHeight;
+ // if calculated height appeared to be bigger than screen height, recalculuate the video size based on width
+ if (height < _image.height) {
+ // make the video height full height of the screen
+ _image.height = height;
+ // calculate width based on a video height, it order to keep the same aspect ratio
+ _image.width = ((originalVideoWidth * _image.height) / originalVideoHeight);
+ }
+ } // if we have device where screen height less than screen width e.g. tablet
+ else {
+ // make the video height full height of the screen
+ _image.height = height;
+ // calculate width based on a video height, it order to keep the same aspect ratio
+ _image.width = ((originalVideoWidth * _image.height) / originalVideoHeight);
+ // if calculated width appeared to be bigger than screen width, recalculuate the video size based on height
+ if (width < _image.width) {
+ // make the video width full width of the screen
+ _image.width = width;
+ // calculate height based on a video width, it order to keep the same aspect ratio
+ _image.height = (_image.width / originalVideoWidth) * originalVideoHeight;
+ }
+ }
+
+ _image.x = width - _image.width;
+ _image.y = height - _image.height;
+ }
+
+ public function resizeForLandscape():void {
+ if (height < width) {
+ _image.height = width;
+ _image.width = ((originalVideoWidth * _image.height) / originalVideoHeight);
+ if (width < _image.width) {
+ _image.width = height;
+ _image.height = (_image.width / originalVideoWidth) * originalVideoHeight;
+ }
+ } else {
+ _image.width = height;
+ _image.height = (_image.width / originalVideoWidth) * originalVideoHeight;
+ if (height < _image.height) {
+ _image.height = width;
+ _image.width = ((originalVideoWidth * _image.height) / originalVideoHeight);
+ }
+ }
+ }
+
+ public function rotateVideo(rotation:Number):void {
+ if (_image && stage.contains(_image)) {
+ removeChild(_image);
+ }
+ _image = new Image();
+ switch (rotation) {
+ case 0:
+ resizeForPortrait();
+ _image.x = width / 2 - _image.width / 2;
+ _image.y = height / 2 - _image.height / 2; // + topMenuBarHeight;
+ break;
+ case -90:
+ resizeForLandscape();
+ _image.x = (width / 2) - (_image.height / 2);
+ _image.y = (height / 2) + (_image.width / 2); // + topMenuBarHeight;
+ break;
+ case 90:
+ resizeForLandscape();
+ _image.x = (width / 2) + (_image.height / 2);
+ _image.y = (height / 2) - (_image.width / 2); // + topMenuBarHeight;
+ break;
+ case 180:
+ resizeForPortrait();
+ _image.x = width / 2 + _image.width / 2;
+ _image.y = (height / 2) + (_image.height / 2); // + topMenuBarHeight
+ break;
+ default:
+ break;
+ }
+ _image.rotation = rotation;
+ addChild(_image);
+ }
+ }
+}
\ No newline at end of file
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/models/IUISession.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/models/IUISession.as
index 7e28f65aca..e811a152b2 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/models/IUISession.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/models/IUISession.as
@@ -12,8 +12,8 @@ package org.bigbluebutton.air.main.models {
function get pageTransitionStartSignal():ISignal;
function get currentPage():String;
function get lastPage():String;
- function popPage(animation:int = TransitionAnimationEnum.APPEAR):void;
- function pushPage(value:String, details:Object = null, animation:int = TransitionAnimationEnum.APPEAR):void;
+ function popPage(animation:int = 0):void;
+ function pushPage(value:String, details:Object = null, animation:int = 0):void;
function get currentPageDetails():Object;
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as
index cf2de0bb5b..23e01333e9 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/main/views/LoadingScreenMediator.as
@@ -40,7 +40,9 @@ package org.bigbluebutton.air.main.views {
// If we are in the Flash Builder debugger the InvokeEvent will never be fired
if (Capabilities.isDebugger) {
//var url:String = "bigbluebutton://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=AIR&meetingID=Demo+Meeting&password=mp&redirect=false&checksum=3fdf56e9915c1031c3ea012b4ec8823cedd7c272";
- var url:String = "bigbluebutton://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=User+2021828&meetingID=Demo+Meeting&password=ap&redirect=true&checksum=8751963df96437c7d435eac8124e4fb3ec147115";
+ //var url:String = "bigbluebutton://test-install.blindsidenetworks.com/bigbluebutton/api/join?fullName=User+2021828&meetingID=Demo+Meeting&password=ap&redirect=true&checksum=8751963df96437c7d435eac8124e4fb3ec147115";
+ //var url:String = "bigbluebuttons://dev21.bigbluebutton.org/bigbluebutton/api/join?meetingID=Demo+Meeting&fullName=AAA&password=mp&checksum=5516fb6f7d7330d0c02fd94c8e1fb683957e2da4a1c7013f66004b68148d4478";
+ var url:String = "bigbluebutton://206.47.241.19/bigbluebutton/api/join?meetingID=Demo+Meeting&fullName=AAA&password=mp&checksum=94cc8981bf215b13101fa4d3307d3aca8512578b23b91b7be8042f65abd4a007";
joinRoom(url);
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDock.as b/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDock.as
index ad7a0c3352..9d34d9f507 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDock.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDock.as
@@ -1,29 +1,48 @@
package org.bigbluebutton.air.video.views {
import flash.net.NetConnection;
+ import flash.system.Capabilities;
import spark.components.Group;
- import org.bigbluebutton.air.common.views.VideoView;
+ import org.bigbluebutton.air.common.views.IOSVideoView;
+ import org.bigbluebutton.air.common.views.VideoView;
public class WebcamDock extends Group {
private var _video:VideoView;
+ private var _iosVideoView:IOSVideoView;
public function WebcamDock() {
super();
- _video = new VideoView();
- _video.percentHeight = 100;
- _video.percentWidth = 100;
- addElement(_video);
+ if (Capabilities.version.indexOf("IOS") >= 0) {
+ _iosVideoView = new IOSVideoView();
+ _iosVideoView.percentWidth = 100;
+ _iosVideoView.percentHeight = 100;
+ addElement(_iosVideoView);
+ } else {
+ _video = new VideoView();
+ _video.percentHeight = 100;
+ _video.percentWidth = 100;
+ addElement(_video);
+ }
}
- public function startStream(connection:NetConnection, name:String, streamName:String, userId:String, oWidth:Number, oHeight:Number):void {
- _video.startStream(connection, name, streamName, userId, oWidth, oHeight);
+ public function startStream(connection:NetConnection, name:String, streamName:String, userId:String, oWidth:Number, oHeight:Number, meetingId:String, authToken:String, externalUserId:String):void {
+
+ if (Capabilities.version.indexOf("IOS") >= 0) {
+ _iosVideoView.startStream(connection.uri, streamName, oWidth, oHeight, meetingId, authToken, externalUserId);
+ } else {
+ _video.startStream(connection, name, streamName, userId, oWidth, oHeight);
+ }
}
public function closeStream():void {
- _video.close();
+ if (Capabilities.version.indexOf("IOS") >= 0) {
+ _iosVideoView.close();
+ } else {
+ _video.close();
+ }
}
}
}
diff --git a/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDockMediator.as b/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDockMediator.as
index f1cc8bcee3..b8a956b99e 100755
--- a/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDockMediator.as
+++ b/clients/flash/air-client/src/org/bigbluebutton/air/video/views/WebcamDockMediator.as
@@ -1,11 +1,12 @@
package org.bigbluebutton.air.video.views {
+ import org.bigbluebutton.air.main.models.IConferenceParameters;
import org.bigbluebutton.air.main.models.IMeetingData;
import org.bigbluebutton.air.main.models.IUserSession;
import org.bigbluebutton.air.video.models.VideoProfile;
import org.bigbluebutton.air.video.models.WebcamChangeEnum;
import org.bigbluebutton.air.video.models.WebcamStreamInfo;
- import robotlegs.bender.bundles.mvcs.Mediator;
+ import robotlegs.bender.bundles.mvcs.Mediator;
public class WebcamDockMediator extends Mediator {
@@ -18,6 +19,9 @@ package org.bigbluebutton.air.video.views {
[Inject]
public var userSession:IUserSession;
+ [Inject]
+ public var conferenceParameters:IConferenceParameters;
+
override public function initialize():void {
meetingData.webcams.webcamChangeSignal.add(onWebcamChangeSignal);
@@ -65,7 +69,7 @@ package org.bigbluebutton.air.video.views {
private function startWebcam(webcam:WebcamStreamInfo):void {
var videoProfile:VideoProfile = userSession.videoProfileManager.getVideoProfileByStreamName(webcam.streamId);
if (videoProfile) {
- view.startStream(userSession.videoConnection.connection, webcam.name, webcam.streamId, webcam.userId, videoProfile.width, videoProfile.height);
+ view.startStream(userSession.videoConnection.connection, webcam.name, webcam.streamId, webcam.userId, videoProfile.width, videoProfile.height, conferenceParameters.meetingID, conferenceParameters.authToken, conferenceParameters.externUserID);
meetingData.webcams.viewedWebcamStream = webcam.streamId;
}
}