YouTube embed in browser: Blank video on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Locked
juanjo
Posts: 35
Joined: Wed Jul 31, 2013 10:31 am

YouTube embed in browser: Blank video on Android

Post by juanjo » Wed Oct 02, 2013 1:13 pm

Hello.

I'm trying to play YouTube videos embedded in a browser.
I'm relying on Mobile_Browser_Example. (Project attached).

In iOS devices works well.

In Android device, you can hear the audio, but no video.
Tested with multiple devices (tablets).


Actually, activating 'Force hardware acceleration' in the device's Development Options, it works…

…but that's not enough:
- Would have to work by activating the acceleration from within the app.
- And what if the device has no hardware acceleration or rejects setting it?

Also activate LiveCode hardware acceleration by acceleratedRendering has no effect.

In Youtube normal full page (not embedded) it works, so it should work without the forcing HW acceleration trick.


Testing:

What I'm changing in the Mobile_Browser_Example comes down to this:

Code: Select all

set the acceleratedRendering of this stack to true
   
mobileControlSet sBrowserId, "url", "http://www.youtube.com/embed/bmnfPm2Oo7s?html5=1"
Of course I have tried many variants, which you can see commented in preOpenCard of the card script.

You can make aditional tests in the device on this page from Google.
(Here are generated URLs to embed, wich works in the device's browser, but not in the LiveCode browser):
https://developers.google.com/youtube/y ... layer_demo

 
Attachments
Mobile Browser Example YOUTUBE BLANK.livecode.zip
(169.45 KiB) Downloaded 495 times
Last edited by juanjo on Tue Oct 08, 2013 11:10 am, edited 1 time in total.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: YouTube embed in browser: Blank video on Android

Post by LCNeil » Mon Oct 07, 2013 2:17 pm

Hi JuanJo,

The issue that you are experiencing is a known issue and we are actively working on resolving it.

More information on it can be viewed here-

http://quality.runrev.com/show_bug.cgi?id=10267

The following explanation from one of our developers explains why setting force hardware acceleration to true enables video playback

Rendering a video within the browser on Android requires hardware acceleration to be enabled, however doing so decreases rendering speed considerably due to our use of a frequently changing bitmap as the stack view.

It may be possible to allow hardware acceleration to be configurable in the standalone builder settings if we want to give people the choice between no video in browsers or slow livecode screen updates.


With that being said, I would recommend adding a comment to this report as this will refresh the bugs position in the Quality Control Queue.

Kind Regards,

Neil Roger

--
RunRev Support Team ~ http://www.runrev.com
--

juanjo
Posts: 35
Joined: Wed Jul 31, 2013 10:31 am

Re: YouTube embed in browser: Blank video on Android

Post by juanjo » Mon Nov 11, 2013 1:51 pm

I added the comment, but I have not received a response yet.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: YouTube embed in browser: Blank video on Android

Post by LCNeil » Thu Nov 14, 2013 1:41 pm

Hi JuanJo,

I have spoken to our quality control team and we are still investigating how this can be resolved within the current instance of LiveCode engine. Changes to both the standalone builder and engine would be needed to make this possible.

We are currently focused on refining the core of LiveCode according to our roadmap here -

http://livecode.com/community/roadmap/

Once these changes have been made to LiveCode, it should make the implementation of a fix for this issue a lot easier.

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: YouTube embed in browser: Blank video on Android

Post by Klaus » Thu Nov 14, 2013 3:02 pm

Hi Neil,

it would be very nice if you could add the current (approximate) state
of the different items in each "Strand" from time to time! 8)


Best

Klaus

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: YouTube embed in browser: Blank video on Android

Post by LCNeil » Thu Nov 14, 2013 3:34 pm

Hi Klaus,

I will put that suggestion towards our dev team , however, we don't want to disappoint our users if timescales were published and we were to miss them. :)

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding
--

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: YouTube embed in browser: Blank video on Android

Post by Klaus » Thu Nov 14, 2013 4:37 pm

Sure, everything "without guarantee", of course 8)

juanjo
Posts: 35
Joined: Wed Jul 31, 2013 10:31 am

Re: YouTube embed in browser: Blank video on Android

Post by juanjo » Wed Nov 27, 2013 9:55 am

Hello again Neil,

It seems that something inside LiveCode prevents activation of hardware acceleration in Android by code.

I repeat here the explanation of your fellow developer because he mentioned a possible solution:
Rendering a video within the browser on Android requires hardware acceleration to be enabled, however doing so decreases rendering speed considerably due to our use of a frequently changing bitmap as the stack view.

It may be possible to allow hardware acceleration to be configurable in the standalone builder settings if we want to give people the choice between no video in browsers or slow livecode screen updates.
The performance penalty he mentions will certainly proven true in circumstances tested for him, but I tested my application with forced acceleration in the device, and works with complete fluency.

Accordingly, I propose that you allow us to activate hardware acceleration in Android (even with an option disabled by default) but (as your partner proposed) let us the programmers to choose whether we want to assume that eventual loss of performance, in exchange to can play Youtube videos on Android, critical feature for many of us.
 

andyparng
Posts: 14
Joined: Fri Mar 15, 2013 6:00 pm

Re: YouTube embed in browser: Blank video on Android

Post by andyparng » Sat May 24, 2014 12:57 pm

My question is why clicking the Expand icon to view the video full screen causing the video to play OK in the same browser window?!

Locked

Return to “Summer School 2013”