Giter Club home page Giter Club logo

pierfrancescosoffritti / android-youtube-player Goto Github PK

View Code? Open in Web Editor NEW
3.3K 83.0 752.0 84.36 MB

YouTube Player library for Android and Chromecast, stable and customizable.

Home Page: https://pierfrancescosoffritti.github.io/android-youtube-player/

License: MIT License

Java 27.25% HTML 2.37% CSS 0.06% JavaScript 4.75% Kotlin 65.57%
android youtube youtube-player youtube-video webview android-youtube-player youtubeplayerview youtube-player-library youtube-player-api custom-view

android-youtube-player's People

Contributors

abeltesfaye avatar apsaliya avatar askarsyzdykov avatar berdorge avatar ct7ct7ct7 avatar denino avatar flauschtrud avatar forceporquillo avatar jbartusiak avatar jguerinet avatar kpiskur avatar lucasvanhalst avatar maharshpatel247 avatar malliaridis avatar mananarya22 avatar matthewrkula avatar mrkajetanp avatar pierfrancescosoffritti avatar powahftw avatar praveen-pable avatar rajeefmk avatar s3basuchian avatar serkali-sudo avatar solt9029 avatar talklittle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-youtube-player's Issues

click the center button

I would like to change the click event on the central button, is there any way to rewrite this action, the central button of the video that plays

Video Not playing after proguard

Hi, This is a nice library. I am using this for embedding youtube videos in my android application.
The videos are playing fine when I am using debug apk but when I build a release apk with proguard the videos are not playing. Just the loading icon appears but nothing plays. How to fix this?

Can't get library !

Gradle can't grab the library. Here is the error :
Failed to resolve: com.github.PierfrancescoSoffritti:AndroidYouTubePlayer:0.7.2

IFrame not working on some old versions of WebView

On some version of WebView the video is not visible, but the audio can be heard. The following errors are printed in the console:

E/chromium: [ERROR:gles2_cmd_decoder.cc(5942)] [.Compositor-Onscreen-0x54187790]GL ERROR :GL_INVALID_OPERATION : glUseProgram: program not linked

E/chromium: [ERROR:gles2_cmd_decoder.cc(5718)] [.Compositor-Onscreen-0x54187790]GL ERROR :GL_INVALID_OPERATION : glUniformMatrix4fv: wrong uniform function for type

E/chromium: [ERROR:gles2_cmd_decoder.cc(5718)] [.Compositor-Onscreen-0x54187790]GL ERROR :GL_INVALID_OPERATION : glUniform1iv: wrong uniform function for type

The problem is on API levels lower than 21. Starting from 21 WebView is updated through the PlayStore.

The bug has been discovered on a on a KitKat (Cyanogen) Galaxy S2.
I tried to replicate it on a KitKat (Cyanogen) GNexus but everything worked fine there.

Some Video not working

hello,
i interegrate library and there is some issue
some time player not load video,
and some channel video not loading like : "hEZ4UMr37yg" this youtube video not loading

Ad Support

Hi @PierfrancescoSoffritti

Thanks for your efforts. I'm aware that you are using Youtube's Iframe API as in Youtube's official iOS library. But do you know why the video Ads aren't being displayed in the videos.

Btw, I switched from the official native android API to your library to prevent black screen when it's not able to play Ads. In your library, though still not able to play Ads it's atleast not causing un-handled crashes (or) black screen.

How to disable autoplay?

Hey there! I'm just looking for a way to disable autoplay after video loads.

Thanks in advance!

Can't init to play when update

Some my device can't play video because onYouTubeIframeAPIReady() not call so that Youtube player view not init success.

Log:
SelfBrailleClient: Failed to bind to service

till now the same crash reported on crashlytucs

Fatal Exception: java.lang.NullPointerException
at java.lang.StringToReal.parseFloat(StringToReal.java:285)
at java.lang.Float.parseFloat(Float.java:300)
at com.pierfrancescosoffritti.youtubeplayer.YouTubePlayerBridge$9.run(YouTubePlayerBridge.java:173)
at android.os.Handler.handleCallback(Handler.java:800)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5405)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:838)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(NativeStart.java)

unable to hide the player defaults video controller bar

Hello,
I'm using this player in my sub view but i'm unable to hide the lower controllers bar, is there any way to hide it programmatically, i just want to show the video in specific height and width and not able to make any action taken by user.

remove audio

Is there any way I can leave the video muted?

No Volume Contol

Hello,
As i dig into more using AndroidYoutubePlayer, and i really like it, but i'm facing one issue, is there any controls available in player for controlling the volume of video programatically, like setVolume(), etc.

Question: Is the YouTube app required?

I'm assuming that the YouTube app isn't required like it is with the YouTube API but if you could clarify and maybe add it to the readme. You might get a lot of interest from people looking for an alternative that runs on devices without Google apps.

crash reported on crashlytics

Many thanks for great work.
crash reported on crashlytics:

Fatal Exception: java.lang.NullPointerException at java.lang.StringToReal.parseFloat(StringToReal.java:285) at java.lang.Float.parseFloat(Float.java:300) at com.pierfrancescosoffritti.youtubeplayer.YouTubePlayerBridge$9.run(YouTubePlayerBridge.java:169) at android.os.Handler.handleCallback(Handler.java:800) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5371) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(NativeStart.java)

Video reload after rotate Activity contain YoutubePlayerView

I config for Activity not recreate when rotate in Manifest and when check:

  • Activity not recreate
  • YoutubePlayerView not recreate
  • YoutubePlayer not recreate
    But js recall ready function so that youtubeplayerview will reload the id of youtube and youtube will restart.

Couldn't resolve resource @id/play_button

In Android Studio (2.2.2) the layout preview windows keeps showing rendering problems error:

Couldn't resolve resource @id/play_button

It can be fixed in player_controls.xml layout where custom_action_left_button is refering to play_button (line 160) with minor change of:
android:layout_toStartOf="@id/play_button"
to:
android:layout_toStartOf="@+id/play_button"

Quality of video not good

In some device, quality of video not good: video lag and noise
I think you need setting for YoutubePlayer webview

Video restart from ?

why video restart for belows
1.

when orientation change

how to stop video playing onstop and onpause state?

Media continue play after close application

In my code:
if (youtubePlayer.isPlaying()) {
youtubePlayer.pause();
}
when fragment onPause and release after onDestroyView. but media contine play, even when the application is turned off.

Refactor PlayerConstants class

The way its values are accessed is stupid, eg: "@PlayerConstants.PlayerState.State". Maybe can be improved using enums?

Height and Width Fixed

Hi!

Is there a way that if I set layout_width and layout_height to the youtubeView at the xml.... when it exists full screen set it to that original size?

Thanks!

Audio is jittering when hiding/showing the player controls

This doesn't seem to be an issue on my N6 but I've tried it on a VFD 900 and whenever the player controls are animating the audio is really jittery. It's more noticeable in fullscreen and repeatedly tapping on the player seems to highlight the issue.

It also seems to be a problem in Shuffly.

Make it easier to switch from the official YouTube library

I've come across this library midway through developing my app with the official library, now that I want to switch to this library I'm finding it a bit of a pain since a lot of things are different.

Firstly, can we split the YouTubeListener interface up a bit to match the official library as much as possible, it should make it easier to listen for callbacks on the methods you actually want and get rid of the need of AbstractYouTubeListener.

Which leads me onto my next issue, when I call initialize() I want to know whether it succeeded or failed, I know there's the call to onPlayerReady() but what happens if I decide I don't want the library to handle network changes and the device isn't connected to the internet? If there was an OnInitializedListener that had methods like onInitialiseSuccess() and onInitialiseFailed() then it would make it easier to know what has happened.

Lastly, I'm using MVP in my app which means I need to keep android dependencies out of my Presenter. If I want my Presenter to control the player then my Activity/Fragment needs to match each method on the player load/cue/play/pause etc which seems a bit pointless. It would be better if the onInitialiseSuccess method returned an interface called IYouTubePlayer containing all of the methods the YouTubePlayer implements. That way the Presenter can keep a reference to IYouTubePlayer and control it directly.

I'm willing to do this work myself but I wanted to see if you thought it was good idea before I submit a PR. Let me know what you think.

Issue if video is stream

When the video is stream type, time for it is wrong.

How to hiden the time and show that it is live.

Error when using the App

When I used the App fot testing, an error happened,like this.It has three or more pictures of the video on the screen,I cannot find why.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.