Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blank screen and html video support #33

Open
1reldi opened this issue Dec 16, 2017 · 0 comments
Open

blank screen and html video support #33

1reldi opened this issue Dec 16, 2017 · 0 comments

Comments

@1reldi
Copy link

1reldi commented Dec 16, 2017

i had a blank screen after i followed the example here . i than noticed that the problem was in "activity_example" where the full screen view was blocking the view , so i added background color transparent so i made this change in "activity_example" :
`

    <!-- View that will be shown while the fullscreen video loads. For example you could include
    a "Loading..." message. However, in this particular example this view is actually defined in
    view_loading_video.xml and inflated programmatically in ExampleActivity.java. The reason for
    this is to keep the main layout (this file) cleaner. -->
    <!-- <View
        android:id="@+id/videoLoading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:visibility="invisible" /> -->

</RelativeLayout>`

also i had a problem with html5 videos, they couldnt be played ... this happens when video is in a div, so you should add these lines in your "ExampleActivity.java" before you call "webView.loadUrl("m.youtube.com")":
webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setMediaPlaybackRequiresUserGesture(false); webView.getSettings().setDomStorageEnabled(true); webView.getSettings().setAppCacheEnabled(true); webView.getSettings().setAppCachePath(getApplicationContext().getFilesDir().getAbsolutePath() + "/cache"); webView.getSettings().setDatabaseEnabled(true); webView.getSettings().setDatabasePath(getApplicationContext().getFilesDir().getAbsolutePath() + "/databases"); webView.loadUrl("m.youtube.com");
i hope this helps anyone with those problems

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

No branches or pull requests

1 participant