Merge remote-tracking branch 'jfsiebel/bbb-rtmp-player-ios' into ios-h264

# Conflicts:
#	clients/flash/air-client/src/org/bigbluebutton/air/common/views/IOSVideoView.as
This commit is contained in:
Ghazi Triki 2018-06-18 14:12:29 +01:00
commit cc2cdd276d

View File

@ -26,11 +26,11 @@ package org.bigbluebutton.air.common.views {
this.originalVideoWidth = imgWidth;
this.originalVideoHeight = imgHeight;
var url:String = uri + "/" + streamName + " live=1 conn=S:" + meetingId + " conn=S:" + externalUserId + " conn=S:" + authToken;
var url:String = uri + "/" + streamName + " conn=S:" + meetingId + " conn=S:" + externalUserId + " conn=S:" + authToken;
player = new BBBRtmpPlayer(url);
player.addEventListener(BBBRtmpPlayerEvent.NEW_IMAGE, onNewImage);
player.addEventListener(BBBRtmpPlayerEvent.CONNECTED, onConnected);
player.addEventListener(BBBRtmpPlayerEvent.CONNECTING, onConnecting);
player.addEventListener(BBBRtmpPlayerEvent.CONNECTION_FAILED, onConnectionFailed);
player.addEventListener(BBBRtmpPlayerEvent.DISCONNECTED, onDisconnected);
@ -38,14 +38,14 @@ package org.bigbluebutton.air.common.views {
player.play();
}
private function onConnected(e:BBBRtmpPlayerEvent):void {
image.source = player.getBmpData();
}
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();
}
@ -55,7 +55,7 @@ package org.bigbluebutton.air.common.views {
}
public function close():void {
player.removeEventListener(BBBRtmpPlayerEvent.NEW_IMAGE, onNewImage);
player.removeEventListener(BBBRtmpPlayerEvent.CONNECTED, onConnected);
player.removeEventListener(BBBRtmpPlayerEvent.CONNECTION_FAILED, onConnectionFailed);
player.removeEventListener(BBBRtmpPlayerEvent.DISCONNECTED, onDisconnected);
if (getChildAt(0) == image) {