Skip to content

Commit

Permalink
feat: support native 3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
LichKing-2234 committed May 17, 2021
1 parent b3c5a57 commit e792d26
Show file tree
Hide file tree
Showing 15 changed files with 256 additions and 92 deletions.
18 changes: 9 additions & 9 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,15 @@ buildscript {
def kotlin_version = rootProject.ext.has('kotlin_version') ? rootProject.ext.get('kotlin_version') : '1.3.72'

repositories {
mavenCentral()
google()
jcenter()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

rootProject.allprojects {
repositories {
google()
jcenter()
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

Expand All @@ -48,7 +41,14 @@ android {
}
}

repositories {
mavenCentral()
google()
maven { url 'https://www.jitpack.io' }
}

dependencies {
api 'com.github.agorabuilder:native-full-sdk:3.4.2'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${safeExtGet('kotlin_version', '1.3.72')}"
implementation "io.agora.rtc:full-sdk:3.4.1.1"
}
1 change: 1 addition & 0 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url 'https://www.jitpack.io' }
}
}

Expand Down
4 changes: 0 additions & 4 deletions example/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

#include "generated_plugin_registrant.h"

#include <agora_rtc_engine/agora_rtc_engine_plugin.h>

void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) agora_rtc_engine_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "AgoraRtcEnginePlugin");
agora_rtc_engine_plugin_register_with_registrar(agora_rtc_engine_registrar);
}
1 change: 0 additions & 1 deletion example/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
agora_rtc_engine
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down
2 changes: 0 additions & 2 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import FlutterMacOS
import Foundation

import agora_rtc_engine

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AgoraRtcEnginePlugin.register(with: registry.registrar(forPlugin: "AgoraRtcEnginePlugin"))
}
3 changes: 0 additions & 3 deletions example/windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

#include "generated_plugin_registrant.h"

#include <agora_rtc_engine/agora_rtc_engine_plugin.h>

void RegisterPlugins(flutter::PluginRegistry* registry) {
AgoraRtcEnginePluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin"));
}
1 change: 0 additions & 1 deletion example/windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
agora_rtc_engine
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down
2 changes: 1 addition & 1 deletion ios/agora_rtc_engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'AgoraRtcEngine_iOS', '3.4.1'
s.dependency 'AgoraRtcEngine_iOS', '3.4.2'
s.platform = :ios, '8.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
Expand Down
70 changes: 51 additions & 19 deletions lib/src/classes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -462,25 +462,6 @@ class ChannelMediaRelayConfiguration {
Map<String, dynamic> toJson() => _$ChannelMediaRelayConfigurationToJson(this);
}


@JsonSerializable(explicitToJson: true)
class RhythmPlayerConfig {

int beatsPerMeasure;
int beatsPerMinute;
bool publish;

/// Constructs a [ChannelMediaRelayConfiguration]
RhythmPlayerConfig(this.beatsPerMeasure, this.beatsPerMinute, this.publish);

/// @nodoc
factory RhythmPlayerConfig.fromJson(Map<String, dynamic> json) =>
_$RhythmPlayerConfigFromJson(json);

/// @nodoc
Map<String, dynamic> toJson() => _$RhythmPlayerConfigToJson(this);
}

/// Lastmile probe configuration.
@JsonSerializable(explicitToJson: true)
class LastmileProbeConfig {
Expand Down Expand Up @@ -1320,3 +1301,54 @@ class RtcEngineConfig {
/// @nodoc
Map<String, dynamic> toJson() => _$RtcEngineConfigToJson(this);
}

/// TODO(doc)
@JsonSerializable(explicitToJson: true)
class RhythmPlayerConfig {
@JsonKey(includeIfNull: false)
int beatsPerMeasure;

@JsonKey(includeIfNull: false)
int beatsPerMinute;

@JsonKey(includeIfNull: false)
bool publish;

/// Constructs a [RhythmPlayerConfig]
RhythmPlayerConfig({this.beatsPerMeasure, this.beatsPerMinute, this.publish});

/// @nodoc
factory RhythmPlayerConfig.fromJson(Map<String, dynamic> json) =>
_$RhythmPlayerConfigFromJson(json);

/// @nodoc
Map<String, dynamic> toJson() => _$RhythmPlayerConfigToJson(this);
}

/// TODO(doc)
@JsonSerializable(explicitToJson: true)
class AudioRecordingConfiguration {
String filePath;

@JsonKey(includeIfNull: false)
AudioRecordingQuality recordingQuality;

@JsonKey(includeIfNull: false)
AudioRecordingPosition recordingPosition;

@JsonKey(includeIfNull: false)
AudioSampleRateType recordingSampleRate;

/// Constructs a [AudioRecordingConfiguration]
AudioRecordingConfiguration(this.filePath,
{this.recordingQuality,
this.recordingPosition,
this.recordingSampleRate});

/// @nodoc
factory AudioRecordingConfiguration.fromJson(Map<String, dynamic> json) =>
_$AudioRecordingConfigurationFromJson(json);

/// @nodoc
Map<String, dynamic> toJson() => _$AudioRecordingConfigurationToJson(this);
}
85 changes: 70 additions & 15 deletions lib/src/classes.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions lib/src/enum_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,14 @@ class AudioLocalStateConverter extends EnumConverter<AudioLocalState, int> {
}

@JsonSerializable()
class AudioMixingErrorCodeConverter
extends EnumConverter<AudioMixingErrorCode, int> {
AudioMixingErrorCodeConverter(AudioMixingErrorCode e) : super(e);
class AudioMixingReasonConverter extends EnumConverter<AudioMixingReason, int> {
AudioMixingReasonConverter(AudioMixingReason e) : super(e);

AudioMixingErrorCodeConverter.fromValue(int value)
: super.fromValue(_$AudioMixingErrorCodeEnumMap, value);
AudioMixingReasonConverter.fromValue(int value)
: super.fromValue(_$AudioMixingReasonEnumMap, value);

int value() {
return super.toValue(_$AudioMixingErrorCodeEnumMap);
return super.toValue(_$AudioMixingReasonEnumMap);
}
}

Expand Down
46 changes: 34 additions & 12 deletions lib/src/enum_converter.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e792d26

Please sign in to comment.