Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

YouTube video playback stopped due to unauthorized overlay on top of player #110

Open
SarthakJoshi opened this issue Dec 25, 2016 · 4 comments
Labels

Comments

@SarthakJoshi
Copy link

As soon as the draggble view is minimized, the youtube player is throwing this error:

W/YouTubeAndroidPlayerAPI: YouTube video playback stopped due to unauthorized overlay on top of player. The YouTubePlayerView is not contained inside its ancestor android.widget.FrameLayout{ff4ae6b V.E..... ......I. 0,0-406,228}. The distances between the ancestor's edges and that of the YouTubePlayerView is: left: 0, top: 0, right: -1, bottom: -1 (these should all be positive).

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:draggable_panel="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="#000000">

     <ListView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:background="#000000"
         android:layout_below="@id/my_toolbar"
         android:id="@+id/list_genre1" />

    <com.github.pedrovgs.DraggableView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:draggable_view="http://schemas.android.com/apk/res-auto"
        android:id="@+id/draggable_view"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        draggable_view:top_view_id="@+id/youtube"
        draggable_view:bottom_view_id="@+id/videoDescription"
        draggable_view:top_view_x_scale_factor="2.3"
        draggable_view:top_view_y_scale_factor="2.3"
        draggable_view:top_view_resize="true"
        draggable_view:paddingEnd="30dp"
        draggable_view:paddingStart="30dp"
        android:background="#000000">

        <com.google.android.youtube.player.YouTubePlayerView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/youtube"/>

        <RelativeLayout android:layout_width="match_parent"
            android:layout_height="match_parent"
            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:id="@+id/videoDescription"
            android:background="#000000"
            xmlns:android="http://schemas.android.com/apk/res/android">


            . . . .


        </RelativeLayout>
    </com.github.pedrovgs.DraggableView>
</RelativeLayout>

How do I resolve this?

@pedrovgs pedrovgs added the bug label Dec 25, 2016
@pedrovgs
Copy link
Owner

This old bug could be fixed changing how the view is being resized but I can't do it soon. Now I'm working on a different project.

@SarthakJoshi
Copy link
Author

What can I do about this bug?

@pedrovgs
Copy link
Owner

You can enable the "show layout bounds" development option on your device and change the lib fixing the views overlap.

@thushcapone
Copy link

Hello @pedrovgs.
First things first, thank you for this amazing library.
As for this bug that am encountering now, I don't understand the issue, can you explain it to me to help me solve it as If I understand you already know about it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants