@aigamo/nostalgic-diva
Version:
React function components for imperatively controlling embedded players (audio, Niconico, SoundCloud and YouTube) using refs.
37 lines (36 loc) • 963 B
JavaScript
import r, { memo as c, useCallback as i } from "react";
import { L as n, N as s } from "./index-DzXJDFxB.js";
import { P as m } from "./PlayerContainer-BSDtKMGl.js";
const u = c(({ ...o }) => {
const { logger: t } = o;
t.log(n.Debug, "NiconicoPlayer");
const l = i(
(e) => Promise.resolve(e),
[]
);
return /* @__PURE__ */ r.createElement(
m,
{
...o,
loadScript: void 0,
playerFactory: l,
controllerFactory: s
},
(e, a) => /* @__PURE__ */ r.createElement("div", { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ r.createElement(
"iframe",
{
ref: e,
src: `https://embed.nicovideo.jp/watch/${a}?jsapi=1&playerId=1`,
width: "100%",
height: "100%",
allowFullScreen: !0,
style: { border: "none" },
allow: "autoplay; fullscreen"
}
))
);
});
export {
u as default
};
//# sourceMappingURL=NiconicoPlayer-DzGP2JQH.js.map