Brian,
I have one question - are you able somehow to get access to Video object on
'onShowCustomView(View, CustomViewCallback)' method?
In my case view returns FrameLayout and callback returns
HTML5VideoFullScreen object.
Thanks,
Mariusz
On Wednesday, May 23, 2012 12:40:16 AM UTC+2, Brian wrote:
>
> Mariusz,
> Thank you. I was getting hung up by the fact that I was specifically
> using the key listener to listen for KEYCODE_BACK,
> using the onBackPressed() method seems to solve my issue. Thank you.
>
>
> On Tuesday, May 22, 2012 5:37:55 PM UTC-4, Mariusz wrote:
>>
>> Hi,
>>
>> I implemented back action in the following way (activity level):
>> @Override
>> public void onBackPressed() {
>> if(mCustomView != null && mWebChromeClient != null)
>> {
>> mWebChromeClient.onHideCustomView();
>> }
>> }
>>
>> ...
>> at MyWebChromeClient level:
>>
>> @Override
>> public void onHideCustomView() {
>>
>> if (mCustomView == null)
>> return;
>>
>> mCustomView.setVisibility(View.GONE);
>> mCustomViewContainer.removeView(mCustomView);
>> mCustomView = null;
>> mCustomViewContainer.setVisibility(View.GONE);
>> mCustomViewCallback.onCustomViewHidden();
>> setStatusBarVisibility(true);
>> mContentView.setVisibility(View.VISIBLE);
>> }
>>
>> Regards,
>> Mariusz
>>
>> On Tuesday, May 22, 2012 11:31:38 PM UTC+2, Brian wrote:
>>>
>>>
>>> I think that I should probably add to my description.. what I would my
>>> goal is.
>>>
>>> My goal is for the HTML5 video to play in fullscreen mode, when the use
>>> presses the fullscreen button,
>>> but when the users presses the back button to dismiss the video, but
>>> still show the original webview.
>>>
>>> With the exception that i do not want to hide the video, if the
>>> MediaController is currently visible in front of the video,
>>> in that case only the MediaController should get hidden (which happens
>>> automatically)
>>>
>>
>> On Tuesday, May 22, 2012 11:31:38 PM UTC+2, Brian wrote:
>>>
>>>
>>> I think that I should probably add to my description.. what I would my
>>> goal is.
>>>
>>> My goal is for the HTML5 video to play in fullscreen mode, when the use
>>> presses the fullscreen button,
>>> but when the users presses the back button to dismiss the video, but
>>> still show the original webview.
>>>
>>> With the exception that i do not want to hide the video, if the
>>> MediaController is currently visible in front of the video,
>>> in that case only the MediaController should get hidden (which happens
>>> automatically)
>>>
>>
>> On Tuesday, May 22, 2012 11:31:38 PM UTC+2, Brian wrote:
>>>
>>>
>>> I think that I should probably add to my description.. what I would my
>>> goal is.
>>>
>>> My goal is for the HTML5 video to play in fullscreen mode, when the use
>>> presses the fullscreen button,
>>> but when the users presses the back button to dismiss the video, but
>>> still show the original webview.
>>>
>>> With the exception that i do not want to hide the video, if the
>>> MediaController is currently visible in front of the video,
>>> in that case only the MediaController should get hidden (which happens
>>> automatically)
>>>
>>
> On Tuesday, May 22, 2012 5:37:55 PM UTC-4, Mariusz wrote:
>>
>> Hi,
>>
>> I implemented back action in the following way (activity level):
>> @Override
>> public void onBackPressed() {
>> if(mCustomView != null && mWebChromeClient != null)
>> {
>> mWebChromeClient.onHideCustomView();
>> }
>> }
>>
>> ...
>> at MyWebChromeClient level:
>>
>> @Override
>> public void onHideCustomView() {
>>
>> if (mCustomView == null)
>> return;
>>
>> mCustomView.setVisibility(View.GONE);
>> mCustomViewContainer.removeView(mCustomView);
>> mCustomView = null;
>> mCustomViewContainer.setVisibility(View.GONE);
>> mCustomViewCallback.onCustomViewHidden();
>> setStatusBarVisibility(true);
>> mContentView.setVisibility(View.VISIBLE);
>> }
>>
>> Regards,
>> Mariusz
>>
>> On Tuesday, May 22, 2012 11:31:38 PM UTC+2, Brian wrote:
>>>
>>>
>>> I think that I should probably add to my description.. what I would my
>>> goal is.
>>>
>>> My goal is for the HTML5 video to play in fullscreen mode, when the use
>>> presses the fullscreen button,
>>> but when the users presses the back button to dismiss the video, but
>>> still show the original webview.
>>>
>>> With the exception that i do not want to hide the video, if the
>>> MediaController is currently visible in front of the video,
>>> in that case only the MediaController should get hidden (which happens
>>> automatically)
>>>
>>
>> On Tuesday, May 22, 2012 11:31:38 PM UTC+2, Brian wrote:
>>>
>>>
>>> I think that I should probably add to my description.. what I would my
>>> goal is.
>>>
>>> My goal is for the HTML5 video to play in fullscreen mode, when the use
>>> presses the fullscreen button,
>>> but when the users presses the back button to dismiss the video, but
>>> still show the original webview.
>>>
>>> With the exception that i do not want to hide the video, if the
>>> MediaController is currently visible in front of the video,
>>> in that case only the MediaController should get hidden (which happens
>>> automatically)
>>>
>>
>> On Tuesday, May 22, 2012 11:31:38 PM UTC+2, Brian wrote:
>>>
>>>
>>> I think that I should probably add to my description.. what I would my
>>> goal is.
>>>
>>> My goal is for the HTML5 video to play in fullscreen mode, when the use
>>> presses the fullscreen button,
>>> but when the users presses the back button to dismiss the video, but
>>> still show the original webview.
>>>
>>> With the exception that i do not want to hide the video, if the
>>> MediaController is currently visible in front of the video,
>>> in that case only the MediaController should get hidden (which happens
>>> automatically)
>>>
>>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en