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>
Related
I have an Android app, working with a custom receiver. It was working without problem, but with the release of the new cast companion library, I decided to upgrade it, as well as my Play services version.
Anyway, when I try to connect to Chromecast, my custom receiver HTML page is displayed. But then, I can't connect and send data to it. After a while (something like 15 seconds), the app exits on the Chromecast.
Then, I've tried to get the Cast Hello Text sample to work, using the same app id. Same problem here.
Here is the code I use to launch the Cast app:
Cast.CastApi.launchApplication(mApiClient, getString(R.string.app_id), true)
The result I receive in the ResultCallback, is a status with code 15, with isSuccess method returning false.
The problem doesn't seem to come from my Chromecast, since other users have the exact same issue.
Thanks for your help!
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
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?
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);
Does anyone know a method to communicate commands and receive events from flash objects using Android?
Flash media objects are quite handy for handling online media streams and I am wondering if we can control those objects to play media from an Android app.
A typical case will be: a flash object embedded in a webview and this webview is loaded by the Android application. The application send "play" commands to the object to start playing the stream and gets "finish" events when reaching the end of the streamed media.
create a webview in your main activity class (or anywhere)
var mainW = new WebView(this);
enable the needed features of your webview
mainW.getSettings().setPluginsEnabled(true);
mainW.getSettings().setAllowFileAccess(true);
mainW.getSettings().setPluginState(mainW.getSettings().getPluginState().ON);
place your html file somewhere which contains the swf and load it's location in webview
mainw.loadUrl(url);