apivideo / api.video-flutter-live-stream

Flutter RTMP live stream client. Made with ♥ by api.video
MIT License
70 stars 41 forks source link

Unable to use Resolution.RESOLUTION_1080 #16

Closed AlexNik4 closed 2 years ago

AlexNik4 commented 2 years ago

Describe the bug Crash when attempting to stream in 1080p

To Reproduce Steps to reproduce the behavior:

  1. Change the VideoConfig.withDefaultBitrate(); to VideoConfig.withDefaultBitrate(resolution: Resolution.RESOLUTION_1080, fps: 30); in the params.dart class of the example.
  2. Run the example project and try to stream

Expected behavior Streaming with the 1080p resolution should not crash.

Screenshots image

Smartphone (please complete the following information):

Additional context I think the "p" is missing when specifying 1080p like for other resolutions. When I update the following locally, I was able to successfully stream in 1080p: lib/src/types/resolution.dart -> Change the @JsonValue from "1080" to "1080p" lib/src/types/video_config.g.dart -> Resolution.RESOLUTION_1080: '1080p' again just adding the "p"

I would make a PR but not sure where the source of the auto generated file is.

ThibaultBee commented 2 years ago

Hello :) Oops. Sorry for this issue. The file lib/src/types/video_config.g.dart is generated by the build_runner package. Anyway, I just fixed it.

AlexNik4 commented 2 years ago

Thanks for the quick fix! Just wondering when a new package may be released.

ThibaultBee commented 2 years ago

1.0.6 has been released. Could you verified?

AlexNik4 commented 2 years ago

LGTM