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
视频拉伸 #164
Comments
拉伸与否与是否在哪个线程无关,你可以看看这个接口是设置拉伸参数的 setScaleType(type: ScaleType) |
@hexleo 原因是在onCreate中直接调用animView.startPlay()方法,如果这时AnimView.onSizeChanged()没有调用,prepareTextureView()中scaleTypeUtil.getLayoutParam获取到的宽高都为0,就会出现setScaleType设置无效的情况,视频就有可能会被拉伸。这种情况不是必现,多次尝试就会出现。 |
我看看这个问题,你可以先用一个handler post这个startPlay,延后执行解决这个问题 |
AnimView xml中layout_width和layout_height设置的都是match_parent,在onCreate中直接setScaleType,然后startPlay本地一个已有的VAP文件,就有可能复现这个问题,在启动Activity中更容易复现。 |
你切换到这个分支bugfix/android_scaletype,修复你说的这个问题,你先试试,如果没问题我就合入主干 |
视频正常了,没有问题了,感谢 |
您好,demo中animView.startPlay(file)不在新开的线程中执行,直接在主线程中执行会出现拉伸。
README.md中没有说明animView.startPlay(file)要在子线程中进行,如果需要在子线程中运行,是否可以把在子线程中运行的逻辑封装在animView.startPlay方法中
The text was updated successfully, but these errors were encountered: