Streaming videos from Vimeo within an app

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Re: Streaming videos from Vimeo within an app

Post by newtronsols » Mon Oct 06, 2014 12:12 pm

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

William Jamieson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 212
Joined: Fri Feb 01, 2013 1:31 am
Contact:

Re: Streaming videos from Vimeo within an app

Post by William Jamieson » Sat Oct 11, 2014 1:09 am

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

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Streaming videos from Vimeo within an app

Post by Mark » Wed Oct 29, 2014 1:40 am

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Streaming videos from Vimeo within an app

Post by sefrojones » Thu Oct 30, 2014 1:18 am

On my Ubuntu machine I used v1.5.2, along with the instructions for the workaround.

--sefro

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Streaming videos from Vimeo within an app

Post by Mark » Thu Oct 30, 2014 8:11 am

Hi Sefro,

Which instructions for which workaround?

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: Streaming videos from Vimeo within an app

Post by sefrojones » Thu Oct 30, 2014 3:58 pm

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

Post Reply