每当我试图在我的应用程序中打开 Youtube 播放器时,onInitializationSuccess()
函数总是被调用。但它显示一个空白屏幕。
首先出现此错误:
W/YouTubeAndroidPlayerAPI: 强行创建的overlay:affq@82a17f5 helper:Lazy@9b7098a view:null status: ....... {...}
进而:
E/YouTubeAndroidPlayerAPI: RemoteEmbeddedPlayer 不支持嵌入配置。
这是我的代码:
FragmentManager fragmentManager = ((AppCompatActivity)this.context).getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
Fragment youtubeFragment = new YouTubePlayerSupportFragment();
fragmentManager.beginTransaction().add(R.id.GlideLayout ,youtubeFragment).commit();
utubevw = (YouTubePlayerSupportFragment) youtubeFragment;
utubecontainer = imageLayout.findViewById(R.id.youtubecontainer);
utubecontainer.setVisibility(View.VISIBLE);
mOnInitializeListener = new YouTubePlayer.OnInitializedListener() {
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {
youTubePlayer.cueVideo("_8kExcHqFi4");
Log.i("youtube", "Successful");
}
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
Log.i("youtube:Fail", youTubeInitializationResult.toString());
}
};
utubevw.initialize(String.valueOf(R.string.googleapikey), mOnInitializeListener);
Run Code Online (Sandbox Code Playgroud)
到处搜索,甚至在Github上发布,但找不到解决方案。
仅供参考 - 我不想使用 Webview …
我正在尝试运行命令来运行我的 ionic 3 命令提示符。我使用了cordova fcm插件。
离子科尔多瓦运行安卓
错误:
“chunk”参数必须是字符串或缓冲区类型之一。接收类型对象
离子:
离子(离子 CLI):4.10.1(/usr/local/lib/node_modules/ionic)
离子框架:离子角度 3.6.0 @ionic/app-scripts:2.1.4
科尔多瓦:
cordova (Cordova CLI):8.1.2 (cordova-lib@8.1.1) Cordova 平台:android 7.1.4 Cordova 插件:没有白名单插件(共 25 个插件)
系统:
NodeJS:v10.15.1 (/Users/sivakumarv/.nvm/versions/node/v10.15.1/bin/node) npm:6.4.1 操作系统:macOS High Sierra Xcode:Xcode 10.1 Build version 10B61
环境变量:
ANDROID_HOME : C:\Users\pkhon\AppData\Local\Android\Sdk
我正在尝试使用访问此 API axios
,但收到状态错误:429 [请求过多]。我只发送一个请求,但仍然出现错误。
但是当我尝试使用邮递员访问此网址时,它正在工作。
axios
.post(
`https://www.expedia.com/Hotel-Search-Data?responsive=true&destination=New+York%2C+New+York&latLong=40.75668%2C-73.98647®ionId=178293&startDate=01%2F20%2F2019&endDate=01%2F21%2F2019&rooms=1&adults=2&timezoneOffset=19800000&langid=1033&hsrIdentifier=HSR&page=7`
)
.then(result => {
console.log(result.data);
})
.catch(err => {
console.log(err);
});
Run Code Online (Sandbox Code Playgroud) 将应用程序的材料迁移到 15 版本后,matdialog(内置关闭按钮)无法工作并抛出以下错误:
- `错误类型错误:无法设置 null 属性(设置 '_closeInteractionType')
- 在 _closeDialogVia (dialog.mjs:476:30)
- 在 MatLegacyDialogClose._onButtonClick (legacy-dialog.mjs:287:24)
- 在 MatLegacyDialogClose_click_HostBindingHandler (legacy-dialog.mjs:291:107)
- 在executeListenerWithErrorHandling(core.mjs:14037:16)
- 在wrapListenerIn_markDirtyAndPreventDefault(core.mjs:14070:22)
- 在 HTMLButtonElement 处。(平台浏览器.mjs:455:38)
- 在 _ZoneDelegate.invokeTask (zone.js:443:35)
- 在 core.mjs:23946:55
- 在 AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:23946:36)
- 在 _ZoneDelegate.invokeTask (zone.js:442:64)
- `
附图。
执行命令后:
ng generate @angular/material:mdc-migration
***Parent.compoment.ts***
- import { MatDialog, MatDialogRef } from '@angular/material/dialog';
- public dialog: MatDialog
-
- const dialogRef = this.dialog.open(EmailOptionComponent, {
- role: 'dialog',
- disableClose: true,
- panelClass: ['fis-style', 'panel-export-width', 'margin_35px']
- });
- dialogRef.componentInstance.emailInputOptions = this.emailOptionsData;
- dialogRef.componentInstance.pageName = 'GAIN_LOSS_PAGE'; …
Run Code Online (Sandbox Code Playgroud) 我想将 ethereumjs-tx.js 包含在不带 content_scripts 的 manifest.js` 中。
我的manifest.js
:
{
"manifest_version": 2,
"name": "MyExtension",
"version": "1.0",
"background": {
"scripts": ["background.js"]
},
"permissions": [
"tabs",
"notifications",
"http://*/",
"https://*/"
]
}
Run Code Online (Sandbox Code Playgroud) 我编写了一个 python 代码,可以从 google 工作表下载数据并将其转换为 csv。我提供了一个谷歌驱动器 ID,它会扫描其中的所有工作表,将它们下载到本地计算机中。我已经运行这个程序很多次了,但是今天我得到了这个错误:
raise APIError(response) gspread.exceptions.APIError: { "error": { "code": 503, "message": "该服务当前不可用。", "status": "UNAVAILABLE" } }
任何意见将不胜感激。
我成功检索到令牌。以下是我尝试使用 OAuth 的步骤。
创建您的 manifest.json
{
"name": "Sample Extension",
"version": "1.0",
"description": "Hello World",
"permissions": ["identity", "https://docs.google.com/spreadsheets/"],
"author": "Jess",
"background": {
"scripts": ["background.js"],
"persistent": true
},
"content_scripts": [{
"matches": ["file:///*"],
"js" : ["popup.js"]
}],
"browser_action": {
"default_popup": "popup.html",
"default_icon": "images/get_started16.png",
"default_title": "This is a sample extension"
},
"oauth2": {
"client_id": "client_ID",
"scopes": [
"https://www.googleapis.com/auth/spreadsheets"
]},
"content_security_policy": "script-src 'self' 'unsafe-eval' https://apis.google.com/; object-src 'self'",
"manifest_version": 2
}
Run Code Online (Sandbox Code Playgroud)该Client_ID
是可用的https://console.developers.google.com
。
我正在创建一个 Gmail 插件,我的疑问是如何在 Google 端保存一些安全和机密的信息,以便稍后在我的代码中使用它。Google 是否提供某种安全存储机制?
google-api google-apps-script google-apps-marketplace gmail-addons google-workspace
angular ×2
android ×1
api ×1
axios ×1
gmail-addons ×1
google-api ×1
ionic3 ×1
node.js ×1
postman ×1
request ×1
youtube-api ×1