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

some setting are not supperted by your device #81

Closed
zeeshan5446 opened this issue Jul 31, 2021 · 3 comments
Closed

some setting are not supperted by your device #81

zeeshan5446 opened this issue Jul 31, 2021 · 3 comments

Comments

@zeeshan5446
Copy link

hello HBRecorder
i m facing some issue on android 9 and 11.
infinix hot 8 android version 9,
im start recording toast show "some setting are not supperted by your device."
pls solve my issuse screenshot is atteched
error
Screenshot_20210731-151340

@stale stale bot added the status:stale label Aug 7, 2021
@stale stale bot closed this as completed Aug 10, 2021
@HBiSoft
Copy link
Owner

HBiSoft commented Nov 10, 2021

I will pin this issue because there is a lot of people asking this question.


You can use HBRecorderCodecInfo to get the supported settings for your specific device.

If you want to use default, it's important to first check if your device can set default encoder, using a try/catch.

You can also make use of the following to get the supported video codec:

// Examples of how to use the HBRecorderCodecInfo class to get codec info
HBRecorderCodecInfo hbRecorderCodecInfo = new HBRecorderCodecInfo();
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
int mWidth = hbRecorder.getDefaultWidth();
int mHeight = hbRecorder.getDefaultHeight();
String mMimeType = "video/avc";
int mFPS = 30;
if (hbRecorderCodecInfo.isMimeTypeSupported(mMimeType)) {
String defaultVideoEncoder = hbRecorderCodecInfo.getDefaultVideoEncoderName(mMimeType);

Above, defaultVideoEncoder is the default encoder for the provided mime type(video/avc). This is in the demo application and is printed in your logcat as soon as you open the application.

Repository owner deleted a comment from khawajaetisam99 Nov 10, 2021
Repository owner deleted a comment from stale bot Nov 10, 2021
@HBiSoft HBiSoft pinned this issue Nov 10, 2021
@Shubhamgarg1072
Copy link

I was trying your sample .But in device like oppo and real me its not working.

@limelect
Copy link

On my S6 it is Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants