Android videoview video not play after once play video in webview - android

In WebView when I play a YouTube video it plays the video successfully but it gives following error message :
OnBufferingUpdateListener is null. Failed to send MEDIA_BUFFERING_UPDATE message.
Even if I finish this activity the video stops but still the above error continuously occurs.
When I open another activity and tried to play video in videoview control then it gives error message
Can't play video. and following error code -
E/MediaPlayer(10207): Error (-38,0)
Is there any way to solve these problems?

Related

How can we get seek time from youtube player api?

I'm wondering how can we get pause,play and upto how much user seen the video data from the youtube player api ?Is this possible to get those details ?
For getting current time : getCurrentTimeMillis()
For moving the video to the time indicated: seekToMillis(int milliSeconds)
To plays the selected video : play()
To pause the video: pause()
And to get info maybe the best option would be use JSON

MediaPlayer not working on some android devices

I am trying to play the mp3 file from web using media player class , on some devices it is working fine but for few devices it is giving following error .
QCMediaPlayer mediaplayer NOT present
Unable to create media player
error (-38, 0)
Attempt to call getDuration without a valid mediaplayer
any help on this will be of great help.
In general error -38 means you are trying to call a function in wrong state for the player.
In your case as error says, you call getDuration() when player is not prepared or started. Set setOnPreparedListener() then start the player mp.start(), then you can call getDuration().
Check this Tutorial to stream audio from web

Android VideoView cannot load video when previous activity also has video

My app is for digital signage and has a screensaver that plays a fullscreen video after a timeout. When the timeout is triggered, the current activity is finished and the screensaver activity is started. The problem I'm having is that when the current activity contains an embedded video, the screensaver breaks with "Can't play this video".
There isn't really much code to show, I think it's a procedural problem. Do I need to do something to the VideoView to clear/release it besides simply finishing the containing activity?
The only relevant LogCat entry I can see seems to be W/ResourceType(16285): Failure getting entry for 0x01080a03 (t=7 e=2563) in package 0 (error -75)
did you try to stop the video playback before finishing the activity ?
You can use :
myVideoView.stopPlayback()
Alos, I saw in other posts that Android usually displays this message, when it is not able to play the media content, for example : unsupported file format, unsupported codecs, erroneous content
Maybe you could try to play the same video as in your screensaver activity, to see whether it is a content problem
Also, you could check the video file path

Android Webview Videos or Youtube throws errors

I am using Android webview, its a simple browser app (my first app BTW:)). When I browse, everything looks fine. All the websites load correctly....
When I go to CNN.com or youtube.com, it loads correctly... Now comes the issue!
When I click on any video (any website), the video starts to play BUT, I see uncontrollable errors as below in logcat, until the app crashes or phone soft reboots. I say uncontrollable because, it shows every second and once it reaches about 1500 errors, app crashes....
mOnSeekCompleteListener is null. Failed to send MEDIA_SEEK_COMPLETE message.
mOnVideoSizeChangedListener is null. Failed to send MEDIA_SET_VIDEO_SIZE message.
mOnBufferingUpdateListener is null. Failed to send MEDIA_BUFFERING_UPDATE message.
the last error throws about 1500 times till the app crash.
Any advice or help please?
Thanks!
May be you shold try to set WebChromeClient to your WebView? Simple code line: webView.setWebChromeClient(new WebChromeClient);

Android - Get Webview Media Player instance

I have a problem. When I play HTML 5 video object in my webview (<video>), the LogCat returns several error messages like this one:
E/MediaPlayer(17981): mOnBufferingUpdateListener is null.
Failed to send MEDIA_BUFFERING_UPDATE message.
I understand that several listeners are not implemented yet but I am not able to get the player instance.
EDIT
I am on ICS (4.0.3) and I have already tried this solution :
WebView and HTML5 <video>

Categories

Resources