Skip to content

[Feat]: Render correct preview size for bitmap and non-camera sources in landscape orientationΒ #238

@dimadesu

Description

@dimadesu

Version

Almost the latest

Environment that reproduces the issue

Hi @ThibaultBee! Love your project. Thanks for all your hard work.

I've built an app that can use RTMP as custom video/audio source with StreamPack SDK https://github.com/dimadesu/LifeStreamer

I'm here to propose a fix (or a feature maybe πŸ€·β€β™‚οΈ ) to PreviewView.kt.

Use case description

Camera demo has issue when bitmap is in landscape orientation: preview shows landscape bitmap as portrait.

I think this is an issue with all non-camera sources.

Proposed solution

I've found a simple fix.

Image

Works for me really well for both bitmap and RTMP sources.

It's hard to fix in app itself, so I had to copy the whole PreviewView.kt into my app and tweak it.
Looks like something that is ideally fixed in the SDK itself.
I can put together a PR if needed.
Thanks!

Alternative solutions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions