Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impl track width height getters #129

Merged
merged 19 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 15 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All user visible changes to this project will be documented in this file. This p
### Added

- `RtpTransceiverInit.sendEncodings` field with `SendEncodingParameters`. ([#125])
- `MediaStreamTrack.height` and `MediaStreamTrack.width` methods. ([#129])
- `RtpParameters` class, `RtpSender.getParameters()` and `RtpSender.setParameters()` methods. ([#135])

### Changed
Expand All @@ -34,6 +35,7 @@ All user visible changes to this project will be documented in this file. This p
[#123]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/123
[#124]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/124
[#125]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/125
[#129]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/129
[#133]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/133
[#135]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/135
[#136]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/136
Expand Down
115 changes: 62 additions & 53 deletions Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.EventChannel
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch

/**
* Controller of [MediaStreamTrackProxy] functional.
Expand Down Expand Up @@ -55,6 +58,12 @@ class MediaStreamTrackController(
"state" -> {
result.success(track.state.value)
}
"width" -> {
GlobalScope.launch(Dispatchers.Main) { result.success(track.width()) }
}
"height" -> {
GlobalScope.launch(Dispatchers.Main) { result.success(track.height()) }
}
"stop" -> {
track.stop()
result.success(null)
Expand Down
Loading
Loading