YoutubePlayer shows endless loading when try to play a song with YoutubePlayerAPI in particular with YouTubePlayerSupportFragment for Android. It happens randomly. Sometimes the loading fails with INTERNAL_ERROR. Please see attached images
Strange - because native Youtube app is able to load and play video properly and without any delay.
Please advise what might be the reason of such issues and how to fix them. Thanks in advance
EDIT: I do receive onVideoStarted callback, but still video doesn't play
See this answer and try to do the same YouTubePlayerFragment backstack. I think your problem has same cause as mine. Also check logcat output for errors (it could be obfuscated, and out of application scope, so check 'No filters' in logcat)
I don't know if this really answers the questions, but I was having a similar issue with infinite loading.
Basically I would play a video using a player fragment, exit the video, and then the next video I would try to play would display an infinite loading indicator.
This issue was only happening on certain devices.
Since I was using the latest version of the youtube api, I updated the youtube app on the problematic devices and that seemed to resolve the issue.
I know that "update the youtube app" isn't a great answer, but it did resolve odd issues I was experiencing.
Hope this helps.
Related
I am using applovin ads in my android app, but the ads are too long and not able to click on the close as well.
The user experience is too bad. Also the ads are shown as tow cycles. It leads to the loss in user retention.
Kindly let me know any one facing the issue like the same.
I have followed this doc to show the interstitial ads in my app.
https://dash.applovin.com/documentation/mediation/android/getting-started/interstitials
Sorry for the late answer. May be you did it but if you don't someone also facing the same issue because I am also facing this issue. It is a bug in MaxAd in "testing Mode". You can check it while downloading from play store and on a real time device.
its easy to setting time in applovin, by going to discovery and Application go to video setting and adjust
enter image description here
hope thats answer your question
When i play an mp3 file through the flutter_webview_plugin or launch it in an webview through url_launch i dont get the option to seek a specific time. It works normally with videos but when it's audio the seekbar/scrubber doesn't appear or actually disappears really fast.
Does anyone have a solution for this?
https://i.stack.imgur.com/eXTdZ.png
And if anyone is still wondering.. The native browser on Android doesn't have better support than this so if you need scrubbing you have to use a player.
I'm trying to make a kid-safe youtube player (users can't easily watch unapproved content). Using the CHROMELESS style almost gets there, but users can still click the lower banners or 'Watch Next' button that pops on the video. This takes them to the Youtube app where they could browse to any video.
Similar questions that I've found without resolutions:
how to remove bottom overlay ads from custom youtube player Android
Is there any way to disable "Watch Next" block at the end of video using YouTube Android Player API?
Someone in the second thread suggested using "a ViewTreeObserver and hiding that particular view", but I am having trouble getting that to work.
-Hello! Please correct me if i am wrong but this line of code may be helpful to you i think player.setPlayerStyle(PlayerStyle.MINIMAL);
-Try this line this may will sure solve your problem :-
player.setPlayerStyle(PlayerStyle.CHROMELESS);
In case anyone is still stuck with this, here is what worked for me. If you are only playing a single video then cue the video when playing is finished but don't call player.play() unless you want to repeat the video.
if(player.getCurrentTimeMillis()>=player.getDurationMillis())
{
player.cueVideo(CurrentVideoUrl);
}
If you are providing a long list of videos that play one after the other then use an array list
if(player.getCurrentTimeMillis()>=player.getDurationMillis())
{
CurrentVideoIndex++;
CurrentVideoUrl =videosListArray.get(CurrentVideoIndex).getVideoUrl();
player.cueVideo(CurrentVideoUrl);
}
I have a WebView app that includes embedded YouTube videos on a page. But when I go to that page, it gives me an error with a whole bunch of text. I have searched the internet for the past week but with no luck. Can somebody please help me?
P.S. I am new to Android, so snippets would REALLY help :)
Here's the error:
vp.events.addOnDOMLoadHandler(function()
{vp.website.createVideoPlayer('mediaPlayer_cff30e24_42e1_4eb6
'http://youtube.com/v/XXXX', 569, 485, false);});
You need Flash Player in order to view this.
well from CommonsWare
You cannot show them embedded except perhaps on devices that have Flash.
here is the link: https://stackoverflow.com/a/2292459/1084764
however you can override the urlLoading on your webviewclient
I suggest you reading the whole post : play youtube video in WebView
Check if the Adobe Flash Player on your phone is indeed working properly.
Im using some time expiring url to watch a video from internet and so, when the expiration time come out, the video is not working anymore. In this case, im getting an error dialog box from the videoplayer saying the video is unreadable. that is quite fine, but i would like to display my own dialog box text. how can i do ? is there any way i can know my video didnt work ? Any ideas ?
I found the answer my self reading a bit more the SDK. There is setOnErrorListener(android.media.MediaPlayer.OnErrorListener).
that you can create. :)