Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

turn off hardware acceleration?

I am experiencing a problem playing youtube iframe embedded videos via the youtube iframe api.
https://developers.google.com/youtube...

When I install my app on my android devices the embedded video displays the placeholder image. On my nexus 7 with android 4.2.2 if I hit play I hear the sound but do not see the video (black). If I hit the full screen I see the video play ok. On my android 4.0.4 bionic phone I see the video placeholder image but play just shows black and full screen does not respond (ultimately app crashes). On my desktop machine testing my app in chrome browser video plays fine.

I am not sure what the solution is since I am not seeing much other than a recommendation to disable hardware acceleration in android manifest file. Is there a way to do this in UI yet? I understand I can do export and build which I will attempt.

http://developer.android.com/referenc...
http://developer.android.com/guide/to...

I am not sure this is right solution however because it appears hardware acceleration may be needed for html5 .

Question is, how do I get video to play embedded in mobile app for both android 2+ and iphone/ipad? I thought the iframe api would work but it still falls back to flash which appears to be the problem.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

turn off hardware acceleration?

Hi Sean,

You can't disable Hardware Acceleration from UI. As a workaround you can add video not via JavaScript, but using the following HTML code:code<iframe class="youtube-player" type="text&#47;html" width="640" height="385" src="http:&#47;&#47;www&#46;youtube&#46;com&#47;embed&#47;u1zgFlCw8Aw" frameborder="0">
<&#47;iframe>/code

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

turn off hardware acceleration?

Hi Katya
That is essentially what I am doing. On page load I have a javascript which eventually will use my own video id, but for now I am testing it like so:

It's not working on either of my android devices but does work on your browser test. Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

turn off hardware acceleration?

Hello!

to play embedded in mobile app for both android 2+ and iphone/ipad you can use html5 video. Flash player won't work on iPhone/iPad. If you need to play YouTube video - unfortunately it's not possible for now because it's on testing stage https://www.youtube.com/html5

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

turn off hardware acceleration?

thanks Marina- I saw that and did not understand it completely. I thought that the iframe method was supposed to work. oh well- guess I will try the direct link instead and see how that works out:
http://m.youtube.com/#/watch?v=xxxxxx...

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

turn off hardware acceleration?

ok- I get that embedding video into app will not work yet due to youtube's lack of html5 support BUT...
I have tried creating a link (hybrid app) which is not clickable. So then I created a button that opens youtube urls but they do not work either- instead, they open a web page (I do not know which browser is used) and it displays the video. When you play it it, you get sound but black screen. Clicking full size will play video correctly on android 4.2.2 tablet but not on 4.0.4 phone. On phone app it crashes. Basically, the same problem I was having trying to embed video.

I would have expected to either get a prompt to open in browser or my installed youtube app, but I do not.

If I open chrome browser separately videos play ok with url format:
http://m.youtube.com/#/watch?v=xxxxxx...

Additionally, I notice that there is no web browser wrapping around the video opened via app. In other words, there are no tabs or address bar etc.

I do not pretend to know what happens when one click a link or opens window in tiggzi app but it seems like I am not doing it right.

on button click, I use the javascript:
window.top.location = localStorage.getItem('videoURL');

I notice another thread mentioning a very similar problem:
https://getsatisfaction.com/tiggzi/to...

I also see that phonegap version 2.3 may have a solution:
http://stackoverflow.com/questions/13...

window.open("http://www.google.com", "_system");

I also checked that phonegap 2.4 is stable and tiggzi currently uses version 2.2

What is the solution to this issue? Can I load phonegap 2.4 in external resources? Is there another way to get video links to load correctly?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

turn off hardware acceleration?

Hi Sean,

We are working on embedding YouTube..

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

turn off hardware acceleration?

Hi
When do you think you will have a solution?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

turn off hardware acceleration?

Hi,

We are planning updating Phonegap up to version 2.4 in next release.
Do you want to open YouTube video in standard device browser on in Tiggzi app?

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

turn off hardware acceleration?

thanks- sorry but I am not completely clear on the question. what would the standard device browser be? Ideally, I wanted to be able to embed video in app page to avoid kicking the user out of the app to watch a related video. Since that appears to not be possible due to missing youtube html support, I guess next option would be a button to click to launch a browser. I guess if I can control which browser with:
window.open("http://www.google.com", "_system");
and that would allow users to play video in both android and iOS then would that be the best way right? Is that what you mean by standard browser-chrome for example?

To be clear, launching a browser in general (outside of app or otherwise) seems like it could be confusing to users about how to get back to place where they click button originally, when they are done watching video. If you know of the "best" way to implement this to minimizing confusion I would be interested in hearing about it. I just don't know enough to know what the pros/cons are to in app broser or standard device browser. For example, if there was some way to launch and in-app browser in a popup with a close button, that would be good.

Return to “Issues”