Search
Severity: Notice
Message: Trying to get property 'plaintext' of non-object
Filename: models/Crawler_model.php
Line Number: 228
Backtrace:
File: /var/www/html/KOL/voice/application/models/Crawler_model.php
Line: 228
Function: _error_handler
File: /var/www/html/KOL/voice/application/controllers/Pages.php
Line: 336
Function: get_dev_google_article
File: /var/www/html/KOL/voice/public/index.php
Line: 319
Function: require_once
Severity: Notice
Message: Trying to get property 'plaintext' of non-object
Filename: models/Crawler_model.php
Line Number: 229
Backtrace:
File: /var/www/html/KOL/voice/application/models/Crawler_model.php
Line: 229
Function: _error_handler
File: /var/www/html/KOL/voice/application/controllers/Pages.php
Line: 336
Function: get_dev_google_article
File: /var/www/html/KOL/voice/public/index.php
Line: 319
Function: require_once
Search
#1. 更簡單的方式將indexOf 當作contains 使用 - Js Tips
JavaScript 預設沒有contain 的方法。如果要檢查字串或是陣列內是否有子字串的存在你可以這樣做:
#2. underscore.js contains()用法及代碼示例- 純淨天空
underscore.js contains()用法及代碼示例. ... _.contains()函數用於檢查是否在列表中沒有給出特定項目。 ... 用法: _.contains( list, value, [fromIndex] ).
#3. Array.prototype.includes() - JavaScript - MDN Web Docs
The example below illustrates includes() method called on the function's arguments object. (function() { console.log([] ...
#4. 怎样使用js contains方法听语音 - 百度经验
先打开我们的编辑器,先建个html文件,在html文件里输入2个div,其中div1包含div2,这样下面就可以演示js原生态里的contains用法了,如下图所示。 怎样 ...
#5. jQuery :contains() 选择器 - 菜鸟教程
jQuery :contains() 选择器jQuery 选择器实例选取所有包含'is' 的<p> 元素: $('p:contains(is)') 尝试一下» 定义和用法:contains() 选择器选取包含指定字符串的元素。
#6. jQuery中:contains選擇器用法例項 - 程式前沿
本文例項講述了jQuery中contains選擇器用法。分享給大家供大家參考。具體分析如下: 此選擇器匹配包含給定文字的元素。 語法: 複製程式碼程式碼 ...
#7. 如何检查JavaScript中的字符串是否包含子字符串? | 码农家园
通常我希望有一个String.contains()方法,但似乎没有。什么是检查这个的合理方法?[collapse title=]使用indexOf方法很简单,你可以在这里看到indexOf ...
#8. js中contains的用法
contains (),js原生方法,用于判断DOM元素的包含关系; 需要注意的是:它以HTMLElement为参数,且返回布尔值。 另外:最近在看element-ui源码的时候发现它内置 ...
#9. javascript contains方法- 司徒正美 - 博客园
如果A元素包含B元素,则返回true,否则false。唯一不支持这个方法的是IE的死对头firefox。 <!doctype html> <title>dom contains 方法by 司徒正美</ ...
#10. jQuery.contains()方法
定義和用法. $.contains() 方法用於判斷指定元素內是否包含另一個元素。 即判斷另一個DOM元素是否是指定DOM元素的後代。 語法. $.contains( container, contained ) ...
#11. JavaScript 之旅(2):Array.prototype.includes() | Titangene Blog
另外為了一致性, Array.prototype.includes() 的參數用法跟 ... 關於為什麼 includes() 要命名成 includes ,而不是 has 或 contains ,可 ...
#12. 学习下js中的contains()选择器的用法 - Web前端之家
学习下js中的contains()选择器的用法,jQuery中:contains()选择器用于选择包含指定字符串的元素。该字符串可以是直接包含在元素中的文本,或者被包含 ...
#13. 檢查陣列是否包含JavaScript 中的值 - Delft Stack
indexOf() 函式在陣列上的用法如下。 JavaScript. javascriptCopy let fruits = ["Apple", ...
#14. JavaScript 之旅(2):Array.prototype.includes() - iT 邦幫忙
另外為了一致性, Array.prototype.includes() 的參數用法跟 Array.prototype. ... 關於為什麼 includes() 要命名成 includes ,而不是 has 或 contains ,可 ...
#15. String indexOf() 包含字串/ 字串比對- JavaScript (JS) 教學Tutorial
JavaScript String indexOf(). indexOf() 方法用來判斷字串字串變數中是否包含某字串 ... 用法: 'Blue Whale'.indexOf('Blue'); // 0 'Blue Whale'.
#16. contains - 程序员秘密
主要介绍了Oracle 中Contains 函数的用法,查询地址在某个城市的学生,sql语句给大家介绍 ... 一个小误区JS中的contains 今天想要用JS判断集合中是否包含另一个集合。
#17. js中attr+用法_js中contains方法_jquery的attr方法 - 小砂知识网
小编在网络上发现很多网友对js中attr+用法的关注度比较高,小伙伴们现在肯定也是对与js中contains方法的内容非常的感兴趣了,都想要了解具体的jquery ...
#18. jQuery中:contains选择器用法实例 - 脚本之家
这篇文章主要介绍了jQuery中:contains选择器用法,以实例形式分析了:contains选择器的功能、定义及匹配给定元素文本时的使用技巧,具有一定参考借鉴价值 ...
#19. Java contains用法示例_程式設計
Java contains用法示例. 阿新• 來源:網路 • 發佈:2020-11-28. 學習Demo. contains方法:用於判斷list集合是否包含某個元素. containsKey方法:用於判斷Map鍵中是否 ...
#20. 在.NET 中撰寫String.Contains 方法時容易犯的錯誤分享
Contains 方法到底有什麼該注意的地方呢。 ... 文件,而這種違反直覺判斷的程式行為實在是需要「經驗」,遇到了才知道,即便是如此簡單的字串用法。
#21. javascript contains方法来判断元素包含关系 - 三水清
W3C的方法是compareDocumentPosition,所以综上来说:JS通过contains和compareDocumentPosition方法来确定DOM节点间的关系,判断一个元素(对象)是否为 ...
#22. javascript - js includes用法- 判断一个数组是否包含一个值#2
contains - javascript - js includes用法- 判断一个数组是否包含一个值#2. JS array contains / javascript / arrays. Read Question. zx8754. Answer #2.
#23. js javascript 判斷字串是否包含某string 物件查詢子indexof
示例 下面的示例說明了indexOf 方法的用法。 ... 判斷陣列是否包含某個元素的js函式實現方法Array.prototype.contains = function(o.
#24. String.IndexOf 方法(System) | Microsoft Docs
... LETTER A WITH RING ABOVE in a string that contains // LATIN SMALL LETTER A WITH RING ABOVE. ... 下列範例示範如何使用方法來搜尋的String 字元IndexOf 。
#25. jQuery :contains() 选择器 - 蝴蝶教程
定义和用法:contains() 选择器选取包含指定字符串的元素。 该字符串可以是直接包含在元素中的文本,或者被包含于子元素中。 最常见的用法:与其他选择器一起使用, ...
#26. javascript contains方法 - w3c菜鳥教程
javascript contains 方法,ie有許多好用的方法,後來都被其他瀏覽器抄襲了,比如這個contains方法。如果a元素包含b元素,則返回true,否則false。
#27. jQuery contains过滤器实现精确匹配使用方法 - html中文网
jQuery contains过滤器实现精确匹配使用方法. 2021-10-17 01:27:09分类:前端开发 / JavaScript 教程阅读(4364)评论(0). contains 选择器选取包含指定字符串的元素。
#28. JavaScript - Bootstrap
js contain all plugins in a single file. Include only one. Plugin dependencies. Some plugins and CSS components depend on other plugins. If you include plugins ...
#29. C# List<T> Contains<T>()的用法小结 - phpStudy
C# List Contains ()的用法小结,泛型List 中有一个比较列表是否已包含对象的方法Contains (),今天在网上搜了一个用法,记录下来,备查。 要用此方法比较我们的自定义 ...
#30. contains方法java - 小临知识网
contains 方法+java最新消息,还有container,instant,contains翻译等内容,Java有一组可以用于字符串的内置方法.Java 字符串(String)操作常用操作, ...
#31. list contains用法 - 掘金
list contains用法技术、学习、经验文章掘金开发者社区搜索结果。 ... 在没有提供这个属性的情况下,classList.js 实现了一套class 处理的能力,本文对该库的源码进行 ...
#32. java中contains方法 - 小硒知识网
java中contains方法最新消息,还有java contains用法,string的contains方法,java数组中的contain方法等内容,Java基础: contains方法的使用List ...
#33. 在Cloud Firestore 中执行简单查询和复合查询
example_data.js ... 您可以使用 array-contains 运算符以根据数组值进行过滤。 ... const q = query(citiesRef, where("regions", "array-contains", "west_coast"));.
#34. java contains用法 - Buuchau
java判斷字符串是否包含某個字符(串, blog.csdn.net. contains()方法– 雙間– 博客園, www.cnblogs.com. JavaScript substring() 方法, www.w3school.com.cn ...
#35. 如何检查字符串是否包含子串? #3 - lycaeum.dev
javascript - Js string contains one of substrings - 如何检查字符串是否包含子串? #3. JavaScript substring / javascript / jquery / string / substring / ...
#36. Include, consist of and contain 三个有“包括”含义的单词的区别
Include,consist of 和contain 这几个词和表达在英语中都可以用来 ... 接下来的时间里,还是让我们通过不同的生活场景来体会这三个单词的用法吧。
#37. [Cypress 2] 看官方文件學習Command & Assertion - Medium
contains () 有時候蠻方便,尤其寫測試跟開發者是不同人,那寫測試者就只要 ... Using .should() or .and() ,Cypress prefer 用法,比較短而且清楚
#38. 字符串contains用法 - 穿越火线攻略网
为您推荐字符串contains用法,相关的游戏攻略. ... 怎样使用js contains方法. pkaust8 · jQuery:contains选择器选取包含指定字符串元素. 可靠的jy0078 ...
#39. jQuery :contains() 选择器_jQuery_Vue5教程
:contains() 选择器选取包含指定字符串的元素。 ... 最常见的用法:与其他选择器一起使用,选取指定组合中包含指定文本的元素(如上面的实例)。
#40. Python有一个字符串'contains'substring方法吗? - ITranslater
使用JavaScript替换字符串的最后一个字符 · javascript-Chart.js 2.0甜甜圈工具提示 ... java-如何在Android Studio IDE中找到项目的所有未使用方法?
#41. JS中正则表达式的用法和indexOf代替contains方法 - 极客分享
js 中没有contains()方法可以用indexOf("str") != -1代替var a = "jianhongxu";var b = "x";a.indexOf(b) != -1;返回true //正则表达式的用法var regex ...
#42. 028-使用Contains比對字串中是否包含子字串
程鼎元(Ding-Yuan Cheng). 搜尋這個協作平台. 協作平台地圖 · 個人資訊 · 01-個人資訊 · 02-個人經歷與參與計畫 · 03-發表論文著作 · 04-競賽成果與獲得獎項.
#43. js contains方法实现代码 - 张生荣
js contains 方法实现代码为了兼容IE和FF我们不得不用以下方法: dom contains 方法by 司徒 ... 随后es出了个forEach方法,两个虽然用法相近,但是不能处理对象类型.
#44. 高效Dart 语言指南:用法示例
forEach() 函数在JavaScript 中被广泛使用,这因为内置的 for-in 循环通常不能达到你想要的效果。 ... removeAt(1); // Now it only contains integers. var ints ...
#45. 如何在JavaScript中檢查字符串是否包含子字符串 - Tech Wiki
這種方法是在ES6 / ES2015。 除Internet Explorer之外,所有現代瀏覽器均支持該功能:. Browser Support for includes. 要在所有瀏覽器上使用它,請使用Polyfill.io或 ...
#46. contains怎么用 - 搜狗搜索
java contains用法. [最佳答案] contains是判断 ... 集合中contains的用法_张小挑的博客-CSDN博客_集合中contains. 2017-02-14 ... 怎样使用js contains方法- 百度经验.
#47. 九种js 中判断数组中是否包含某元素的方法 - 51CTO博客
九种js 中判断数组中是否包含某元素的方法,js中判断数组中是否包含某元素的 ... 实际用法: ... asList(str).contains(s)); Set<String> set = new.
#48. Cypress学习11-定位元素(Querying) - 云+社区- 腾讯云
get()生成一个jQuery对象,您可以通过调用.attr()方法来获取它的属性。 cy.get('[data-test-id="test-example"]') ...
#49. 项目中接入了webview,分享一下常规的用法-华为开发者论坛
setJavaScriptPermit(true);//启用js webConfig. ... if (scheme != null && (scheme.contains("alipay") ... 如js中调用:var appResp = window.
#50. 【C#】判斷字符串中是否包含指定字符串,contains與indexof ...
方法一:使用string.Contains方法string.Contains是大小寫敏感的,如果要用該方法來判斷一個string是否包含某個關鍵字keyword,需要把這個stri.
#51. [Javascript]實作Hashtable | gipi的學習筆記-經營管理 - 點部落
透過Javascript的Array實作出來的類Hashtable,把一些物件導向的概念帶進來,應用上也還算方便: ... 035 var contains = false;
#52. oracle contains 函数的用法Oracle 中Contains 函数的用法_IT技术
想了解Oracle 中Contains 函数的用法的相关内容吗,luxd在本文为您仔细讲解oracle contains 函数的用法的相关知识和一些Code实例,欢迎阅读和指正, ...
#53. JavaScript Promises - W3Schools
JavaScript Promise Object. A JavaScript Promise object contains both the producing code and calls to the consuming code: ...
#54. jQuery选择器用法 - 前端开发博客
jQuery选择器用法. 2016-04-24 javascript学习. jQuery选择器是jQuery库的一大 ... 例如:$("div:contains('John')") ·:empty 匹配所有不包含子元素或者文本的空元素。
#55. linaria - 不需要runtime 的CSS-in-JS 解決方案 - 半熟前端
So interestingly enough, on average, the CSS-in-JS implementation is 56.6% more expensive in this example. Let's see if things are different in ...
#56. Content Security Policy (CSP) 筆記 - HackMD
另外也要注意CSP白名單列入外部JS library CDN可能造成的風險除了要用SRI檢查內容完整性避免被竄改 ... 最後兩個驗證碼比對用法請參考: CSP: script-src - HTTP | MDN ...
#57. comprise、compose都是「組成」但用法差很大!1分鐘弄懂 ...
老師您好,我最近看到consist 也有表示「組成」的意思,那我是不是可以這樣說:The class is consisted of 18 boys and 16 girls.
#58. jQuery 選取元素 - VITO の學習筆記
selector 的基本用法. jQuery Selector 很重要的精神便在於企圖在Javascript 裡實踐CSS3 Selector 的效果,一方面神奇地簡化了取得元素的過程,再者, ...
#59. Handbook - Interfaces - TypeScript
In plain JavaScript, this sort of thing fails silently. ... In the above example, SelectableControl contains all of the members of Control , including the ...
#60. [SQL] LIKE 及CONTAINS 語法用法 - 伊のspace~芳香精油 ...
SELECT * FROM table WHERE Column LIKE '%test%' SELECT * FROM table WHERE Contains(Column, "tes.
#61. 全文檢索CONTAINS Vs like 差異?? - 藍色小舖
資料庫龐大筆數多的時候,效能當即可見。兩者用法大不相同,可自行參閱Help線上說明。 你用like '%keyword%' 當然搜尋範圍很大足夠滿足需求 ...
#62. ueditor jquery javascript 取值問題解決方法 - 網頁設計教學
<script type="text/javascript"> var editor = new UE.ui.Editor(); editor.render("appendInput"); //1.2.4以後可以使用一下代碼實例化編輯器
#63. Refs 和DOM – React
Ref 提供了一種可以取得DOM 節點或在render 方法內建立React element 的方式。 在典型的React 資料流裡,props 是parent component 和child component 唯一的互動方式 ...
#64. HTML DOM getElementsByTagName() 方法 - w3school 在线 ...
<html> <head> <script type="text/javascript"> function getElements() { var x= ... getElementsByTagName("table") ; alert ("This document contains " + ...
#65. YouTube 嵌入式播放器及播放器参数
如需详细了解iframe API 及其用法,请参阅iframe API 文档(JavaScript Player API 已被弃用)。 ... This update contains the following changes:.
#66. CoffeeScript
In that case, we want to convert modern JavaScript into older JavaScript that will run in older versions of Node or older browsers; for example, { a } = obj ...
#67. CodeQL library for JavaScript
Note that representations above the textual level (for example the lexical representation or the flow graphs) are only available for JavaScript code that does ...
#68. xpath的contains用法- 代码先锋网
xpath的contains用法,代码先锋网,一个为软件开发程序员提供代码片段和技术文章聚合的网站。 ... 多重contains,筛选有href和target属性的a结点,给出属性title的值.
#69. Calling and initializing JavaScript - Magento DevDocs
Consider the example of adding a custom carousel JS: ... we expect that page contains the <tag data-role="example">.
#70. APICloud APP前端框架– 手机APP开发
APICloud 前端框架,包括api.js 和api.css。 api.css 处理不同平台浏览器的默认 ... 描述:判断某一个元素是否包含目标元素; 用法:.contains(parentEl, targetEl).
#71. ja contains用法,ja string[] 初始化,matcher - 淄博新房
介绍j a contains用法,j a string[] 初始化,string indexof方法,string lit的旅游详情. ... 其实js里的contains方法不是跟j a方法里的con.
#72. Python __getitem__、__setitem__ ...
Python __getitem__、__setitem__、__delitem__、__len__、__contains__用法 ... __contains__(self, item):该方法判断序列是否包含指定元素。 __setitem__(self, ...
#73. LINQ to SQL語句(7)之Exists/In/Any/All/Contains - 吉米.NET
Exists/In/Any/All/Contains操作符適用場景:用於判斷集合中元素,進一步縮小範圍。 Any 說明:用於判斷集合中是否有元素滿足某一條件;不延遲。
#74. WKWebView | Apple Developer Documentation
The object that contains the configuration details for the web view. ... Evaluates a JavaScript string in the context of the specified frame and content ...
#75. C# string contains ignorecase - 不区分大小写的'包含(字符串)'
C# string contains ignorecase - 不区分大小写的'包含(字符串)'. c# contains用法/ c# / string / contains / case-insensitive. 有什么方法可以使以下内容返回真?
#76. jQuery中:contains选择器用法实例- 三水点靠木 - 3WATER
本文实例讲述了jQuery中contains选择器用法。分享给大家供大家参考。具体分析如下:. 此选择器匹配包含给定文本的元素。 语法: $(":contains(text)").
#77. R package: dplyr 無痛分析dataframe - 我們的基因體時代Our ...
以下分別示範在dplyr中這幾個用法: ... ends_with() 挑選欄位名稱結尾有""字串的欄位; contains() 挑選欄位名稱中包含""字串的欄位 ...
#78. Python startswith contains
Javascript : Check if string contains substring; Check if type of a variable is ... 用法. Python. we just know that it starts with a J. Usage startsWith(str, ...
#79. Environment variables in Compose | Docker Documentation
For example, suppose the shell contains POSTGRES_VERSION=9.3 and you supply ... server.js , then this overrules any setting in your docker-compose.yml file.
#80. Wkwebview onclick javascript - Sharing Risk
iOS: We need… Javascript - date, time, button, onclick, and innerHTML . For example, clicking a button, a link or other HTML element. Javascript alert, ...
#81. 安装 - Vue.js
请确认了解不同构建版本并在你发布的站点中使用生产环境版本,把 vue.js 换成 vue.min.js 。这是一个更小的构建,可以带来比开发环境下更快的速度体验。
#82. Jquery window resize
This jQuery script will contain a function to switch CSS files based on the ... Fluid Images Momentary Overlap On Window Resize Stack Overflow 定义和用法.
#83. Json4s parse nested json - iAsesoria
contains nested list or dictionaries as we have in Example 2. c), and when it specified while reading a file, DataFrame interprets and Parsing json string into ...
#84. 关于Oracle 中Contains 函数的用法总结-mysql教程 - php中文网
大家学会了吗?赶紧动手自己尝试一下吧。 相关推荐:. 全文索引—CONTAINS语法 · JQuery contains的选择器_jquery · 如何利用contains ...
#85. Dynamodb withconditionexpression java example
My condition expression isn't working properly. js examples. ... for AND If Title Contain Refund AND Trigger Body New_Text field equals Refund Credited This ...
#86. Beautiful Soup 4.9.0 documentation - Crummy
Beautiful Soup uses the NavigableString class to contain these bits of text: ... a <style> tag), embedded Javascript (any strings found in a <script> tag), ...
#87. Python startswith contains
Determines whether a string starts with the specified substring. Python string. start : Optional. String startswith() example. startswith ( ("js", "catalog", " ...
#88. Drools Json Example - ADEX Dienstleistungen
How to Convert Comma Separated String into an Array in JavaScript? ... jboss/kie-server-showcase. drl) The Drools rule file contains all business rules.
#89. Golang D3
Here are my specialties: React. js geoGringorten()用法及代码示例. ... This directory contains code and data to visualize the contents of Go binaries.
#90. How to Use BoxLayout - Oracle Help Center
You can find links for running ListDialog and for its source files in the example index for Using Swing Components. The following code, taken from ListDialog.
#91. Django bootstrap modal form submit
2 days ago · Browse other questions tagged javascript jquery bootstrap-4 ... The above example contains the login form with input for username and password.
#92. P5js random
Processing and p5. js contains techniques that can be applied to creating ... 9. js Random 357播放 · 0弹幕 2019-07-24 07:39:41 3 投币 7 1 定义和用法. io ...
#93. Ternary Operator -?: - Wikipedia
This means that if the true- or false-expression contain a function call, ... A traditional if-else construct in C, Java and JavaScript is written:.
#94. Kotlin Parse Json Array
This array contains the values of JavaScript object obtained from the JSON string with the help of JavaScript. Arrays are zero based.
#95. Jquery ui widget
Rating: 4. widget( name [, base ], prototype ) 用法 描述:使用与所有 jQuery ... With over 75 controls, the Essential JS 1 toolkit contains all you need for ...
#96. Zlib compress example python
296 total % time . js . uncompress extracted from open source projects. bools/integers will be upcasted to int64 as this is the only integer format ...
#97. Antd confirm modal
管理. confirm (Showing top 15 results out of Best JavaScript code snippets using antd. ... For example, if the modal contains a form then the focus should ...
js contains用法 在 YouTube 嵌入式播放器及播放器参数 的美食出口停車場
概览
本文档介绍如何在应用中嵌入 YouTube 播放器,并定义了 YouTube 嵌入式播放器可以使用的参数。
通过将参数附加到 iframe 网址末尾,您可以自定义应用中的播放体验。例如,您可以使用
autoplay
参数自动播放多个视频,也可以使用loop
参数重复播放一个视频。您还可以使用enablejsapi
参数,允许通过 iframe Player API 控制播放器。目前,本页面定义了任意 YouTube 嵌入式播放器支持的全部参数。每个参数定义均会确定支持相应参数的播放器。
注意:嵌入式播放器必须具有一个尺寸至少为 200x200 像素的视口。如果播放器显示控件,那么它必须足够大,可以在无需将视口缩小到最小尺寸以下的情况下完整显示控件。我们建议 16:9 播放器的宽至少为 480 像素、高至少为 270 像素。
嵌入 YouTube 播放器您可以使用以下任意一种方法在应用中嵌入 YouTube 播放器并指定播放器参数。请注意,以下说明将介绍如何嵌入会加载单个视频的播放器。接下来的部分将说明如何配置您的播放器,以便加载其他类型的内容(例如播放列表和搜索结果)。
使用<iframe>
标记嵌入播放器在您的应用中定义一个
<iframe>
标记,其中src
网址用于指定播放器将要加载的内容以及您想设置的其他任何播放器参数。<iframe>
标记的height
和width
参数指定了播放器的尺寸。如果您自行创建
<iframe>
元素(而不是使用 iframe Player API 创建),则可以直接将播放器参数附加到网址末尾。网址格式如下:以下
<iframe>
标记将会加载一个可用来播放 YouTube 视频M7lc1UVf-VE
的 640x360 像素的播放器。由于网址中autoplay
参数设置为1
,因此视频会在播放器加载完后自动播放。使用 iframe Player API 嵌入播放器
请按照 iframe Player API 说明,在 iframe Player API 的 JavaScript 代码加载之后,在网页或应用中插入视频播放器。视频播放器构造函数中的第二个参数是指定播放器选项的对象。在此对象中,
playerVars
属性会确定播放器参数。以下 HTML 和 JavaScript 代码展示了一个简单示例,即将 YouTube 播放器插入
选择要播放的内容id
值为ytplayer
的页面元素。系统会在 iframe Player API 代码加载完成后自动调用此处指定的onYouTubePlayerAPIReady()
函数。此代码不会定义任何播放器参数,也不会定义其他事件处理脚本。您可以配置已嵌入的播放器,以加载视频、播放列表、用户上传的视频或针对特定查询的搜索结果。
以下列表介绍了这些选项:
加载视频
对于使用 iframe 嵌入的播放器,您要加载的视频的 YouTube 视频 ID 是在 iframe 的
src
网址中指定的。如果您使用了 YouTube Data API (v3),则可以从搜索结果、播放列表项资源、视频资源或其他资源中检索视频 ID,以编程方式构建这些网址。获取视频 ID 之后,请使用该值替换上述网址中的
VIDEO_ID
文字以创建播放器网址。加载播放列表
将
listType
播放器参数设为playlist
。此外,将list
播放器参数设为您想加载的 YouTube 播放列表 ID。请注意,播放列表 ID 需要以字母
PL
作为前缀,如下例所示:如果您使用的是 YouTube Data API (v3),则可以从搜索结果、频道资源或活动资源中检索播放列表 ID,以编程方式构建这些网址。获得播放列表 ID 之后,请使用该值替换上述网址中的
PLAYLIST_ID
文字。加载用户上传的视频
将
listType
播放器参数设为user_uploads
,然后将list
播放器参数设为 YouTube 用户名,加载自己喜欢的对象所上传的视频。加载指定查询的搜索结果
将
listType
播放器参数设为search
,然后将list
播放器参数设置为您希望的查询字词,让播放器加载相应的搜索结果。支持的参数
下面所有的参数都是可选的。
参数
autoplay
此参数用于指定是否在播放器加载时自动开始播放初始视频。支持的值为
0
或1
。默认值为0
。cc_lang_pref
此参数用于指定播放器将用于显示字幕的默认语言。请将参数值设置为两个字母组成的 ISO 639-1 语言代码。
如果您使用此参数且将
cc_load_policy
参数设为1
,则在播放器加载时,播放器将会以指定的语言显示字幕。如果您还未设置cc_load_policy
参数,则默认情况下字幕将不会显示,但如果用户选择打开字幕,则字幕将会以指定的语言显示。cc_load_policy
将参数值设置为
1
会使系统在默认情况下显示字幕,即使在用户此前关闭了字幕的情况下也是如此。默认行为基于用户偏好设置。color
此参数用于指定在播放器的视频进度条中用来突出显示观看者已经看过的视频长度的颜色。有效的参数值包括
red
和white
,而且在默认情况下,播放器将在视频进度条中使用红色。如需详细了解颜色选项,请参阅 YouTube API 博客。注意:将
color
参数设置为white
会停用modestbranding
选项。controls
此参数用于指明视频播放器控件是否会显示:
controls=0
- 播放器控件不会在播放器中显示。controls=1
(默认值)- 播放器控件会在播放器中显示。disablekb
将参数值设置为
1
会导致播放器无法响应键盘控制键。默认值为0
,表示支持键盘控制键。目前支持的键盘控制键如下:空格键或 [k] 键:播放/暂停
向左箭头键:在当前视频中向后跳 5 秒
向右箭头键:在当前视频中向前跳 5 秒
向上箭头键:调高音量
向下箭头键:调低音量
[f] 键:切换全屏显示
[j] 键:在当前视频中向后跳 10 秒
[l] 键:在当前视频中向前跳 10 秒
[m] 键:将视频静音或取消静音
[0-9] 键:跳转到视频中的某一位置。
0
键用于跳转到视频的开头、1
键用于跳转到视频的 10% 这一位置、2
键用于跳转到视频的 20% 这一位置,依此类推。enablejsapi
将参数值设置为
1
则可允许通过 iframe 或 JavaScript Player API 调用来控制播放器。默认值为0
,表示无法使用这些 API 控制播放器。如需详细了解 iframe API 及其用法,请参阅 iframe API 文档(JavaScript Player API 已被弃用)。
end
此参数用于指定时间,以秒为单位,自视频开头开始计算,直到播放器应该停止播放视频时为止。此参数值是正整数。
请注意,时间是从视频开头而不是从
start
播放器参数值或startSeconds
参数值开始计算的;此时间在 YouTube Player API 函数中用于加载视频或将视频加入队列。fs
将此参数设置为
0
可以阻止全屏按钮显示在播放器中。默认值为1
,该值会使全屏按钮显示。hl
设置播放器的界面语言。此参数值是两个字母组成的 ISO 639-1 语言代码或完整表示的语言区域。例如,
fr
和fr-ca
都是有效值。系统或许也能正确处理 IETF 语言标记 (BCP 47) 之类的语言输入代码。界面语言用于播放器中的工具提示,而且还会影响默认的字幕轨道。请注意,YouTube 可能会根据特定用户的个人语言偏好设置和提供的字幕轨道,为该用户选择其他字幕轨道语言。
iv_load_policy
将参数值设置为
1
会在默认情况下显示视频注释,而将其设置为3
则默认不显示。默认值为1
。list
list
参数与listType
参数搭配使用时可确定播放器中将要加载的内容。如果
listType
参数的值为search
,则list
参数值会指定搜索查询。如果
listType
参数的值为user_uploads
,则list
参数值会确定将要加载的已上传视频所在的 YouTube 频道。如果
listType
参数的值为playlist
,则list
参数值会指定 YouTube 播放列表 ID。在参数值中,您需要使用字母PL
为播放列表 ID 添加前缀,如下例所示。注意:如果您指定
list
和listType
参数的值,则 iframe 嵌入网址就无需指定视频 ID。listType
listType
参数与list
参数搭配使用时可确定播放器中将要加载的内容。有效的参数值包括playlist
、search
和user_uploads
。如果您指定
list
和listType
参数的值,则 iframe 嵌入网址就无需指定视频 ID。loop
如果播放器是单视频播放器,则将此值设置为
1
会使播放器反复播放初始视频。如果播放器是播放列表播放器(或自定义播放器),则会播放整个播放列表中的视频,然后再从第一个视频开始播放。支持的值为
0
和1
,默认值为0
。注意:此参数在 AS3 播放器和 iframe 嵌入式播放器(可能会加载 AS3 或 HTML5 播放器)中得到的支持会受到限制。目前,仅在与
playlist
参数结合使用时,loop
参数才能在 AS3 播放器中起作用。要循环播放单个视频,请将loop
参数值设置为1
,并将playlist
参数值设置为与 Player API 网址中已指定的视频 ID 相同的值:modestbranding
此参数可让您使用不显示 YouTube 徽标的 YouTube 播放器。将参数值设置为
1
可以阻止 YouTube 徽标显示在控制栏中。请注意,当用户的鼠标指针悬停在播放器上方时,一个小YouTube
文字标签仍将显示在暂停的视频的右上角。origin
此参数为 iframe API 提供额外的安全措施,而且仅支持 iframe 嵌入式播放器。如果您使用了 iframe API,这意味着您会将
enablejsapi
参数值设置为1
,那么您应始终将网域指定为origin
参数值。playlist
此参数用于指定要播放的视频 ID 列表(以英文逗号分隔)。如果您指定一个值,则播放的第一个视频将是网址路径中指定的
VIDEO_ID
对应的视频,而在playlist
参数中指定的视频将在随后播放。playsinline
此参数用于控制视频在 iOS 设备上的 HTML5 播放器中播放时,是以内嵌方式还是全屏模式播放。有效值如下:
0
:如果使用该值,视频将以全屏模式播放。目前默认使用此值,但以后可能会变。1
:如果使用该值,则在allowsInlineMediaPlayback
属性值设置为TRUE
的情况下创建的UIWebViews
会以内嵌方式播放。rel
注意:此参数在 2018 年 9 月 25 日当天或之后有调整。
在更改前,此参数用于指示初始视频播放结束时,播放器是否应显示相关视频。
如果参数值设置为
1
(默认值),则播放器会显示相关视频。如果参数值设置为
0
,则播放器不会显示相关视频。在更改后,您将无法停用相关视频。相反,如果
rel
参数设置为0
,则相关视频将来自与刚播放的视频相同的频道。showinfo
注意:2018 年 9 月 25 日后,此参数已被弃用,并会被忽略。
支持的值包括:
0
和1
。如果将参数值设置为
0
,则在视频开始播放之前,播放器不会显示视频标题和上传者等信息。如果播放器正在加载播放列表,而且您已明确将该参数值设置为
1
,那么播放列表加载时,播放器还将显示播放列表中视频的缩略图。start
此参数可让播放器从视频中的指定位置开始播放视频,具体位置以距视频开头的秒数表示。此参数值是正整数。请注意,与
seekTo
函数类似,播放器会查找与指定时间最接近的关键帧。这就意味着,播放指针有时可能会停在请求时间之前几秒的位置,通常与请求时间相差不超过 2 秒。widget_referrer
此参数用于标识在其中嵌入了播放器的网址。如果 YouTube 播放器嵌入到了微件中,而该微件随后嵌入到网页或应用中,则 YouTube 数据分析报告中会使用此值。在这种情况下,
origin
参数用于标识微件提供商的网域,但 YouTube 数据分析不会将微件提供商标识为实际的流量来源。相反,YouTube 数据分析会改用widget_referrer
参数值以标识与流量来源关联的网域。修订历史记录
August 23, 2018
Note: This is a deprecation announcement for the
showinfo
parameter. In addition, the behavior for therel
parameter is changing. Titles, channel information, and related videos are an important part of YouTube’s core user experience, and these changes help to make the YouTube viewing experience consistent across different platforms.The behavior for the
rel
parameter is changing on or after September 25, 2018. The effect of the change is that you will not be able to disable related videos. However, you will have the option of specifying that the related videos shown in the player should be from the same channel as the video that was just played.To be more specific:
Prior to the change, if the parameter's value is set to
0
, then the player does not show related videos.After the change, if the
rel
parameter is set to0
, the player will show related videos that are from the same channel as the video that was just played.The
showinfo
parameter, which indicates whether the player should display information like the video title and uploader before the video starts playing, is also being deprecated. Following the change, the channel avatar and video title will always display before playback begins, when playback is paused, and when playback ends. The avatar being displayed is new behavior that will be consistent across all embedded players.These changes will become effective on or after September 25, 2018. After that time, the
showinfo
parameter will be ignored. The behavior following the changes is consistent with the current default behavior for embedded players with the exception of the channel avatar changes mentioned above.August 16, 2018
The
cc_lang_pref
parameter can be used to specify the default language that the player will use to display captions. This parameter can be used in conjunction with thecc_load_policy
parameter to automatically show captions in the specified language during playback.September 15, 2017
The
controls
parameter's definition has been updated to remove references to the deprecated Flash (AS3) player. The value2
has been deprecated as it was originally designed to provide a performance improvement for embeds that loaded a Flash player.June 12, 2017
The new
widget_referrer
parameter helps to enable more accurate YouTube Analytics reporting when the YouTube player is embedded in a widget, and that widget is then embedded in a web page or application.November 1, 2016
This document has been updated to remove references to the deprecated Flash (AS3) player as well as to parameters only supported by that player. The YouTube Flash player was deprecated in January 2015.
October 20, 2016
This update contains the following changes:
The
disablekb
parameter definition has been corrected to note that the default value is0
, which means that keyboard controls are enabled. A value of1
indicates that keyboard controls should be disabled.The list of keyboard controls that the player supports has also been updated to include the following:
[f]: Toggle full-screen display
[j]: Jump back 10 seconds in the current video
[k]: Play / Pause
[l]: Jump ahead 10 seconds in the current video
[m]: Mute or unmute the video
[0-9]: Jump to a point in the video.
0
jumps to the beginning of the video,1
jumps to the time 10% into the video,2
jumps to the point 20% into the video, and so forth.In addition, the effect of pressing the [arrow left] or [arrow right] keys has changed. These keys now jump 5 seconds back (arrow left) or ahead (arrow right) in the current video.
August 11, 2016
This update contains the following changes:
The newly published YouTube API Services Terms of Service ("the Updated Terms"), discussed in detail on the YouTube Engineering and Developers Blog, provides a rich set of updates to the current Terms of Service. In addition to the Updated Terms, which will go into effect as of February 10, 2017, this update includes several supporting documents to help explain the policies that developers must follow.
The full set of new documents is described in the revision history for the Updated Terms. In addition, future changes to the Updated Terms or to those supporting documents will also be explained in that revision history. You can subscribe to an RSS feed listing changes in that revision history from a link in that document.
December 18, 2015
European Union (EU) laws require that certain disclosures must be given to and consents obtained from end users in the EU. Therefore, for end users in the European Union, you must comply with the EU User Consent Policy. We have added a notice of this requirement in our YouTube API Terms of Service.
August 19, 2015
The
autohide
parameter has been deprecated for the HTML5 player. In HTML5 players, the video progress bar and player controls display or hide automatically. That behavior corresponds to anautohide
setting of1
.The
theme
parameter has been deprecated for the HTML5 player. HTML5 players now always use the dark theme.March 9, 2015
The document has been updated to reflect the fact that YouTube
<object>
embeds, the YouTube Flash Player API and the YouTube JavaScript Player API have all been deprecated as of January 27, 2015. A deprecation warning appears in several sections of this document to help point readers to the IFrame Player API as an alternative.The definition of the
autohide
parameter has been updated to clarify the meaning of the parameter's values. The default behavior (autohide=2
) is that if the player has a 16:9 or 4:3 aspect ratio, the player's video progress bar and player controls display or hide automatically. Otherwise, those controls are visible throughout the video.The definition of the
hl
parameter has been updated to note that the parameter value could be an ISO 639-1 two-letter language code or a fully specified locale. For example,fr
andfr-ca
are both valid parameter values.The definition of the
enablejsapi
parameter has been reworded to clarify that the parameter enables a player to be controlled via API calls. The API could be either the IFrame Player API or the JavaScript Player API.October 14, 2014
The HTML5 player now supports the
cc_load_policy
,disablekb
,end
,fs
,list
, andlistType
parameters. The parameter descriptions have been updated accordingly.July 18, 2014
The new
hl
parameter can be used to set the player's interface language. The interface language is used for tooltips in the player and also affects the default caption track. The selected caption track may also depend on the availability of caption tracks and user's individual language preferences.The parameter's value is an ISO 639-1 two-letter language code, though other language input codes, such as IETF language tags (BCP 47) may also be handled properly.
The definition of the
playsinline
parameter, which only affects HTML5 players on iOS, has been modified slightly. The definition now notes that setting the parameter value to1
causes inline playback only forUIWebViews
created with theallowsInlineMediaPlayback
property set toTRUE
.January 28, 2014
The
playsinline
parameter controls whether videos play inline or fullscreen in an HTML5 player on iOS. Setting the value to1
causes inline playback.The Selecting content to play section has been updated to explain how to find YouTube video IDs and playlist IDs using the YouTube Data API (v3) rather than the older API version.
The
controls
parameter's definition has been updated to reflect the fact that the parameter value only affects the time that the Flash player actually loads in IFrame embeds. In addition, for IFrame embeds, the parameter value also determines when the controls display in the player. If you set the parameter's value to2
, then the controls display and the Flash player loads after the user initiates the video playback.May 10, 2013
This update contains the following changes:
YouTube no longer identifies experimental API features and services. Instead, we now provide a list of YouTube APIs that are subject to the deprecation policy.
July 20, 2012
This update contains the following changes:
The definition of the
controls
parameter has been updated to reflect support for a parameter value of2
and to explain that, for AS3 players, the parameter value determines the time when the Flash player actually loads. If thecontrols
parameter is set to0
or1
, the Flash player loads immediately. If the parameter value is2
, the Flash player does not load until the video playback is initiated.June 5, 2012
This update contains the following changes:
The HTML5 player now supports the
color
,modestbranding
, andrel
parameters, and the definitions for these parameters have been updated accordingly.The definition of the
showinfo
parameter has been updated to explain how that if the player is loading a playlist, and you explicitly set the parameter value to1
, then, upon loading, the player will also display thumbnail images for the videos in the playlist. Note that this functionality is only supported for the AS3 player since that is the only player that can load a playlist.May 4, 2012
This update contains the following changes:
The
showinfo
parameter's definition has been updated to reflect the fact that the HTML5 player supports this parameter.May 3, 2012
This update contains the following changes:
The new
end
parameter specifies the time, measured in seconds from the start of the video, when the player should stop playing a video. Note that the time when playback is stopped is measured from the beginning of the video and not from the value of either thestart
player parameter or thestartSeconds
parameter, which is used in YouTube Player API functions for loading or queueing a video.March 29, 2012
This update contains the following changes:
The new Embedding a YouTube player section explains different ways to embed a YouTube player in your application. This section covers manual IFrame embeds, IFrame embeds that use the IFrame Player API, and AS3 and AS2 object embeds. This section incorporates information from the old Example usage section, which has been removed.
The new Selecting content to play section explains how to configure the player to load a video, a playlist, search results for a specified query, or uploaded videos for a specified user.
The new
list
andlistType
parameters let you specify the content that the player should load. You can specify a playlist, a search query, or a particular user's uploaded videos.The definitions of the
fs
andrel
parameters have been updated to more clearly explain the default parameter values for the AS3 player.The
border
,color1
,egm
,hd
, andshowsearch
parameters, which are all only supported for the deprecated AS2 Player API, have been moved to a new section named deprecated parameters only used in the AS2 Player API.The document no longer provides a way to filter the parameter list to only display parameters supported in either the AS3, AS2, or HTML5 player. Instead, each parameter definition has been updated to identify the players that support that parameter.
August 11, 2011
This update contains the following changes:
The new
theme
andcolor
parameters let you customize the appearance of the embedded player's player controls. See the YouTube API blog for more information.June 8, 2011
This update contains the following changes:
The new
modestbranding
parameter lets you use a YouTube player that does not show a YouTube logo. As of this release, the parameter was only supported for the AS3 embedded player and for IFrame embeds that loaded the AS3 player. As of June 5, 2012, the HTML5 player also supported this parameter.February 14, 2011
This update contains the following changes:
The documentation has been updated to note that the AS2 Player API has been deprecated. The deprecation of the AS2 Player API was actually announced on October 14, 2009.
February 3, 2011
This update contains the following changes:
The documentation has been updated to identify parameters supported in the HTML5 (IFrame) embedded player.
The document now displays all of the parameters supported in any of YouTube's embedded players (HTML5, AS3, AS2).
The following parameters are supported in the AS2 player but have been deprecated for the newer AS3 and HTML5 players:
border
,color1
,color2
,egm
,hd
, andshowsearch
.In addition, the
loop
parameter has limited support in the AS3 player and in IFrame embeds, which could load either an AS3 or HTML player. Currently, theloop
parameter only works in the AS3 player when used in conjunction with theplaylist
parameter. To loop a single video, set theloop
parameter to1
and set theplaylist
parameter value to the same video ID already specified in the Player API URL:Similarly, the
controls
andplaylist
parameters are supported in the AS3 and HTML5 players but are not and will not be supported in the AS2 player.As noted above, IFrame embeds can load either an AS3 or HTML5 player. Though some parameters are not supported in both players, an IFrame embed that loads the AS3 player will support all parameters that work with that player and ignore all other parameters. Similarly, an IFrame embed that loads the HTML5 player will support all parameters that work with that player while ignoring all other parameters.
The parameter list has been updated to include the
autohide
parameter, which indicates whether the player's video controls will automatically hide after a video begins playing.The parameter list has been updated to include the
controls
parameter, which indicates whether the player's video controls will display at all. (Player controls do display by default.)The parameter list has been updated to include the
playlist
parameter, which specifies a comma-separated list of video IDs to play.The definition of the
fs
has been updated to note that the fullscreen option will not work if you load the YouTube player into another SWF.The example at the end of the document has been updated to use the embedded AS3 player instead of the embedded AS2 player. The parameters used in the example have also been updated to only include parameters that the AS3 player supports.
In addition, the instructions for constructing the URLs that contain player parameters have been updated to reflect the URL formats used by the AS3 and AS2 embedded and chromeless players as well as by the HTML5 player.
... <看更多>