【发布时间】:2014-12-07 10:05:40
【问题描述】:
我是 android 开发的菜鸟,我正在尝试实现 libstreaming example 3 sample project。一切正常,只是我无法将视频预览的方向更改为 prtrait。无论我更改什么设置,它都拒绝旋转并保持横向模式。我知道可以实现纵向,因为spydroid 使用 libstreaming 并以纵向显示任何帮助非常感谢。
我的相关代码:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); //<--Does Nothing
// Configures the SessionBuilder
mSession = SessionBuilder.getInstance()
.setContext(getApplicationContext())
.setAudioEncoder(SessionBuilder.AUDIO_AAC)
.setAudioQuality(new AudioQuality(8000, 16000))
.setVideoEncoder(SessionBuilder.VIDEO_H264)
.setSurfaceView(mSurfaceView)
.setPreviewOrientation(90) //<--Does Nothing
.setCallback(this)
.build();
【问题讨论】:
-
您是否尝试通过清单更改方向?
-
是的,我有,但这也不起作用。
标签: android video orientation surfaceview