mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 12:11:20 -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,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,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user