Skip to content

Commit

Permalink
Merge branch 'update-cloud-recording' of https://github.com/AgoraIO-C…
Browse files Browse the repository at this point in the history
…ommunity/VideoUIKit-Flutter into update-cloud-recording
  • Loading branch information
tadaspetra committed Apr 18, 2023
2 parents 2096a0c + 2984958 commit 3bf070e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/controllers/session_controller.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'dart:io';

import 'package:agora_rtc_engine/agora_rtc_engine.dart';
import 'package:agora_rtm/agora_rtm.dart';
Expand Down Expand Up @@ -292,7 +293,7 @@ class SessionController extends ValueNotifier<AgoraSettings> {
'${connectionData.cloudRecordingUrl}/start-recording/${connectionData.channelName}'),
);

if (response.statusCode == 200) {
if (response.statusCode == HttpStatus.ok) {
value = value.copyWith(
sid: jsonDecode(response.body)['sid'],
resourceId: jsonDecode(response.body)['resource_id'],
Expand All @@ -312,7 +313,7 @@ class SessionController extends ValueNotifier<AgoraSettings> {
'${connectionData.cloudRecordingUrl}/stop-recording/${connectionData.channelName}/${value.sid}/${value.resourceId}'),
);

if (response.statusCode == 200) {
if (response.statusCode == HttpStatus.ok) {
log('Recording Ended', level: Level.warning.value);
if (connectionData.cloudRecordingCallback != null) {
connectionData.cloudRecordingCallback!(
Expand Down

0 comments on commit 3bf070e

Please sign in to comment.