Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 11 additions & 30 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
name: Publish plugin
# .github/workflows/publish.yml
name: Publish to pub.dev

on:
release:
types: [published]
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Dart Format Check
run: dart format lib/ test/ --set-exit-if-changed
- name: Import Sorter Check
run: flutter pub run import_sorter:main --no-comments --exit-if-changed
- name: Dart Analyze Check
run: flutter analyze
- name: Dart Test Check
run: flutter test
#- name: Check Publish Warnings
# run: dart pub publish --dry-run
- name: Publish
uses: k-paxian/dart-package-publisher@v1.5.1
with:
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
flutter: true
skipTests: true
force: true
publish:
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
# with:
# working-directory: path/to/package/within/repository
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog

--------------------------------------------

[0.12.9] - 2025-02-13

* [iOS] feat: Add option to start capture without broadcast picker (#1764)

[0.12.8] - 2025-02-07

* [Dart] feat: expose rtc video value (#1754)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.EventChannel;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.PluginRegistry.Registrar;
import io.flutter.view.TextureRegistry;

/**
Expand Down Expand Up @@ -66,25 +65,6 @@ public MediaStreamTrack getRemoteTrack(String trackId) {
return methodCallHandler.getRemoteTrack(trackId);
}

/**
* Plugin registration.
*/
public static void registerWith(Registrar registrar) {
final FlutterWebRTCPlugin plugin = new FlutterWebRTCPlugin();

plugin.startListening(registrar.context(), registrar.messenger(), registrar.textures());

if (registrar.activeContext() instanceof Activity) {
plugin.methodCallHandler.setActivity((Activity) registrar.activeContext());
}
application = ((Application) registrar.context().getApplicationContext());
application.registerActivityLifecycleCallbacks(plugin.observer);

registrar.addViewDestroyListener(view -> {
plugin.stopListening();
return false;
});
}

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
Expand Down
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_data_channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "flutter_common.h"
#include "flutter_webrtc_base.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

class FlutterRTCDataChannelObserver : public RTCDataChannelObserver {
public:
Expand Down Expand Up @@ -49,6 +49,6 @@ class FlutterDataChannel {
FlutterWebRTCBase* base_;
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // !FLUTTER_WEBRTC_RTC_DATA_CHANNEL_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_frame_capturer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <mutex>

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

using namespace libwebrtc;

Expand All @@ -32,6 +32,6 @@ class FlutterFrameCapturer
bool SaveFrame();
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // !FLUTTER_WEBRTC_RTC_FRAME_CAPTURER_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_frame_cryptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "rtc_frame_cryptor.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

class FlutterFrameCryptorObserver : public libwebrtc::RTCFrameCryptorObserver {
public:
Expand Down Expand Up @@ -98,6 +98,6 @@ class FlutterFrameCryptor {
std::map<std::string, scoped_refptr<libwebrtc::KeyProvider>> key_providers_;
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // FLUTTER_WEBRTC_RTC_FRAME_CRYPTOR_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_media_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "flutter_common.h"
#include "flutter_webrtc_base.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

class FlutterMediaStream {
public:
Expand Down Expand Up @@ -52,6 +52,6 @@ class FlutterMediaStream {
FlutterWebRTCBase* base_;
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // !FLUTTER_WEBRTC_RTC_GET_USERMEDIA_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_peerconnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "flutter_common.h"
#include "flutter_webrtc_base.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

class FlutterPeerConnectionObserver : public RTCPeerConnectionObserver {
public:
Expand Down Expand Up @@ -203,6 +203,6 @@ const char* peerConnectionStateString(RTCPeerConnectionState state);

const char* iceGatheringStateString(RTCIceGatheringState state);

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // !FLUTTER_WEBRTC_RTC_PEER_CONNECTION_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_screen_capture.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "rtc_desktop_capturer.h"
#include "rtc_desktop_media_list.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

class FlutterScreenCapture : public MediaListObserver,
public DesktopCapturerObserver {
Expand Down Expand Up @@ -55,6 +55,6 @@ class FlutterScreenCapture : public MediaListObserver,
std::vector<scoped_refptr<MediaSource>> sources_;
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // FLUTTER_SCRREN_CAPTURE_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_video_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <mutex>

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

using namespace libwebrtc;

Expand Down Expand Up @@ -78,6 +78,6 @@ class FlutterVideoRendererManager {
std::map<int64_t, scoped_refptr<FlutterVideoRenderer>> renderers_;
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // !FLUTTER_WEBRTC_RTC_VIDEO_RENDERER_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_webrtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "libwebrtc.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

using namespace libwebrtc;

Expand All @@ -38,6 +38,6 @@ class FlutterWebRTC : public FlutterWebRTCBase,
std::unique_ptr<MethodResultProxy> result);
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // PLUGINS_FLUTTER_WEBRTC_HXX
4 changes: 2 additions & 2 deletions common/cpp/include/flutter_webrtc_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "uuidxx.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

using namespace libwebrtc;

Expand Down Expand Up @@ -126,6 +126,6 @@ class FlutterWebRTCBase {
std::unique_ptr<EventChannelProxy> event_channel_;
};

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin

#endif // !FLUTTER_WEBRTC_BASE_HXX
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_data_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <vector>

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

FlutterRTCDataChannelObserver::FlutterRTCDataChannelObserver(
scoped_refptr<RTCDataChannel> data_channel,
Expand Down Expand Up @@ -147,4 +147,4 @@ void FlutterRTCDataChannelObserver::OnMessage(const char* buffer,
auto data = EncodableValue(params);
event_channel_->Success(data);
}
} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_frame_capturer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <stdlib.h>
#include "svpng.hpp"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

FlutterFrameCapturer::FlutterFrameCapturer(RTCVideoTrack* track,
std::string path) {
Expand Down Expand Up @@ -73,4 +73,4 @@ bool FlutterFrameCapturer::SaveFrame() {
return true;
}

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_frame_cryptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "base/scoped_ref_ptr.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

libwebrtc::Algorithm AlgorithmFromInt(int algorithm) {
switch (algorithm) {
Expand Down Expand Up @@ -605,4 +605,4 @@ void FlutterFrameCryptor::KeyProviderDispose(
result->Success(EncodableValue(params));
}

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_media_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define DEFAULT_HEIGHT 720
#define DEFAULT_FPS 30

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

FlutterMediaStream::FlutterMediaStream(FlutterWebRTCBase* base) : base_(base) {
base_->audio_device_->OnDeviceChange([&] {
Expand Down Expand Up @@ -552,4 +552,4 @@ void FlutterMediaStream::MediaStreamTrackDispose(
base_->RemoveMediaTrackForId(track_id);
result->Success();
}
} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_peerconnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "rtc_dtmf_sender.h"
#include "rtc_rtp_parameters.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

std::string RTCMediaTypeToString(RTCMediaType type) {
switch (type) {
Expand Down Expand Up @@ -1381,4 +1381,4 @@ void FlutterPeerConnectionObserver::RemoveStreamForId(const std::string& id) {
remote_streams_.erase(it);
}

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_screen_capture.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "flutter_screen_capture.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

FlutterScreenCapture::FlutterScreenCapture(FlutterWebRTCBase* base)
: base_(base) {}
Expand Down Expand Up @@ -279,4 +279,4 @@ void FlutterScreenCapture::GetDisplayMedia(
result->Success(EncodableValue(params));
}

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_video_renderer.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "flutter_video_renderer.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

FlutterVideoRenderer::~FlutterVideoRenderer() {}

Expand Down Expand Up @@ -181,4 +181,4 @@ void FlutterVideoRendererManager::VideoRendererDispose(
"VideoRendererDispose() texture not found!");
}

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
6 changes: 3 additions & 3 deletions common/cpp/src/flutter_webrtc.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "flutter_webrtc.h"

#include "flutter_webrtc/flutter_web_r_t_c_plugin.h"
#include "stream_webrtc_flutter/flutter_web_r_t_c_plugin.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

FlutterWebRTC::FlutterWebRTC(FlutterWebRTCPlugin* plugin)
: FlutterWebRTCBase::FlutterWebRTCBase(plugin->messenger(),
Expand Down Expand Up @@ -1250,4 +1250,4 @@ void FlutterWebRTC::HandleMethodCall(
}
}

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
4 changes: 2 additions & 2 deletions common/cpp/src/flutter_webrtc_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "flutter_data_channel.h"
#include "flutter_peerconnection.h"

namespace flutter_webrtc_plugin {
namespace stream_webrtc_flutter_plugin {

const char* kEventChannelName = "FlutterWebRTC.Event";

Expand Down Expand Up @@ -359,4 +359,4 @@ FlutterWebRTCBase::GetRtpReceiverById(RTCPeerConnection* pc,
return result;
}

} // namespace flutter_webrtc_plugin
} // namespace stream_webrtc_flutter_plugin
Loading