Note that there are some explanatory texts on larger screens.

plurals
  1. POYouTubePlayerView black outline when scrolling
    primarykey
    data
    text
    <p>The question has been asked before <a href="https://stackoverflow.com/questions/19145799/black-patch-youtube-android-api">here</a>, yet I would like to provide a little more information. The YouTubePlayerView often gives a black outline when scrolling, this can happen after pausing and changing rotation. This appears to happen when I scroll and it gets overlaid, so it pauses (to prevent that controls get hidden). The pausing isn't a problem since the user isn't watching the video but the black screen is. This happens on a Galaxy Tab 2 running Android 4.0.3, also on a Xperia T on 4.1.2, on a One X running 4.2.2 and Desire running 2.2.2 does the problem not occur.</p> <p>Some more info: The video-image that is paused appears to be stretching (On Xperia T) with the top of the screen while scrolling down. The black field starts scrolling over other content when it looks like it reached its minimum size.</p> <p><strong>Warning text:</strong> YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is not contained inside its ancestor android.widget.ScrollView@41290ca0. The distances between the ancestor's edges and that of the YouTubePlayerView is: left: 20, top: 0, right: 20, bottom: -11 (these should all be positive).</p> <p>This is my code:</p> <pre><code> &lt;TextView android:id="@+id/textView" android:gravity="center" android:textSize="25sp" android:layout_width="match_parent" android:layout_height="50dp" android:text="@string/header" /&gt; &lt;ScrollView android:id="@+id/scrollView" android:layout_width="match_parent" android:layout_weight="1" android:layout_height="0dp" &gt; &lt;LinearLayout android:gravity="center_horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" &gt; &lt;!-- In a linear layout so it is possible to set it in the middle --&gt; &lt;com.google.android.youtube.player.YouTubePlayerView android:id="@+id/youtubeplayer" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" &gt; &lt;/com.google.android.youtube.player.YouTubePlayerView&gt; &lt;/LinearLayout&gt; &lt;/ScrollView&gt; </code></pre> <p>So my question is, is there a way to get rid or prevent the black patch from showing?</p> <p>Currently I have a large workaround, when the user starts scrolling, the youtubeplayer will be released and a image with a play button will take its place, when the user presses the button the youtubeplayer will reinitialize and continue the video.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload