本文介绍了YouTubePlayer(View)不断暂停的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个包含YouTubePlayerView和YouTubePlayer的应用程序,它在纵向,全屏(横向)模式下效果很好,但在横向模式下效果很好.我按播放后,它每秒都会暂停.缓冲区显示它已在某些视频上完全加载,但一直暂停.我使用最新版YouTube应用程序在Android 2.2.2和Android 4.1.2上对其进行了测试.这在所有播放器样式中都会发生.

I'm building a app that contains a YouTubePlayerView and YouTubePlayer, it works well in Portrait, Fullscreen-landscape but not landscape. It keeps pausing every second after I press play. The buffer shows it is fully loaded on some videos, yet it keeps pausing.I tested it on Android 2.2.2 and Android 4.1.2 with the latest version of the YouTube app.This happens in all player styles.

谢谢.

推荐答案

请确保YoutubePlayer视图的尺寸至少为200x110 dp,如 Youtube API文档.听起来好像在横向模式下不符合那些要求.

Make sure the size of the YoutubePlayer view is atleast 200x110 dp like descriped in the Youtube API documentation. Sounds like it doesn't meet those requirements when in landscape mode.

这篇关于YouTubePlayer(View)不断暂停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 13:44