4

I need to extract the Uri of the currently playing video inside the videoview embedded in a webview . I am able to get this working for android 2.1 to 2.3.7 using the solution provided here

Android get Video source path from VideoView.

Unfortunately this does not work in android 3.0 above as the onShowCustomView callback is NOT called in minimised mode .

This issue is also logged here
http://code.google.com/p/android/issues/detail?id=36020

Can anybody provide me any alternative workaround to get the videoview uri.

Ok After searching around for a bit (see answer https://stackoverflow.com/a/3866411/1135101) apparently there is a way to listen for video events via JNI. Now the thing is I am not sure how to write a JNI function that listens for a video event . Can anybody say if this is even possible and how to go about it.

Ok last ditch effort

according to this answer Show HTML5 Video Fullscreen

onShowCustomView is called in fullscreen mode. Now the issue is how do i force the video to play in full screen mode when i have no control over the site.

Community
  • 1
  • 1
windwaker
  • 315
  • 3
  • 12
  • Is there any other way to know if a video play back event is fired? I was basically using this call back to get the video view of the currently playing video. – windwaker Oct 28 '12 at 12:28

1 Answers1

0

I believe WebViewClient.shouldInterceptRequest(android.webkit.WebView, java.lang.String) might help. You will need to filter out video urls and simply return null.

Mirbek Samiev
  • 67
  • 1
  • 7
  • Thanks Mirbek , I will try this out and post the results. – windwaker Apr 17 '13 at 10:06
  • Well on clicking the video the function is executing but I am not getting the video URLs from there , It is inside the video view which comes as the parameter for the onShowCustomView(View view , )Anyways thanks again for the effort. – windwaker Apr 20 '13 at 16:54