Last active
August 28, 2018 18:30
-
-
Save FokkeZB/5354066 to your computer and use it in GitHub Desktop.
Embedding a YouTube video in Titanium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow(); | |
var webView = Ti.UI.createWebView({ | |
url: 'http://www.youtube.com/embed/' + myVideoID + '?autoplay=1&autohide=1&cc_load_policy=0&color=white&controls=0&fs=0&iv_load_policy=3&modestbranding=1&rel=0&showinfo=0', | |
enableZoomControls: false, | |
scalesPageToFit: false, | |
scrollsToTop: false, | |
showScrollbars: false | |
}); | |
win.add(webView); | |
win.open(); |
Trying this on 3.2.3GA however I'm just getting a white page - when I use the same URL in my desktop browser the video loads as it should. Any ideas?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I recommend adding disableBounce: true for iOS so the webview stop scrolling youtube content.