mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
update docs
This commit is contained in:
1 parent
15519a6929
commit
a07b2ecfbf
59 files changed
+187
-187
No files matched your search
@@ -0,0 +1,698 @@
|
||||
const t={map:'[{"高级属性":["0.0"],"option":["0.1","1.12","12.14"],"whitelist":["0.2","16.36"],"template":["0.3"],"events":["0.4"],"storage":["0.5"],"icons":["0.6","16.40"],"i18n":["0.7","16.44"],"notice":["0.8","1.15"],"layers":["0.9","15.1","16.29"],"controls":["0.10","15.2","16.32"],"contextmenu":["0.11","1.14","15.3","16.31"],"subtitle":["0.12","16.38"],"loading":["0.13"],"hotkey":["0.14","2.5","16.20"],"mask":["0.15"],"setting":["0.16","1.16","1.17","1.18","16.19"],"plugins":["0.17","16.35"],"静态属性":["1.0"],"instances":["1.1"],"version":["1.2"],"env":["1.3"],"build":["1.4"],"config":["1.5","12.11"],"utils":["1.6"],"scheme":["1.7"],"emitter":["1.8"],"validator":["1.9"],"kindof":["1.10"],"html":["1.11"],"debug":["1.13"],"indicator":["1.19","1.20","1.21","1.22"],"volume":["1.23","1.24","1.42","4.8","16.8"],"resize":["1.25","2.15"],"scroll":["1.26","1.27"],"auto":["1.28","1.29","1.30"],"reconnect":["1.31","1.32"],"control":["1.33"],"db":["1.34"],"mobile":["1.35","1.36","1.37"],"info":["1.38"],"fast":["1.39","1.40"],"touch":["1.41"],"seek":["1.43","2.26","4.5"],"progress":["1.44"],"playback":["1.45"],"aspect":["1.46"],"flip":["1.47","2.20","4.26","16.15"],"实例事件":["2.0"],"ready":["2.1"],"restart":["2.2"],"pause":["2.3","4.2"],"play":["2.4","4.1"],"destroy":["2.6","4.4"],"url":["2.7","4.9","16.2"],"focus":["2.8"],"blur":["2.9"],"dblclick":["2.10"],"click":["2.11"],"error":["2.12"],"hover":["2.13"],"mousemove":["2.14"],"view":["2.16"],"aspectratio":["2.17","4.28","16.17"],"autoheight":["2.18","4.30"],"autosize":["2.19","4.24","16.12"],"fullscreen":["2.21","4.18","16.23"],"fullscreenweb":["2.22","4.19","16.24"],"mini":["2.23","4.22"],"pip":["2.24","4.20","16.21"],"screenshot":["2.25","4.15","16.18"],"subtitleoffset":["2.27","16.25"],"subtitleupdate":["2.28"],"subtitleload":["2.29"],"subtitleswitch":["2.30"],"video":["2.31","2.32","2.33","2.34","2.35","2.36","2.37","2.38","2.39","2.40","2.41","2.42","2.43","2.44","2.45","2.46","2.47","2.48","2.49","2.50","2.51","4.40"],"编写插件":["3.0"],"实例属性":["4.0"],"toggle":["4.3"],"forward":["4.6"],"backward":["4.7"],"switchurl":["4.10"],"switchquality":["4.11"],"muted":["4.12","16.10"],"currenttime":["4.13"],"duration":["4.14"],"getdataurl":["4.16"],"getbloburl":["4.17"],"poster":["4.21","16.5"],"playing":["4.23"],"rect":["4.25"],"playbackrate":["4.27","16.16"],"loop":["4.29","16.14"],"attr":["4.31"],"title":["4.32","16.6"],"type":["4.33","16.41"],"theme":["4.34","16.7"],"airplay":["4.35","16.49"],"loaded":["4.36"],"played":["4.37"],"proxy":["4.38"],"query":["4.39"],"wip":["5.0"],"安装使用":["6.0"],"安装":["6.1","10.2","11.2","12.2","13.2","14.3"],"cdn":["6.2","10.3","11.3","12.3","13.3","14.4"],"使用":["6.3","10.4","11.4","14.5"],"vue":["6.4"],"react":["6.5"],"语法提示":["6.6"],"dash":["7.0"],"flv":["8.0"],"hls":["9.0","13.0"],"视频广告":["10.0"],"演示":["10.1","11.1","12.1","13.1","14.2"],"控制器皮肤":["11.0"],"enable":["11.5"],"弹幕库":["12.0"],"选项":["12.4"],"使用弹幕数组":["12.5"],"使用弹幕":["12.6"],"使用异步调用":["12.7"],"hide":["12.8"],"ishide":["12.9"],"emit":["12.10"],"load":["12.12"],"reset":["12.13"],"事件":["12.15"],"iframe":["14.0","14.7"],"说明":["14.1"],"实例接口":["14.6"],"组件配置":["15.0"],"基础选项":["16.0"],"container":["16.1"],"id":["16.3"],"onready":["16.4"],"islive":["16.9"],"autoplay":["16.11"],"automini":["16.13"],"mutex":["16.22"],"miniprogressbar":["16.26"],"usessr":["16.27"],"playsinline":["16.28"],"settings":["16.30"],"quality":["16.33"],"highlight":["16.34"],"thumbnails":["16.37"],"morevideoattr":["16.39"],"customtype":["16.42"],"lang":["16.43"],"lock":["16.45"],"fastforward":["16.46"],"autoplayback":["16.47"],"autoorientation":["16.48"],"设置面板":["17.0"],"选择列表":["17.1"],"列表嵌套":["17.2"],"切换按钮":["17.3"],"范围滑块":["17.4"]},{"0":["4.36","4.37","16.8"],"1":["12.4"],"4":["15.3"],"5":["12.4","15.1"],"10":["12.4"],"13":["15.3"],"15":["3.0"],"22":["15.1"],"这里的":["0.0","1.0","4.0"],"播放器的选项":["0.1"],"div":["0.1","0.2","0.3","0.5","0.6","0.8","0.14","0.17","1.1","1.6","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","3.0","4.1","4.2","4.3","4.14","4.25","4.35","7.0","8.0","9.0","10.4","11.4","11.5","12.5","12.6","12.7","12.8","12.9","12.10","12.12","12.13","12.14","15.1","15.2","15.3","16.2","16.29","16.30","16.31","16.32","17.2"],"classname":["0.1","0.2","0.3","0.17","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17","2.18","2.19","2.20","2.21","2.22","2.23","2.24","2.25","2.26","2.27","2.28","2.29","2.30","3.0","7.0","8.0","9.0","10.4","11.4","12.5","12.6","12.7","12.9","12.10","12.12","12.13","12.14","15.1","15.2","15.3","16.2","16.29","16.30","17.2"],"run":["0.1","0.3","2.0","2.2","2.6Line truncated
|
||||
`,l:"advanced/built-in.html",a:"高级属性"},"0.1":{t:"option",p:`播放器的选项
|
||||
<div className="run-code">▶ Run Code< ...`,l:"advanced/built-in.html#option",a:"option"},"0.2":{t:"whitelist",p:`管理移动设备的白名单功能,只有一个属性 state 返回是否启用播放器功能
|
||||
<div className=" ...`,l:"advanced/built-in.html#whitelist",a:"whitelist"},"0.3":{t:"template",p:`管理播放器所有的 DOM 元素
|
||||
<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#template",a:"template"},"0.4":{t:"events",p:"管理播放器所有的 DOM 事件,实质上是代理了 addEventListener 和 removeEventListener ...",l:"advanced/built-in.html#events",a:"events"},"0.5":{t:"storage",p:`管理播放器的本地存储
|
||||
|
||||
name 属性用于设置缓存的 key
|
||||
set 方法用于设置缓存
|
||||
get 方法用于获取缓存
|
||||
del 方 ...`,l:"advanced/built-in.html#storage",a:"storage"},"0.6":{t:"icons",p:`管理播放器所有的 svg 图标
|
||||
<div className="run-code">▶ Ru ...`,l:"advanced/built-in.html#icons",a:"icons"},"0.7":{t:"i18n",p:`管理播放器的 i18n
|
||||
|
||||
get 方法用于获取 i18n 的值
|
||||
update 方法用于更新 i18n 对象
|
||||
|
||||
<div ...`,l:"advanced/built-in.html#i18n",a:"i18n"},"0.8":{t:"notice",p:`管理播放器的提示语,只有一个 show 属性用于显示提示语
|
||||
<div className="run-code ...`,l:"advanced/built-in.html#notice",a:"notice"},"0.9":{t:"layers",p:`管理播放器的层
|
||||
|
||||
add 方法用于动态添加层
|
||||
show 属性用于设置是否显示全部层
|
||||
toggle 属性用于切换是否显示全部层 ...`,l:"advanced/built-in.html#layers",a:"layers"},"0.10":{t:"controls",p:`管理播放器的控制器
|
||||
|
||||
add 方法用于动态添加控制器
|
||||
show 属性用于设置是否显示全部控制器
|
||||
toggle 属性用于切换是 ...`,l:"advanced/built-in.html#controls",a:"controls"},"0.11":{t:"contextmenu",p:`管理播放器的右键菜单
|
||||
|
||||
add 方法用于动态添加菜单
|
||||
show 属性用于设置是否显示全部菜单
|
||||
toggle 属性用于切换是否 ...`,l:"advanced/built-in.html#contextmenu",a:"contextmenu"},"0.12":{t:"subtitle",p:`管理播放器的字幕功能
|
||||
|
||||
url 属性设置和返回当前字幕地址
|
||||
style 方法设置当前字幕的样式
|
||||
switch 方法设置当前字 ...`,l:"advanced/built-in.html#subtitle",a:"subtitle"},"0.13":{t:"loading",p:`管理播放器的加载层
|
||||
|
||||
show 属性用于设置是否显示加载层
|
||||
toggle 属性用于切换是否显示加载层
|
||||
|
||||
<div cl ...`,l:"advanced/built-in.html#loading",a:"loading"},"0.14":{t:"hotkey",p:`管理播放器的快捷键功能
|
||||
|
||||
add 方法用于添加快捷键
|
||||
remove 方法用于删除快捷键
|
||||
|
||||
<div className ...`,l:"advanced/built-in.html#hotkey",a:"hotkey"},"0.15":{t:"mask",p:`管理播放器的遮罩层
|
||||
|
||||
show 属性用于设置是否显示遮罩层
|
||||
toggle 属性用于切换是否显示遮罩层
|
||||
|
||||
<div cl ...`,l:"advanced/built-in.html#mask",a:"mask"},"0.16":{t:"setting",p:`管理播放器的设置面板
|
||||
|
||||
add 方法用于动态添加设置项
|
||||
show 属性用于设置是否显示全部设置项
|
||||
toggle 属性用于切换 ...`,l:"advanced/built-in.html#setting",a:"setting"},"0.17":{t:"plugins",p:`管理播放器的插件功能,只有一个方法 add 用于动态添加插件
|
||||
<div className="run-cod ...`,l:"advanced/built-in.html#plugins",a:"plugins"},"1.0":{t:"静态属性",p:`这里的 静态属性 是指挂载在 构造函数 的 一级属性,非常少使用
|
||||
:::warning 提示
|
||||
有些属性是全大写的,说明这些属 ...`,l:"advanced/class.html",a:"静态属性"},"1.1":{t:"instances",p:`返回全部播放器实例的数组,假如你想同时管理多个播放器的时候,可以用到该属性
|
||||
<div className=" ...`,l:"advanced/class.html#instances",a:"instances"},"1.2":{t:"version",p:`返回播放器的版本信息
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#version",a:"version"},"1.3":{t:"env",p:`返回播放器的环境变量
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#env",a:"env"},"1.4":{t:"build",p:`返回播放器的打包时间
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#build",a:"build"},"1.5":{t:"config",p:`返回视频的默认配置
|
||||
<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#config",a:"config"},"1.6":{t:"utils",p:`返回播放器的工具函数集合
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/class.html#utils",a:"utils"},"1.7":{t:"scheme",p:`返回播放器选项的校验方案
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/class.html#scheme",a:"scheme"},"1.8":{t:"emitter",p:`返回事件分发器的构造函数
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/class.html#emitter",a:"emitter"},"1.9":{t:"validator",p:`返回选项的校验函数
|
||||
<div className="run-code">▶ Run Code ...`,l:"advanced/class.html#validator",a:"validator"},"1.10":{t:"kindof",p:`返回类型检测的函数工具
|
||||
<div className="run-code">▶ Run Co ...`,l:"advanced/class.html#kindof",a:"kindof"},"1.11":{t:"html",p:`返回播放器所需的 html 字符串
|
||||
<div className="run-code">▶ ...`,l:"advanced/class.html#html",a:"html"},"1.12":{t:"option",p:`返回播放器的默认选项
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/class.html#option",a:"option"},"1.13":{t:"debug",p:"",l:"advanced/class.html#debug",a:"debug"},"1.14":{t:"contextmenu",p:"",l:"advanced/class.html#contextmenu",a:"contextmenu"},"1.15":{t:"notice-time",p:"",l:"advanced/class.html#notice-time",a:"notice-time"},"1.16":{t:"setting-width",p:"",l:"advanced/class.html#setting-width",a:"setting-width"},"1.17":{t:"setting-item-width",p:"",l:"advanced/class.html#setting-item-width",a:"setting-item-width"},"1.18":{t:"setting-item-height",p:"",l:"advanced/class.html#setting-item-height",a:"setting-item-height"},"1.19":{t:"indicator-size",p:"",l:"advanced/class.html#indicator-size",a:"indicator-size"},"1.20":{t:"indicator-size-icon",p:"",l:"advanced/class.html#indicator-size-icon",a:"indicator-size-icon"},"1.21":{t:"indicator-size-mobile",p:"",l:"advanced/class.html#indicator-size-mobile",a:"indicator-size-mobile"},"1.22":{t:"indicator-size-mobile-icon",p:"",l:"advanced/class.html#indicator-size-mobile-icon",a:"indicator-size-mobile-icon"},"1.23":{t:"volume-panel-width",p:"",l:"advanced/class.html#volume-panel-width",a:"volume-panel-width"},"1.24":{t:"volume-handle-width",p:"",l:"advanced/class.html#volume-handle-width",a:"volume-handle-width"},"1.25":{t:"resize-time",p:"",l:"advanced/class.html#resize-time",a:"resize-time"},"1.26":{t:"scroll-time",p:"",l:"advanced/class.html#scroll-time",a:"scroll-time"},"1.27":{t:"scroll-gap",p:"",l:"advanced/class.html#scroll-gap",a:"scroll-gap"},"1.28":{t:"auto-playback-max",p:"",l:"advanced/class.html#auto-playback-max",a:"auto-playback-max"},"1.29":{t:"auto-playback-min",p:"",l:"advanced/class.html#auto-playback-min",a:"auto-playback-min"},"1.30":{t:"auto-playback-timeout",p:"",l:"advanced/class.html#auto-playback-timeout",a:"auto-playback-timeout"},"1.31":{t:"reconnect-time-max",p:"",l:"advanced/class.html#reconnect-time-max",a:"reconnect-time-max"},"1.32":{t:"reconnect-sleep-time",p:"",l:"advanced/class.html#reconnect-sleep-time",a:"reconnect-sleep-time"},"1.33":{t:"control-hide-time",p:"",l:"advanced/class.html#control-hide-time",a:"control-hide-time"},"1.34":{t:"db-clice-time",p:"",l:"advanced/class.html#db-clice-time",a:"db-clice-time"},"1.35":{t:"mobile-auto-playbackrate",p:"",l:"advanced/class.html#mobile-auto-playbackrate",a:"mobile-auto-playbackrate"},"1.36":{t:"mobile-auto-playbackrate-time",p:"",l:"advanced/class.html#mobile-auto-playbackrate-time",a:"mobile-auto-playbackrate-time"},"1.37":{t:"mobile-auto-orientation-time",p:"",l:"advanced/class.html#mobile-auto-orientation-time",a:"mobile-auto-orientation-time"},"1.38":{t:"info-loop-time",p:"",l:"advanced/class.html#info-loop-time",a:"info-loop-time"},"1.39":{t:"fast-forward-value",p:"",l:"advanced/class.html#fast-forward-value",a:"fast-forward-value"},"1.40":{t:"fast-forward-time",p:"",l:"advanced/class.html#fast-forward-time",a:"fast-forward-time"},"1.41":{t:"touch-move-ratio",p:"",l:"advanced/class.html#touch-move-ratio",a:"touch-move-ratio"},"1.42":{t:"volume-step",p:"",l:"advanced/class.html#volume-step",a:"volume-step"},"1.43":{t:"seek-step",p:"",l:"advanced/class.html#seek-step",a:"seek-step"},"1.44":{t:"progress-height",p:"",l:"advanced/class.html#progress-height",a:"progress-height"},"1.45":{t:"playback-rate",p:"",l:"advanced/class.html#playback-rate",a:"playback-rate"},"1.46":{t:"aspect-ratio",p:"",l:"advanced/class.html#aspect-ratio",a:"aspect-ratio"},"1.47":{t:"flip",p:"",l:"advanced/class.html#flip",a:"flip"},"2.0":{t:"实例事件",p:`播放器的事件分为两种,一种视频的 原生事件 (前缀 video:),另外一种是 自定义事件
|
||||
监听事件:
|
||||
<div cl ...`,l:"advanced/event.html",a:"实例事件"},"2.1":{t:"ready",p:`当播放器首次可以播放器时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#ready",a:"ready"},"2.2":{t:"restart",p:`当播放器切换地址后并可以播放时触发
|
||||
<div className="run-code">▶ ...`,l:"advanced/event.html#restart",a:"restart"},"2.3":{t:"pause",p:`当播放器暂停时触发
|
||||
<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#pause",a:"pause"},"2.4":{t:"play",p:`当播放器播放时触发
|
||||
<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#play",a:"play"},"2.5":{t:"hotkey",p:`当播放器热键被按下时触发
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/event.html#hotkey",a:"hotkey"},"2.6":{t:"destroy",p:`当播放器销毁时触发
|
||||
<div className="run-code">▶ Run Code ...`,l:"advanced/event.html#destroy",a:"destroy"},"2.7":{t:"url",p:`当视频地址变化时触发
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#url",a:"url"},"2.8":{t:"focus",p:`当播放器获得焦点时触发
|
||||
<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#focus",a:"focus"},"2.9":{t:"blur",p:`当播放器失去焦点时触发
|
||||
<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#blur",a:"blur"},"2.10":{t:"dblclick",p:`当播放器被双击时触发
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#dblclick",a:"dblclick"},"2.11":{t:"click",p:`当播放器被单击时触发
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#click",a:"click"},"2.12":{t:"error",p:`当播放器加载视频发生错误时触发
|
||||
<div className="run-code">▶ Ru ...`,l:"advanced/event.html#error",a:"error"},"2.13":{t:"hover",p:`当播放器被鼠标移出或者移入时触发
|
||||
<div className="run-code">▶ R ...`,l:"advanced/event.html#hover",a:"hover"},"2.14":{t:"mousemove",p:`当播放器被鼠标经过时触发
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/event.html#mousemove",a:"mousemove"},"2.15":{t:"resize",p:`当播放器尺寸变化时触发
|
||||
<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#resize",a:"resize"},"2.16":{t:"view",p:`当播放器出现在视口时触发
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/event.html#view",a:"view"},"2.17":{t:"aspectratio",p:`当播放器长宽比变化时触发
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/event.html#aspectratio",a:"aspectratio"},"2.18":{t:"autoheight",p:`当播放器自动设置高度时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#autoheight",a:"autoheight"},"2.19":{t:"autosize",p:`当播放器自动设置尺寸时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#autosize",a:"autosize"},"2.20":{t:"flip",p:`当播放器发生翻转时触发
|
||||
<div className="run-code">▶ Run Co ...`,l:"advanced/event.html#flip",a:"flip"},"2.21":{t:"fullscreen",p:`当播放器发生窗口全屏时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreen",a:"fullscreen"},"2.22":{t:"fullscreenweb",p:`当播放器发生网页全屏时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#fullscreenweb",a:"fullscreenweb"},"2.23":{t:"mini",p:`当播放器进入迷你模式时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#mini",a:"mini"},"2.24":{t:"pip",p:`当播放器进入画中画时触发
|
||||
<div className="run-code">▶ Run C ...`,l:"advanced/event.html#pip",a:"pip"},"2.25":{t:"screenshot",p:`当播放器被截图时触发
|
||||
<div className="run-code">▶ Run Cod ...`,l:"advanced/event.html#screenshot",a:"screenshot"},"2.26":{t:"seek",p:`当播放器发生时间跳转时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#seek",a:"seek"},"2.27":{t:"subtitleoffset",p:`当播放器发生字幕偏移时触发
|
||||
<div className="run-code">▶ Run ...`,l:"advanced/event.html#subtitleoffset",a:"subtitleoffset"},"2.28":{t:"subtitleupdate",p:`当字幕更新时触发
|
||||
<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleupdate",a:"subtitleupdate"},"2.29":{t:"subtitleload",p:`当字幕加载时触发
|
||||
<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleload",a:"subtitleload"},"2.30":{t:"subtitleswitch",p:`当字幕切换时触发
|
||||
<div className="run-code">▶ Run Code& ...`,l:"advanced/event.html#subtitleswitch",a:"subtitleswitch"},"2.31":{t:"video-canplay",p:`浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容
|
||||
`,l:"advanced/event.html#video-canplay",a:"video-canplay"},"2.32":{t:"video-canplaythrough",p:`浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束
|
||||
`,l:"advanced/event.html#video-canplaythrough",a:"video-canplaythrough"},"2.33":{t:"video-complete",p:`OfflineAudioContext 渲染完成
|
||||
`,l:"advanced/event.html#video-complete",a:"video-complete"},"2.34":{t:"video-durationchange",p:`duration 属性的值改变时触发
|
||||
`,l:"advanced/event.html#video-durationchange",a:"video-durationchange"},"2.35":{t:"video-emptied",p:"媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载 ...",l:"advanced/event.html#video-emptied",a:"video-emptied"},"2.36":{t:"video-ended",p:`视频停止播放,因为 media 已经到达结束点
|
||||
`,l:"advanced/event.html#video-ended",a:"video-ended"},"2.37":{t:"video-error",p:`获取媒体数据时出错,或者资源类型不是受支持的媒体格式
|
||||
`,l:"advanced/event.html#video-error",a:"video-error"},"2.38":{t:"video-loadeddata",p:`media 中的首帧已经完成加载
|
||||
`,l:"advanced/event.html#video-loadeddata",a:"video-loadeddata"},"2.39":{t:"video-loadedmetadata",p:`已加载元数据
|
||||
`,l:"advanced/event.html#video-loadedmetadata",a:"video-loadedmetadata"},"2.40":{t:"video-pause",p:`播放已暂停
|
||||
`,l:"advanced/event.html#video-pause",a:"video-pause"},"2.41":{t:"video-play",p:`播放已开始
|
||||
`,l:"advanced/event.html#video-play",a:"video-play"},"2.42":{t:"video-playing",p:`由于缺乏数据而暂停或延迟后,播放准备开始
|
||||
`,l:"advanced/event.html#video-playing",a:"video-playing"},"2.43":{t:"video-progress",p:`在浏览器加载资源时周期性触发
|
||||
`,l:"advanced/event.html#video-progress",a:"video-progress"},"2.44":{t:"video-ratechange",p:`播放速率发生变化
|
||||
`,l:"advanced/event.html#video-ratechange",a:"video-ratechange"},"2.45":{t:"video-seeked",p:`跳帧(seek)操作完成
|
||||
`,l:"advanced/event.html#video-seeked",a:"video-seeked"},"2.46":{t:"video-seeking",p:`跳帧(seek)操作开始
|
||||
`,l:"advanced/event.html#video-seeking",a:"video-seeking"},"2.47":{t:"video-stalled",p:`用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现
|
||||
`,l:"advanced/event.html#video-stalled",a:"video-stalled"},"2.48":{t:"video-suspend",p:`媒体数据加载已暂停
|
||||
`,l:"advanced/event.html#video-suspend",a:"video-suspend"},"2.49":{t:"video-timeupdate",p:`currentTime 属性指定的时间发生变化
|
||||
`,l:"advanced/event.html#video-timeupdate",a:"video-timeupdate"},"2.50":{t:"video-volumechange",p:`音量发生变化
|
||||
`,l:"advanced/event.html#video-volumechange",a:"video-volumechange"},"2.51":{t:"video-waiting",p:`由于暂时缺少数据,播放已停止
|
||||
`,l:"advanced/event.html#video-waiting",a:"video-waiting"},"3.0":{t:"编写插件",p:`但你已经知道播放器的属性, 方法和事件后,再编写插件是非常简单的事
|
||||
可以在实例化的时候加载插件的函数
|
||||
<div cla ...`,l:"advanced/plugin.html",a:"编写插件"},"4.0":{t:"实例属性",p:`这里的 实例属性 是指挂载在 实例 的 一级属性,比较常用
|
||||
`,l:"advanced/property.html",a:"实例属性"},"4.1":{t:"play",p:`
|
||||
Type: Function
|
||||
|
||||
播放视频
|
||||
<div className="run-code"&g ...`,l:"advanced/property.html#play",a:"play"},"4.2":{t:"pause",p:`
|
||||
Type: Function
|
||||
|
||||
暂停视频
|
||||
<div className="run-code"&g ...`,l:"advanced/property.html#pause",a:"pause"},"4.3":{t:"toggle",p:`
|
||||
Type: Function
|
||||
|
||||
切换视频的播放和暂停
|
||||
<div className="run-code&q ...`,l:"advanced/property.html#toggle",a:"toggle"},"4.4":{t:"destroy",p:`
|
||||
Type: Function
|
||||
Parameter: Boolean
|
||||
|
||||
销毁播放器,接受一个参数表示是否销毁后同时移除播放器 ...`,l:"advanced/property.html#destroy",a:"destroy"},"4.5":{t:"seek",p:`
|
||||
Type: Setter
|
||||
Parameter: Number
|
||||
|
||||
视频时间跳转,单位秒
|
||||
<div className= ...`,l:"advanced/property.html#seek",a:"seek"},"4.6":{t:"forward",p:`
|
||||
Type: Setter
|
||||
Parameter: Number
|
||||
|
||||
视频时间快进,单位秒
|
||||
<div className= ...`,l:"advanced/property.html#forward",a:"forward"},"4.7":{t:"backward",p:`
|
||||
Type: Setter
|
||||
Parameter: Number
|
||||
|
||||
视频时间快退,单位秒
|
||||
<div className= ...`,l:"advanced/property.html#backward",a:"backward"},"4.8":{t:"volume",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Number
|
||||
|
||||
设置和获取视频音量,范围在:[0, 1]
|
||||
& ...`,l:"advanced/property.html#volume",a:"volume"},"4.9":{t:"url",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: String
|
||||
|
||||
设置和获取视频地址
|
||||
<div clas ...`,l:"advanced/property.html#url",a:"url"},"4.10":{t:"switchurl",p:`
|
||||
Type: Function
|
||||
Parameter: String
|
||||
|
||||
设置视频地址,设置时和 url 类似,但会执行一些优化 ...`,l:"advanced/property.html#switchurl",a:"switchurl"},"4.11":{t:"switchquality",p:`
|
||||
Type: Function
|
||||
Parameter: String
|
||||
|
||||
设置视频画质地址,和 switchUrl 类似,但会带 ...`,l:"advanced/property.html#switchquality",a:"switchquality"},"4.12":{t:"muted",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Boolean
|
||||
|
||||
设置和获取视频是否静音
|
||||
<div c ...`,l:"advanced/property.html#muted",a:"muted"},"4.13":{t:"currenttime",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Number
|
||||
|
||||
设置和获取视频当前时间,设置时间时和 see ...`,l:"advanced/property.html#currenttime",a:"currenttime"},"4.14":{t:"duration",p:`
|
||||
Type: Getter
|
||||
|
||||
获取视频时长
|
||||
<div className="run-code"&g ...`,l:"advanced/property.html#duration",a:"duration"},"4.15":{t:"screenshot",p:`
|
||||
Type: Function
|
||||
|
||||
下载当前视频帧的截图
|
||||
<div className="run-code&q ...`,l:"advanced/property.html#screenshot",a:"screenshot"},"4.16":{t:"getdataurl",p:`
|
||||
Type: Function
|
||||
|
||||
获取当前视频帧的截图的base64地址,返回的是一个 Promise
|
||||
<div cl ...`,l:"advanced/property.html#getdataurl",a:"getdataurl"},"4.17":{t:"getbloburl",p:`
|
||||
Type: Function
|
||||
|
||||
获取当前视频帧的截图的blob地址,返回的是一个 Promise
|
||||
<div clas ...`,l:"advanced/property.html#getbloburl",a:"getbloburl"},"4.18":{t:"fullscreen",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Boolean
|
||||
|
||||
设置和获取播放器窗口全屏
|
||||
<div ...`,l:"advanced/property.html#fullscreen",a:"fullscreen"},"4.19":{t:"fullscreenweb",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Boolean
|
||||
|
||||
设置和获取播放器网页全屏
|
||||
<div ...`,l:"advanced/property.html#fullscreenweb",a:"fullscreenweb"},"4.20":{t:"pip",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Boolean
|
||||
|
||||
设置和获取播放器画中画模式
|
||||
<div ...`,l:"advanced/property.html#pip",a:"pip"},"4.21":{t:"poster",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: String
|
||||
|
||||
设置和获取视频海报,只有在视频播放前才能看到 ...`,l:"advanced/property.html#poster",a:"poster"},"4.22":{t:"mini",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Boolean
|
||||
|
||||
设置和获取播放器迷你模式
|
||||
<div ...`,l:"advanced/property.html#mini",a:"mini"},"4.23":{t:"playing",p:`
|
||||
Type: Getter
|
||||
Parameter: Boolean
|
||||
|
||||
获取视频是否正在播放中
|
||||
<div classNam ...`,l:"advanced/property.html#playing",a:"playing"},"4.24":{t:"autosize",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Boolean
|
||||
|
||||
设置视频是否自适应尺寸,设置为 true ...`,l:"advanced/property.html#autosize",a:"autosize"},"4.25":{t:"rect",p:`
|
||||
Type: Getter
|
||||
|
||||
获取播放器的尺寸和坐标信息
|
||||
<div className="run-code& ...`,l:"advanced/property.html#rect",a:"rect"},"4.26":{t:"flip",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: String
|
||||
|
||||
设置和获取播放器翻转,支持normal, ...`,l:"advanced/property.html#flip",a:"flip"},"4.27":{t:"playbackrate",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Number
|
||||
|
||||
设置和获取播放器播放速度
|
||||
<div c ...`,l:"advanced/property.html#playbackrate",a:"playbackrate"},"4.28":{t:"aspectratio",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: String
|
||||
|
||||
设置和获取播放器长宽比
|
||||
<div cl ...`,l:"advanced/property.html#aspectratio",a:"aspectratio"},"4.29":{t:"loop",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Array
|
||||
|
||||
设置和获取区间循序播放,单位秒
|
||||
<div ...`,l:"advanced/property.html#loop",a:"loop"},"4.30":{t:"autoheight",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: Boolean
|
||||
|
||||
当容器只有宽度,该属性可以自动计算出并设置 ...`,l:"advanced/property.html#autoheight",a:"autoheight"},"4.31":{t:"attr",p:`
|
||||
Type: Function
|
||||
Parameter: String
|
||||
|
||||
动态获取和设置 video 元素的属性
|
||||
<div ...`,l:"advanced/property.html#attr",a:"attr"},"4.32":{t:"title",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: String
|
||||
|
||||
动态获取和设置播放器标题
|
||||
<div c ...`,l:"advanced/property.html#title",a:"title"},"4.33":{t:"type",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: String
|
||||
|
||||
动态获取和设置视频类型
|
||||
<div cl ...`,l:"advanced/property.html#type",a:"type"},"4.34":{t:"theme",p:`
|
||||
Type: Setter/Getter
|
||||
Parameter: String
|
||||
|
||||
动态获取和设置播放器主题颜色
|
||||
<div ...`,l:"advanced/property.html#theme",a:"theme"},"4.35":{t:"airplay",p:`
|
||||
Type: Function
|
||||
|
||||
开启隔空播放
|
||||
<div className="run-code" ...`,l:"advanced/property.html#airplay",a:"airplay"},"4.36":{t:"loaded",p:`
|
||||
Type: Getter
|
||||
|
||||
视频缓存的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用
|
||||
&l ...`,l:"advanced/property.html#loaded",a:"loaded"},"4.37":{t:"played",p:`
|
||||
Type: Getter
|
||||
|
||||
视频播放的比例,范围是 [0, 1],常配合 video:timeupdate 事件使用
|
||||
&l ...`,l:"advanced/property.html#played",a:"played"},"4.38":{t:"proxy",p:`
|
||||
Type: Function
|
||||
|
||||
DOM 事件的代理函数,实质上代理了 addEventListener 和 removeE ...`,l:"advanced/property.html#proxy",a:"proxy"},"4.39":{t:"query",p:`
|
||||
Type: Function
|
||||
|
||||
DOM 的查询函数,类似 document.querySelector,但被查询的对象局限 ...`,l:"advanced/property.html#query",a:"query"},"4.40":{t:"video",p:`
|
||||
Type: Element
|
||||
|
||||
快捷返回播放器的 video 元素
|
||||
<div className="run- ...`,l:"advanced/property.html#video",a:"video"},"5.0":{t:"wip",p:"",l:"en/index.html",a:"wip"},"6.0":{t:"安装使用",p:"",l:"index.html",a:"安装使用"},"6.1":{t:"安装",p:`::: code-group
|
||||
npm install artplayer
|
||||
|
||||
yarn add artplayer
|
||||
|
||||
pnpm ...`,l:"index.html#安装",a:"安装"},"6.2":{t:"cdn",p:`::: code-group
|
||||
https://cdn.jsdelivr.net/npm/artplayer/dist/art ...`,l:"index.html#cdn",a:"cdn"},"6.3":{t:"使用",p:`::: code-group
|
||||
import Artplayer from 'artplayer';
|
||||
|
||||
const art = ...`,l:"index.html#使用",a:"使用"},"6.4":{t:"vue-js",p:`::: code-group
|
||||
<template>
|
||||
<div ref="artRef&quo ...`,l:"index.html#vue-js",a:"vue-js"},"6.5":{t:"react-js",p:`::: code-group
|
||||
import { useEffect, useRef } from 'react';
|
||||
impo ...`,l:"index.html#react-js",a:"react-js"},"6.6":{t:"语法提示",p:`有时你的 js 文件会丢失 TypeScript 的类型提示,这时候你可以手动导入类型
|
||||
变量:
|
||||
/**
|
||||
* @type { ...`,l:"index.html#语法提示",a:"语法提示"},"7.0":{t:"dash-js",p:`👉 https://github.com/Dash-Industry-Forum/dash.js
|
||||
<div clas ...`,l:"library/dash.html",a:"dash-js"},"8.0":{t:"flv-js",p:`👉 https://github.com/Bilibili/flv.js
|
||||
<div className=" ...`,l:"library/flv.html",a:"flv-js"},"9.0":{t:"hls-js",p:`👉 https://github.com/video-dev/hls.js
|
||||
<div className=" ...`,l:"library/hls.html",a:"hls-js"},"10.0":{t:"视频广告",p:"",l:"plugin/ads.html",a:"视频广告"},"10.1":{t:"演示",p:`👉 查看完整演示
|
||||
`,l:"plugin/ads.html#演示",a:"演示"},"10.2":{t:"安装",p:`::: code-group
|
||||
npm install artplayer-plugin-ads
|
||||
|
||||
yarn add artp ...`,l:"plugin/ads.html#安装",a:"安装"},"10.3":{t:"cdn",p:`::: code-group
|
||||
https://cdn.jsdelivr.net/npm/artplayer-plugin-a ...`,l:"plugin/ads.html#cdn",a:"cdn"},"10.4":{t:"使用",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/ads.html#使用",a:"使用"},"11.0":{t:"控制器皮肤",p:"",l:"plugin/control-ui.html",a:"控制器皮肤"},"11.1":{t:"演示",p:`👉 查看完整演示
|
||||
`,l:"plugin/control-ui.html#演示",a:"演示"},"11.2":{t:"安装",p:`::: code-group
|
||||
npm install artplayer-plugin-control
|
||||
|
||||
yarn add ...`,l:"plugin/control-ui.html#安装",a:"安装"},"11.3":{t:"cdn",p:`::: code-group
|
||||
https://cdn.jsdelivr.net/npm/artplayer-plugin-c ...`,l:"plugin/control-ui.html#cdn",a:"cdn"},"11.4":{t:"使用",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/control-ui.html#使用",a:"使用"},"11.5":{t:"enable",p:`
|
||||
Type: Getter/Setter
|
||||
Parameter: Boolean
|
||||
|
||||
是否启用新的控制器皮肤
|
||||
<div c ...`,l:"plugin/control-ui.html#enable",a:"enable"},"12.0":{t:"弹幕库",p:"",l:"plugin/danmuku.html",a:"弹幕库"},"12.1":{t:"演示",p:`👉 查看完整演示
|
||||
`,l:"plugin/danmuku.html#演示",a:"演示"},"12.2":{t:"安装",p:`::: code-group
|
||||
npm install artplayer-plugin-danmuku
|
||||
|
||||
yarn add ...`,l:"plugin/danmuku.html#安装",a:"安装"},"12.3":{t:"cdn",p:`::: code-group
|
||||
https://cdn.jsdelivr.net/npm/artplayer-plugin-d ...`,l:"plugin/danmuku.html#cdn",a:"cdn"},"12.4":{t:"选项",p:`{
|
||||
danmuku: [], // 弹幕库,支持数组, xml 地址, Promise返回数组
|
||||
speed: ...`,l:"plugin/danmuku.html#选项",a:"选项"},"12.5":{t:"使用弹幕数组",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用弹幕数组",a:"使用弹幕数组"},"12.6":{t:"使用弹幕-xml",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用弹幕-xml",a:"使用弹幕-xml"},"12.7":{t:"使用异步调用",p:"<div className="run-code" data-libs="./uncom ...",l:"plugin/danmuku.html#使用异步调用",a:"使用异步调用"},"12.8":{t:"hide-show",p:`通过方法 hide 和 show 进行隐藏或者显示弹幕
|
||||
<div className="run-code&q ...`,l:"plugin/danmuku.html#hide-show",a:"hide-show"},"12.9":{t:"ishide",p:`通过属性 isHide 判断当前弹幕是隐藏或者显示
|
||||
<div className="run-code&quo ...`,l:"plugin/danmuku.html#ishide",a:"ishide"},"12.10":{t:"emit",p:`通过方法 emit 发送一条实时弹幕
|
||||
<div className="run-code" data ...`,l:"plugin/danmuku.html#emit",a:"emit"},"12.11":{t:"config",p:`通过方法 config 实时改变弹幕配置,支持属性有:
|
||||
|
||||
danmuku
|
||||
speed
|
||||
opacity
|
||||
fontSize
|
||||
co ...`,l:"plugin/danmuku.html#config",a:"config"},"12.12":{t:"load",p:`通过 load 方法可以重载弹幕源,或者切换新弹幕
|
||||
<div className="run-code&quo ...`,l:"plugin/danmuku.html#load",a:"load"},"12.13":{t:"reset",p:`用于清空当前显示的弹幕
|
||||
<div className="run-code" data-libs=& ...`,l:"plugin/danmuku.html#reset",a:"reset"},"12.14":{t:"option",p:`用于获取当前弹幕配置
|
||||
<div className="run-code" data-libs=&q ...`,l:"plugin/danmuku.html#option",a:"option"},"12.15":{t:"事件",p:`var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
...`,l:"plugin/danmuku.html#事件",a:"事件"},"13.0":{t:"hls-画质",p:"",l:"plugin/hls-quality.html",a:"hls-画质"},"13.1":{t:"演示",p:`👉 查看完整演示
|
||||
`,l:"plugin/hls-quality.html#演示",a:"演示"},"13.2":{t:"安装",p:`::: code-group
|
||||
npm install artplayer-plugin-hls-quality
|
||||
|
||||
yarn ...`,l:"plugin/hls-quality.html#安装",a:"安装"},"13.3":{t:"cdn",p:`::: code-group
|
||||
https://cdn.jsdelivr.net/npm/artplayer-plugin-h ...`,l:"plugin/hls-quality.html#cdn",a:"cdn"},"14.0":{t:"iframe-控制",p:"",l:"plugin/iframe.html",a:"iframe-控制"},"14.1":{t:"说明",p:"通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.htm ...",l:"plugin/iframe.html#说明",a:"说明"},"14.2":{t:"演示",p:`👉 查看完整演示
|
||||
`,l:"plugin/iframe.html#演示",a:"演示"},"14.3":{t:"安装",p:`::: code-group
|
||||
npm install artplayer-plugin-iframe
|
||||
|
||||
yarn add a ...`,l:"plugin/iframe.html#安装",a:"安装"},"14.4":{t:"cdn",p:`::: code-group
|
||||
https://cdn.jsdelivr.net/npm/artplayer-plugin-i ...`,l:"plugin/iframe.html#cdn",a:"cdn"},"14.5":{t:"使用",p:`::: code-group
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head ...`,l:"plugin/iframe.html#使用",a:"使用"},"14.6":{t:"实例接口",p:`commit
|
||||
将消息推送到 iframe,该函数将在 iframe 内部运行
|
||||
iframe.commit(() => ...`,l:"plugin/iframe.html#实例接口",a:"实例接口"},"14.7":{t:"iframe-接口",p:`:::warning 提示
|
||||
Iframe 接口 只能运行在 iframe 里
|
||||
:::
|
||||
inject
|
||||
注入脚本,接收来自实例的 ...`,l:"plugin/iframe.html#iframe-接口",a:"iframe-接口"},"15.0":{t:"组件配置",p:`这里所说的组件配置主要是指:layers , controls , contextmenu 这三个共用的配置:
|
||||
|
||||
|
||||
|
||||
属性
|
||||
...`,l:"start/component.html",a:"组件配置"},"15.1":{t:"layers",p:`实例化时添加一个层,例如可以添加 logo 或者 广告 等等
|
||||
<div className="run-cod ...`,l:"start/component.html#layers",a:"layers"},"15.2":{t:"controls",p:`实例化时添加一个控制器
|
||||
:::warning controls 还有三个额外的选项
|
||||
|
||||
position: left 和 ri ...`,l:"start/component.html#controls",a:"controls"},"15.3":{t:"contextmenu",p:`实例化时添加一个右键菜单
|
||||
<div className="run-code">▶ Run C ...`,l:"start/component.html#contextmenu",a:"contextmenu"},"16.0":{t:"基础选项",p:"",l:"start/option.html",a:"基础选项"},"16.1":{t:"container",p:`
|
||||
Type: String, Element
|
||||
Default: #artplayer
|
||||
|
||||
播放器挂载的 DOM 容器
|
||||
< ...`,l:"start/option.html#container",a:"container"},"16.2":{t:"url",p:`
|
||||
Type: String
|
||||
Default: ''
|
||||
|
||||
视频源地址
|
||||
<div className="run-c ...`,l:"start/option.html#url",a:"url"},"16.3":{t:"id",p:`
|
||||
Type: String
|
||||
Default: ''
|
||||
|
||||
播放器的唯一标识,目前只用于记忆播放 autoplayback
|
||||
< ...`,l:"start/option.html#id",a:"id"},"16.4":{t:"onready",p:`
|
||||
Type: Function
|
||||
Default: undefined
|
||||
|
||||
构造函数接受一个函数作为第二个参数,播放器初始化成功 ...`,l:"start/option.html#onready",a:"onready"},"16.5":{t:"poster",p:`
|
||||
Type: String
|
||||
Default: ''
|
||||
|
||||
视频的海报,只会出现在播放器初始化且未播放的状态下
|
||||
<div c ...`,l:"start/option.html#poster",a:"poster"},"16.6":{t:"title",p:`
|
||||
Type: String
|
||||
Default: ''
|
||||
|
||||
视频标题,目前会出现在 视频截图 和 迷你模式 下
|
||||
<div c ...`,l:"start/option.html#title",a:"title"},"16.7":{t:"theme",p:`
|
||||
Type: String
|
||||
Default: #f00
|
||||
|
||||
播放器主题颜色,目前作用于 进度条 和 高亮元素 上
|
||||
<di ...`,l:"start/option.html#theme",a:"theme"},"16.8":{t:"volume",p:`
|
||||
Type: Number
|
||||
Default: 0.7
|
||||
|
||||
播放器的默认音量
|
||||
<div className="r ...`,l:"start/option.html#volume",a:"volume"},"16.9":{t:"islive",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
使用直播模式,会隐藏进度条和播放时间
|
||||
<div clas ...`,l:"start/option.html#islive",a:"islive"},"16.10":{t:"muted",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否默认静音
|
||||
<div className=" ...`,l:"start/option.html#muted",a:"muted"},"16.11":{t:"autoplay",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否自动播放
|
||||
<div className=" ...`,l:"start/option.html#autoplay",a:"autoplay"},"16.12":{t:"autosize",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
播放器的尺寸默认会填充整个 container 容器尺寸,所以 ...`,l:"start/option.html#autosize",a:"autosize"},"16.13":{t:"automini",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
当播放器滚动到浏览器视口以外时,自动进入 迷你播放 模式
|
||||
&l ...`,l:"start/option.html#automini",a:"automini"},"16.14":{t:"loop",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否循环播放
|
||||
<div className=" ...`,l:"start/option.html#loop",a:"loop"},"16.15":{t:"flip",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否显示视频翻转功能,目前只出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#flip",a:"flip"},"16.16":{t:"playbackrate",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否显示视频播放速度功能,会出现在 设置面板 和 右键菜单 里 ...`,l:"start/option.html#playbackrate",a:"playbackrate"},"16.17":{t:"aspectratio",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否显示视频长宽比功能,会出现在 设置面板 和 右键菜单 里
|
||||
...`,l:"start/option.html#aspectratio",a:"aspectratio"},"16.18":{t:"screenshot",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在底部控制栏里显示 视频截图 功能
|
||||
<div cla ...`,l:"start/option.html#screenshot",a:"screenshot"},"16.19":{t:"setting",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在底部控制栏里显示 设置面板 的开关按钮
|
||||
<div ...`,l:"start/option.html#setting",a:"setting"},"16.20":{t:"hotkey",p:`
|
||||
Type: Boolean
|
||||
Default: true
|
||||
|
||||
是否使用快捷键
|
||||
<div className=" ...`,l:"start/option.html#hotkey",a:"hotkey"},"16.21":{t:"pip",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在底部控制栏里显示 画中画 的开关按钮
|
||||
<div c ...`,l:"start/option.html#pip",a:"pip"},"16.22":{t:"mutex",p:`
|
||||
Type: Boolean
|
||||
Default: true
|
||||
|
||||
假如页面里同时存在多个播放器,是否只能让一个播放器播放
|
||||
< ...`,l:"start/option.html#mutex",a:"mutex"},"16.23":{t:"fullscreen",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在底部控制栏里显示播放器 窗口全屏 按钮
|
||||
<div ...`,l:"start/option.html#fullscreen",a:"fullscreen"},"16.24":{t:"fullscreenweb",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在底部控制栏里显示播放器 网页全屏 按钮
|
||||
<div ...`,l:"start/option.html#fullscreenweb",a:"fullscreenweb"},"16.25":{t:"subtitleoffset",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
字幕时间偏移,范围在 [-5s, 5s],出现在 设置面板 里 ...`,l:"start/option.html#subtitleoffset",a:"subtitleoffset"},"16.26":{t:"miniprogressbar",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
迷你进度条,只在播放器失去焦点后且正在播放时出现
|
||||
<di ...`,l:"start/option.html#miniprogressbar",a:"miniprogressbar"},"16.27":{t:"usessr",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否使用 SSR 挂载模式,假如你希望在播放器挂载前,就提前渲 ...`,l:"start/option.html#usessr",a:"usessr"},"16.28":{t:"playsinline",p:`
|
||||
Type: Boolean
|
||||
Default: true
|
||||
|
||||
在移动端是否使用 playsInline 模式
|
||||
<div ...`,l:"start/option.html#playsinline",a:"playsinline"},"16.29":{t:"layers",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
初始化自定义的 层
|
||||
<div className="ru ...`,l:"start/option.html#layers",a:"layers"},"16.30":{t:"settings",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
初始化自定义的 设置面板
|
||||
<div className=" ...`,l:"start/option.html#settings",a:"settings"},"16.31":{t:"contextmenu",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
初始化自定义的 右键菜单
|
||||
<div className=" ...`,l:"start/option.html#contextmenu",a:"contextmenu"},"16.32":{t:"controls",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
初始化自定义的底部 控制栏
|
||||
<div className=&quo ...`,l:"start/option.html#controls",a:"controls"},"16.33":{t:"quality",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
是否在底部控制栏里显示 画质选择 列表
|
||||
|
||||
|
||||
|
||||
属性
|
||||
类型
|
||||
描述
|
||||
|
||||
|
||||
|
||||
|
||||
...`,l:"start/option.html#quality",a:"quality"},"16.34":{t:"highlight",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
在进度条上显示 高亮信息
|
||||
|
||||
|
||||
|
||||
属性
|
||||
类型
|
||||
描述
|
||||
|
||||
|
||||
|
||||
|
||||
time
|
||||
Nu ...`,l:"start/option.html#highlight",a:"highlight"},"16.35":{t:"plugins",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
初始化自定义的 插件
|
||||
<div className="r ...`,l:"start/option.html#plugins",a:"plugins"},"16.36":{t:"whitelist",p:`
|
||||
Type: Array
|
||||
Default: []
|
||||
|
||||
因为不同的移动设备存在多种差异和限制,有时候你希望在某些移动设备上不使用 ...`,l:"start/option.html#whitelist",a:"whitelist"},"16.37":{t:"thumbnails",p:`
|
||||
Type: Object
|
||||
Default: {}
|
||||
|
||||
在进度条上设置 预览图
|
||||
|
||||
|
||||
|
||||
属性
|
||||
类型
|
||||
描述
|
||||
|
||||
|
||||
|
||||
|
||||
url
|
||||
Str ...`,l:"start/option.html#thumbnails",a:"thumbnails"},"16.38":{t:"subtitle",p:`
|
||||
Type: Object
|
||||
Default: {}
|
||||
|
||||
设置视频的字幕,支持字幕格式:vtt, srt, ass
|
||||
|
||||
|
||||
|
||||
属性
|
||||
...`,l:"start/option.html#subtitle",a:"subtitle"},"16.39":{t:"morevideoattr",p:`
|
||||
Type: Object
|
||||
Default: {'controls': false,'preload': 'metadata ...`,l:"start/option.html#morevideoattr",a:"morevideoattr"},"16.40":{t:"icons",p:`
|
||||
Type: Object
|
||||
Default: {}
|
||||
|
||||
用于替换默认图标,支持 Html 字符串和 HTMLElement
|
||||
& ...`,l:"start/option.html#icons",a:"icons"},"16.41":{t:"type",p:`
|
||||
Type: String
|
||||
Default: ''
|
||||
|
||||
用于指明视频的格式,需要配合 customType 一起使用,默认视频 ...`,l:"start/option.html#type",a:"type"},"16.42":{t:"customtype",p:`
|
||||
Type: Object
|
||||
Default: {}
|
||||
|
||||
通过视频的 type 进行匹配,把视频解码权交给第三方程序进行处理,处 ...`,l:"start/option.html#customtype",a:"customtype"},"16.43":{t:"lang",p:`
|
||||
Type: String
|
||||
Default: navigator.language.toLowerCase()
|
||||
|
||||
默认显示语 ...`,l:"start/option.html#lang",a:"lang"},"16.44":{t:"i18n",p:`
|
||||
Type: Object
|
||||
Default: {}
|
||||
|
||||
自定义 i18n 配置,该配置会和自带的 i18n 进行深度合并
|
||||
新增 ...`,l:"start/option.html#i18n",a:"i18n"},"16.45":{t:"lock",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在移动端显示一个 锁定按钮 ,用于隐藏底部 控制栏
|
||||
< ...`,l:"start/option.html#lock",a:"lock"},"16.46":{t:"fastforward",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在移动端添加长按视频快进功能
|
||||
<div classN ...`,l:"start/option.html#fastforward",a:"fastforward"},"16.47":{t:"autoplayback",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否使用自动 回放功能
|
||||
<div className=& ...`,l:"start/option.html#autoplayback",a:"autoplayback"},"16.48":{t:"autoorientation",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否在移动端的网页全屏时,根据视频尺寸和视口尺寸,旋转播放器
|
||||
...`,l:"start/option.html#autoorientation",a:"autoorientation"},"16.49":{t:"airplay",p:`
|
||||
Type: Boolean
|
||||
Default: false
|
||||
|
||||
是否显示 airplay 按钮,当前只有部分浏览器支持该功能
|
||||
...`,l:"start/option.html#airplay",a:"airplay"},"17.0":{t:"设置面板",p:"需先打开设置面板,播放器默认自带四个设置项:flip, playbackRate, aspectRatio, subtitl ...",l:"start/setting.html",a:"设置面板"},"17.1":{t:"选择列表",p:`
|
||||
|
||||
|
||||
属性
|
||||
类型
|
||||
描述
|
||||
|
||||
|
||||
|
||||
|
||||
html
|
||||
String, Element
|
||||
元素的 DOM 元素
|
||||
|
||||
|
||||
icon
|
||||
String, ...`,l:"start/setting.html#选择列表",a:"选择列表"},"17.2":{t:"列表嵌套",p:"<div className="run-code">▶ Run Code</div&g ...",l:"start/setting.html#列表嵌套",a:"列表嵌套"},"17.3":{t:"切换按钮",p:`
|
||||
|
||||
|
||||
属性
|
||||
类型
|
||||
描述
|
||||
|
||||
|
||||
|
||||
|
||||
html
|
||||
String, Element
|
||||
元素的 DOM 元素
|
||||
|
||||
|
||||
icon
|
||||
String, ...`,l:"start/setting.html#切换按钮",a:"切换按钮"},"17.4":{t:"范围滑块",p:`
|
||||
|
||||
|
||||
属性
|
||||
类型
|
||||
描述
|
||||
|
||||
|
||||
|
||||
|
||||
html
|
||||
String, Element
|
||||
元素的 DOM 元素
|
||||
|
||||
|
||||
icon
|
||||
String, ...`,l:"start/setting.html#范围滑块",a:"范围滑块"}},a={previewLength:62,buttonLabel:"Search",placeholder:"Search docs"},n={INDEX_DATA:t,PREVIEW_LOOKUP:e,Options:a};export{n as default};
|
||||
Reference in new issue
Block a user