Titanium web视图无法打开youtube链接
我想在Tianium webview中播放youtube视频,但它无法播放视频。链接为。此链接在mac浏览器中工作 错误是 [错误]:加载错误:,错误:错误域=WebKitErrorDomain代码=102“帧加载中断”用户信息=0x78fbe6b0{NSErrorFailingURLKey=,NSErrorFailingURLStringKey== f=用户上传&app=youtube\u gdata,NSLocalizedDescription=帧加载中断}Titanium web视图无法打开youtube链接,titanium,appcelerator-mobile,Titanium,Appcelerator Mobile,我想在Tianium webview中播放youtube视频,但它无法播放视频。链接为。此链接在mac浏览器中工作 错误是 [错误]:加载错误:,错误:错误域=WebKitErrorDomain代码=102“帧加载中断”用户信息=0x78fbe6b0{NSErrorFailingURLKey=,NSErrorFailingURLStringKey== f=用户上传&app=youtube\u gdata,NSLocalizedDescription=帧加载中断} function WebVi
function WebView(data) {
var self = Ti.UI.createWindow({
backgroundColor : 'white',
title : 'Videos',
height : Ti.UI.FILL,
width : Ti.UI.FILL
});
var webview = Titanium.UI.createWebView({
url : data,
height : Ti.UI.FILL,
width : Ti.UI.FILL,
backgroundColor : 'green'
});
self.add(webview);
return self;
}
module.exports = WebView;
请尝试以下代码:
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();
我以前试过,效果很好,是从这个复制的