Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13677] Android: Not able to maximize(fullscreen) the video in a webView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-08-30T23:09:01.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0
Fix Version/s2013 Sprint 18, 2013 Sprint 18 API, Release 3.2.0
ComponentsAndroid
Labelsandroid, fullscreen, html5, module_webview, qe-testadded, video, webview
ReporterMeenakshi Pathak
AssigneePing Wang
Created2013-04-26T05:21:11.000+0000
Updated2013-10-22T05:12:12.000+0000

Description

When we play a video in a webView in Android, we are not able to maximize the screen of the video. Tested with YouTube,Vimeo,etc and found the same issue. Here is the code snippet used for playing the video through HTML:
<!DOCTYPE html>
<html>
<body>

<embed
width="420" height="345"
src="http://www.youtube.com/embed/ATJlxjC4-n0">
</embed>

</body>
</html>

or
<html>
<head>
	<meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1">
</head>
<body>
	<iframe width="300" height="169" src="http://www.youtube.com/embed/ATJlxjC4-n0" frameborder="0" allowfullscreen></iframe>
</body>
</html>

Comments

  1. Ping Wang 2013-08-23

    PR: https://github.com/appcelerator/titanium_mobile/pull/4599 For FR: 1. Run the test case below on 2.3, 3.x, 4.x devices.
       ---------------------- app.js --------------------------
       var win = Ti.UI.createWindow({
       	backgroundColor : 'yellow'
       });
       
       var webview = Ti.UI.createWebView({
               lightTouchEnabled: false,	
               url: "webpage.html"
       });
       
       win.add(webview);
       
       win.open(); 
       
       -------------------- webpage.html ------------------
       <html>
       <head>
           <meta name="viewport" content="width=device-width,user-scalable=yes,initial-scale=1">
       </head>
       <body>
           <iframe width="300" height="169" src="http://www.youtube.com/embed/ATJlxjC4-n0" frameborder="0" allowfullscreen></iframe>
       </body>
       </html>
       
    Please enable Settings->Developer options->Force GPU rendering, and add
       <android xmlns:android="http://schemas.android.com/apk/res/android">
               <manifest>
                   <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14"/>
                   <application android:hardwareAccelerated="true"/>
               </manifest>
       </android>
       
    to the tiapp.xml. 2. Click the play button. On 2.3 devices, once the video starts playing it becomes full screen. On the other devices, click the fullscreen button. Should see the video is playing in full screen. 3. Click the BACK button. Should close the full-screen video. 4. Run KS->BASE UI->Views->Web Views. *Note*: After the full-screen video is closed, the original web view shows. But the video may continue playing or be paused or be stopped, depends on different devices. On 2.3 devices, the video shows a black screen (sometimes with an activity indicator). The user needs to click the "pause" button and then the "play" button, the video can play again.
  2. Jignesh Kasundra 2013-09-24

    Hi... Ping Wang i am trying to do this above stuff but for me it's not working....... still i am facing same issue while i clicked on fullscreen button the video get freezed only audio is hear...
  3. Ping Wang 2013-09-24

    [~jignesh.igp], what device do you use? Which CI build SDK do you use? Do you use the sample code attached above? If not, can you paste your sample code? Do you have hardware acceleration turned on in your device?
  4. Jignesh Kasundra 2013-09-25

    ******************************************************* android sdk version --------- > 3.1.1 device info : samsung GT-N8000 tablet android version : 4.1.2 ******************************************************* ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// TEST CASE /////////////////////////////////////////////////////////////////////////////////////////////////////////////// *************************************************************** app.js **************************************************************** var win = Ti.UI.createWindow({ backgroundColor : 'yellow' }); var webview = Ti.UI.createWebView({ top : 0, left: 0, right : 0, bottom : 0, lightTouchEnabled: false, url: "demo.html" }); win.add(webview); win.open(); ************************************************** demo.html *****************************************************
    **************************************************************** tiapp.xml **************************************************************** http://schemas.android.com/apk/res/android">
  5. Ping Wang 2013-09-25

    [~jignesh.igp], this fix is not in SDK 3.1.1. You need to download the master CI build to test it http://builds.appcelerator.com.s3.amazonaws.com/index.html?mobile_branch=master#master
  6. Jignesh Kasundra 2013-09-26

    Hi... Ping Wang but i have used navite android-sdk
  7. Ping Wang 2013-09-26

    When you said {quote} android sdk version --------- > 3.1.1 {quote} you meant Titanium SDK version 3.1.1, right?
  8. Jignesh Kasundra 2013-09-27

    yes.... in tiapp.xml configurations shows ----------------------------------- Titanium SDK -> 3.1.1 GA
  9. Ping Wang 2013-09-27

    This fix is not in 3.1.1.GA. You have to download the latest master build which is 3.2.0 http://builds.appcelerator.com.s3.amazonaws.com/index.html?mobile_branch=master#master
  10. Jignesh Kasundra 2013-09-30

    okay.... but when i am go in to titanium studio > help > check for titanium update it shows me letest Titanium SDK 3.1.3 General Availability - 09/18/2013 which is automatically update the Titanium SDK but it's not usefull for me because still it version 3.1.3 and as you say it's fixed in SDK 3.2.0. i also downloded master mobilesdk 3.2.0 but how can i set it ? can i directly browse the folder and set it? -------------------------------------------- platform > ubantu 12.04
  11. Ingo Muschenetz 2013-09-30

    Please follow the steps here to install the 3.2.0 CI build: http://docs.appcelerator.com/titanium/latest/#!/guide/Installing_Titanium_SDK_Continuous_Builds You then can set that version as the version for your project.
  12. Jignesh Kasundra 2013-10-08

    i tested this new Titanium SDK that is 3.2.0 master from the continues build and it support the html5 video full screen mode that's fine but it create some bug in to my app. for eg. > button and it's image is not displayed. ------------------------------ right now in my application i am use 3.1.1 and it's working fine but that not support the full screen mode. so for that when i use 3.2.0 and build the application it create some issue or bug. as i discussed i think the Titanium SDK is not stable to every version and that's why it create the problem. -------------------------------------------- please can you give me the hint how can i make it work to full screen in my existing version that is 3.1.1 GA, without use of 3.2.0 ?
  13. Ingo Muschenetz 2013-10-08

    [~jignesh.igp] We would prefer, you can file a bug for the problem you see in SDK 3.2.0 and we can fix it. Alternately, if you'd like you can backport the pull request into a custom version of the SDK. https://github.com/appcelerator/titanium_mobile/pull/4599. That's the only way to get it fixed in version 3.1.3 of the SDK.
  14. Federico Casali 2013-10-18

    Verified fixed. TiSDK 3.2.0.v20131017152001 CLI 3.2.0 Titanium Studio 3.2.0.201310152326 Closing.
  15. Jignesh Kasundra 2013-10-22

    how can i download the whole studio >>>>>>>> Titanium Studio 3.2.0.201310152326

JSON Source