|
@@ -12,7 +12,10 @@ import android.widget.Toast;
|
|
|
import com.alivc.live.pusher.AlivcAudioAACProfileEnum;
|
|
import com.alivc.live.pusher.AlivcAudioAACProfileEnum;
|
|
|
import com.alivc.live.pusher.AlivcFpsEnum;
|
|
import com.alivc.live.pusher.AlivcFpsEnum;
|
|
|
import com.alivc.live.pusher.AlivcLivePushConfig;
|
|
import com.alivc.live.pusher.AlivcLivePushConfig;
|
|
|
|
|
+import com.alivc.live.pusher.AlivcLivePushError;
|
|
|
|
|
+import com.alivc.live.pusher.AlivcLivePushErrorListener;
|
|
|
import com.alivc.live.pusher.AlivcLivePushInfoListener;
|
|
import com.alivc.live.pusher.AlivcLivePushInfoListener;
|
|
|
|
|
+import com.alivc.live.pusher.AlivcLivePushNetworkListener;
|
|
|
import com.alivc.live.pusher.AlivcLivePusher;
|
|
import com.alivc.live.pusher.AlivcLivePusher;
|
|
|
import com.alivc.live.pusher.AlivcPreviewOrientationEnum;
|
|
import com.alivc.live.pusher.AlivcPreviewOrientationEnum;
|
|
|
import com.alivc.live.pusher.AlivcResolutionEnum;
|
|
import com.alivc.live.pusher.AlivcResolutionEnum;
|
|
@@ -182,6 +185,63 @@ public class ScreenStreamPlugin implements MethodChannel.MethodCallHandler, Plug
|
|
|
Log.d(TAG, "onAdjustFps");
|
|
Log.d(TAG, "onAdjustFps");
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ mAlivcLivePusher.setLivePushErrorListener(new AlivcLivePushErrorListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onSystemError(AlivcLivePusher alivcLivePusher, AlivcLivePushError alivcLivePushError) {
|
|
|
|
|
+ Log.d(TAG, "onSystemError\n" + alivcLivePushError.getMsg());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onSDKError(AlivcLivePusher alivcLivePusher, AlivcLivePushError alivcLivePushError) {
|
|
|
|
|
+ Log.d(TAG, "onSDKError\n" + alivcLivePushError.getMsg());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ mAlivcLivePusher.setLivePushNetworkListener(new AlivcLivePushNetworkListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onNetworkPoor(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onNetworkRecovery(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onReconnectStart(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onReconnectFail(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+ Log.e(TAG, "onReconnectFail");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onReconnectSucceed(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onSendDataTimeout(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onConnectFail(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+ Log.e(TAG, "onConnectFail");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public String onPushURLAuthenticationOverdue(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onSendMessage(AlivcLivePusher alivcLivePusher) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
mAlivcLivePusher.startPreview(null);
|
|
mAlivcLivePusher.startPreview(null);
|
|
|
mAlivcLivePusher.startPush(url);
|
|
mAlivcLivePusher.startPush(url);
|