Page 2 of 2

Re: Streaming videos from Vimeo within an app

Posted: Mon Oct 06, 2014 12:12 pm
by newtronsols
sefrojones wrote:Newtronsols,

what I am experiencing is that the player loads, the share buttons, and video controls are visible,as well as the image for the video, but when you press play, only the sound plays - the video remains black. As far as I know this is related to the bug that Chris posted....

--Sefro
Curious that it works on my Xperia no probs. Maybe it's a difference between building on Mac v Windows. First time Windows users may be ahead with LC, perhaps... :P

Re: Streaming videos from Vimeo within an app

Posted: Sat Oct 11, 2014 1:09 am
by William Jamieson
I was able to play the video on my Android device no problem. What I had a difficult time doing was getting a Youtube link playing using this code as well. I gave up trying to do that because every time it just opened my Youtube app on my phone which is not what I am going for. I am just going to wait until the new mobile player widget is released in Livecode 8 in the next few months. Then this whole thread will become obsolete.

Also, Thank you for posting the iFrame code. I am very familiar with what an iFrame is, what it is used for, how it interacts with browsers, etc. What I dont know about is how to include HTML script into a Livecode browser, I guess my question should have been directed more toward how to use the LC Browser rather than anything about the iFrame. I have seen a couple examples on the forums in the past. I guess I will just try to dig through them unless anyone wants to post a sample stack where they have embedded html code into a browser.

Thanks yall!

-Will

Re: Streaming videos from Vimeo within an app

Posted: Wed Oct 29, 2014 1:40 am
by Mark
Hi,

I'm doing this on a Windows machine. The command

Code: Select all

java -jar apktool.jar decode MyBrowser.apk app
returns an error:

Code: Select all

Unrecognized option: -apk
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I can run

Code: Select all

apktool.jar decode MyBrowser.apk app
and when I did this for the first time, some process seemed to run as my hard disk spun, but I didn't get any results and when I execute the command for a second time, nothing seems to happen.

I'm using the latest version. Which version of apktools did you use, sefrojones?

Mark

Re: Streaming videos from Vimeo within an app

Posted: Thu Oct 30, 2014 1:18 am
by sefrojones
On my Ubuntu machine I used v1.5.2, along with the instructions for the workaround.

--sefro

Re: Streaming videos from Vimeo within an app

Posted: Thu Oct 30, 2014 8:11 am
by Mark
Hi Sefro,

Which instructions for which workaround?

Mark

Re: Streaming videos from Vimeo within an app

Posted: Thu Oct 30, 2014 3:58 pm
by sefrojones
This one from the bug report:
sefrojones wrote:I just got it working using the workaround from Neil Roger in the bug report.
Until this feature is available, there is a workaround (However, we cannot provided support for this method)

The workaround is to edit Android Manifest from the built APK.

The tools used to achieve this was "APKTool" and this can be acquired from the below link.

https://code.google.com/p/android-apktool/

I then generated a new keystore file to use for signing purposes. The following is the terminal script I used for this.
keytool -genkey -v -keystore youtube.keystore -alias youtube -keyalg RSA -keysize 2048 -validity 10000

Next, I decoded the APK via the following terminal script

java -jar apktool.jar decode MyBrowser.apk app

Next step is to amended the “AndroidManifest.XML” folder contained within the decoded APK folder with -android:hardwareAccelerated="true"

I then re-built the Android APK with the up-to-date AndroidManifest via-
sudo java -jar apktool.jar build -a /Users/Neil/Documents/android-sdk-macosx/build-tools/17.0.0/aapt app app_new.apk

And finally re-signed the APK with the following
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore youtube.keystore app_new.apk youtube

You will need to amend the various paths/APK details for your specific setup
This is working as expected, no double taps, no need to press fullscreen. :D

Hope that helps.

--Sefro