使用适用于 android 的新 youtube api
,当尝试使用 YouTubeStandalonePlayer 启动 Activity 时 它以横向模式显示视频。
Intent youtubeIntent = YouTubeStandalonePlayer.createVideoIntent(context, Configuration.DEVELOPER_KEY, item.getVideo().getId(), 0, true,false);
context.startActivity(youtubeIntent);
我希望视频仍以全屏模式显示,但采用纵向模式。
最佳答案
您可以尝试将 lightboxMode
参数(最后一个 bool 值)设置为 true。那时它不会是全屏的,但我认为它至少可能会保持纵向模式(我想,虽然还没有尝试过...)。
关于android - 使用 YouTubeStandalonePlayer 纵向显示 YouTube 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14505625/