mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
artplayer@4.3.20
This commit is contained in:
1 parent
f74a2633b3
commit
d73e1efaf1
5 files changed
+34
-29
No files matched your search
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer.js v4.3.19
|
||||
* artplayer.js v4.3.20
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({E13ST:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),M=o.interopDefault(k),S=e("./contextmenu"),I=o.interopDefault(S),F=e("./info"),$=o.interopDefault(F),T=e("./subtitle"),E=o.interopDefault(T),C=e("./events"),z=o.interopDefault(C),Y=e("./hotkey"),D=o.interopDefault(Y),P=e("./layer"),R=o.interopDefault(P),A=e("./loading"),O=o.interopDefault(A),L=e("./notice"),H=o.interopDefault(L),_=e("./mask"),N=o.interopDefault(_),J=e("./icons"),V=o.interopDefault(J),q=e("./setting"),W=o.interopDefault(q),B=e("./storage"),U=o.interopDefault(B),Z=e("./plugins"),X=o.interopDefault(Z),G=e("./ads"),Q=o.interopDefault(G),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=s.default(r,d.default),this.isReady=!1,this.isFocus=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new v.default(this),this.events=new z.default(this),this.whitelist.state?(this.storage=new U.default(this),this.icons=new V.default(this),this.i18n=new x.default(this),this.notice=new H.default(this),this.player=new j.default(this),this.layers=new R.default(this),this.controls=new M.default(this),this.contextmenu=new I.default(this),this.subtitle=new E.default(this),this.ads=new Q.default(this),this.info=new $.default(this),this.loading=new O.default(this),this.hotkey=new D.default(this),this.mask=new N.default(this),this.setting=new W.default(this),this.plugins=new X.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.19"}static get env(){return"production"}static get build(){return"1651653373943"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oeLine truncated
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({E13ST:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),M=o.interopDefault(k),S=e("./contextmenu"),I=o.interopDefault(S),F=e("./info"),$=o.interopDefault(F),T=e("./subtitle"),E=o.interopDefault(T),C=e("./events"),z=o.interopDefault(C),Y=e("./hotkey"),D=o.interopDefault(Y),P=e("./layer"),R=o.interopDefault(P),A=e("./loading"),O=o.interopDefault(A),L=e("./notice"),H=o.interopDefault(L),_=e("./mask"),N=o.interopDefault(_),J=e("./icons"),V=o.interopDefault(J),q=e("./setting"),W=o.interopDefault(q),B=e("./storage"),U=o.interopDefault(B),Z=e("./plugins"),X=o.interopDefault(Z),G=e("./ads"),Q=o.interopDefault(G),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=s.default(r,d.default),this.isReady=!1,this.isFocus=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new v.default(this),this.events=new z.default(this),this.whitelist.state?(this.storage=new U.default(this),this.icons=new V.default(this),this.i18n=new x.default(this),this.notice=new H.default(this),this.player=new j.default(this),this.layers=new R.default(this),this.controls=new M.default(this),this.contextmenu=new I.default(this),this.subtitle=new E.default(this),this.ads=new Q.default(this),this.info=new $.default(this),this.loading=new O.default(this),this.hotkey=new D.default(this),this.mask=new N.default(this),this.setting=new W.default(this),this.plugins=new X.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.20"}static get env(){return"production"}static get build(){return"1651763553282"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oeLine truncated
|
||||
@@ -1,25 +1,28 @@
|
||||
import { useEffect, useRef } from "react";
|
||||
import Artplayer from "artplayer";
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import Artplayer from 'artplayer';
|
||||
|
||||
export default function ArtplayerReact({ option, getInstance, ...rest }) {
|
||||
const artRef = useRef();
|
||||
export default function Player({ option, getInstance, ...rest }) {
|
||||
const artRef = useRef();
|
||||
|
||||
useEffect(() => {
|
||||
const art = new Artplayer({
|
||||
...option,
|
||||
container: artRef.current,
|
||||
useEffect(() => {
|
||||
const art = new Artplayer({
|
||||
...option,
|
||||
container: artRef.current,
|
||||
});
|
||||
|
||||
if (getInstance && typeof getInstance === 'function') {
|
||||
getInstance(art);
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (art && art.destroy) {
|
||||
art.destroy(false);
|
||||
}
|
||||
};
|
||||
}, [option, getInstance]);
|
||||
|
||||
return React.createElement('div', {
|
||||
ref: artRef,
|
||||
...rest,
|
||||
});
|
||||
|
||||
if (getInstance && typeof getInstance === "function") {
|
||||
getInstance(art);
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (art && art.destroy) {
|
||||
art.destroy(false);
|
||||
}
|
||||
};
|
||||
}, [option, getInstance]);
|
||||
|
||||
return <div ref={artRef} {...rest}></div>;
|
||||
}
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* artplayer.js v4.3.19
|
||||
* artplayer.js v4.3.20
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2022 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({E13ST:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),M=o.interopDefault(k),S=e("./contextmenu"),I=o.interopDefault(S),F=e("./info"),$=o.interopDefault(F),T=e("./subtitle"),E=o.interopDefault(T),C=e("./events"),z=o.interopDefault(C),Y=e("./hotkey"),D=o.interopDefault(Y),P=e("./layer"),R=o.interopDefault(P),A=e("./loading"),O=o.interopDefault(A),L=e("./notice"),H=o.interopDefault(L),_=e("./mask"),N=o.interopDefault(_),J=e("./icons"),V=o.interopDefault(J),q=e("./setting"),W=o.interopDefault(q),B=e("./storage"),U=o.interopDefault(B),Z=e("./plugins"),X=o.interopDefault(Z),G=e("./ads"),Q=o.interopDefault(G),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=s.default(r,d.default),this.isReady=!1,this.isFocus=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new v.default(this),this.events=new z.default(this),this.whitelist.state?(this.storage=new U.default(this),this.icons=new V.default(this),this.i18n=new x.default(this),this.notice=new H.default(this),this.player=new j.default(this),this.layers=new R.default(this),this.controls=new M.default(this),this.contextmenu=new I.default(this),this.subtitle=new E.default(this),this.ads=new Q.default(this),this.info=new $.default(this),this.loading=new O.default(this),this.hotkey=new D.default(this),this.mask=new N.default(this),this.setting=new W.default(this),this.plugins=new X.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.19"}static get env(){return"production"}static get build(){return"1651653373943"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oeLine truncated
|
||||
!function(e,t,r,o,i){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof n.parcelRequireb749&&n.parcelRequireb749,s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof n.parcelRequireb749&&n.parcelRequireb749;if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}u.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},u.cache={};var p=s[t]=new c.Module(t);e[t][0].call(p.exports,u,p,p.exports,this)}return s[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n.parcelRequireb749}}),n.parcelRequireb749=c;for(var p=0;p<t.length;p++)c(t[p]);var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}({E13ST:[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),n=o.interopDefault(i),a=e("option-validator"),s=o.interopDefault(a),l=e("./utils/emitter"),c=o.interopDefault(l),p=e("./utils"),u=e("./scheme"),d=o.interopDefault(u),f=e("./config"),h=o.interopDefault(f),m=e("./whitelist"),g=o.interopDefault(m),y=e("./template"),v=o.interopDefault(y),b=e("./i18n"),x=o.interopDefault(b),w=e("./player"),j=o.interopDefault(w),k=e("./control"),M=o.interopDefault(k),S=e("./contextmenu"),I=o.interopDefault(S),F=e("./info"),$=o.interopDefault(F),T=e("./subtitle"),E=o.interopDefault(T),C=e("./events"),z=o.interopDefault(C),Y=e("./hotkey"),D=o.interopDefault(Y),P=e("./layer"),R=o.interopDefault(P),A=e("./loading"),O=o.interopDefault(A),L=e("./notice"),H=o.interopDefault(L),_=e("./mask"),N=o.interopDefault(_),J=e("./icons"),V=o.interopDefault(J),q=e("./setting"),W=o.interopDefault(q),B=e("./storage"),U=o.interopDefault(B),Z=e("./plugins"),X=o.interopDefault(Z),G=e("./ads"),Q=o.interopDefault(G),K=e("./mobile"),ee=o.interopDefault(K);let te=0;const re=[];class oe extends c.default{constructor(e,t){super(),this.id=++te;const r=p.mergeDeep(oe.option,e);this.option=s.default(r,d.default),this.isReady=!1,this.isFocus=!1,this.isDestroy=!1,this.whitelist=new g.default(this),this.template=new v.default(this),this.events=new z.default(this),this.whitelist.state?(this.storage=new U.default(this),this.icons=new V.default(this),this.i18n=new x.default(this),this.notice=new H.default(this),this.player=new j.default(this),this.layers=new R.default(this),this.controls=new M.default(this),this.contextmenu=new I.default(this),this.subtitle=new E.default(this),this.ads=new Q.default(this),this.info=new $.default(this),this.loading=new O.default(this),this.hotkey=new D.default(this),this.mask=new N.default(this),this.setting=new W.default(this),this.plugins=new X.default(this)):this.mobile=new ee.default(this),"function"==typeof t&&this.on("ready",(()=>t.call(this))),re.push(this)}static get instances(){return re}static get version(){return"4.3.20"}static get env(){return"production"}static get build(){return"1651763553282"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return v.default.html}static get option(){return{container:"#artplayer",url:"",poster:"",title:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,ads:[],layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],whitelist:[],thumbnails:{url:"",number:60,column:10},subtitle:{url:"",type:"",style:{},encoding:"utf-8"},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}destroy(e=!0){this.events.destroy(),this.template.destroy(e),re.splice(re.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=oe,oe.NOTICE_TIME=2e3,oe.SETTING_WIDTH=250,oe.SETTING_ITEM_WIDTH=200,oe.SETTING_ITEM_HEIGHT=35,oe.INDICATOR_SIZE=14,oe.INDICATOR_SIZE_ICON=16,oe.INDICATOR_SIZE_MOBILE=18,oe.INDICATOR_SIZE_MOBILE_ICON=20,oe.VOLUME_PANEL_WIDTH=60,oe.VOLUME_HANDLE_WIDTH=12,oe.RESIZE_TIME=500,oeLine truncated
|
||||
@@ -1,8 +1,7 @@
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import Artplayer from 'artplayer';
|
||||
|
||||
export default function ({ option, getInstance, ...rest }) {
|
||||
export default function Player({ option, getInstance, ...rest }) {
|
||||
const artRef = useRef();
|
||||
|
||||
useEffect(() => {
|
||||
@@ -22,5 +21,8 @@ export default function ({ option, getInstance, ...rest }) {
|
||||
};
|
||||
}, [option, getInstance]);
|
||||
|
||||
return <div ref={artRef} {...rest}></div>;
|
||||
return React.createElement('div', {
|
||||
ref: artRef,
|
||||
...rest,
|
||||
});
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"license": "MIT",
|
||||
"name": "artplayer",
|
||||
"version": "4.3.19",
|
||||
"version": "4.3.20",
|
||||
"main": "dist/artplayer.js",
|
||||
"types": "types/artplayer.d.ts",
|
||||
"homepage": "https://artPlayer.org",
|
||||
|
||||
Reference in new issue
Block a user