Skip to content

Commit

Permalink
Merge pull request #390 from miaulightouch/type-fix
Browse files Browse the repository at this point in the history
[vue3 component] fix: types hint for bundler
  • Loading branch information
SangwonOh authored Oct 31, 2023
2 parents 5d2149c + fe649fe commit ff652a6
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 139 deletions.
18 changes: 9 additions & 9 deletions packages/vue3/dist/ovenplayer-vue3.es.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { defineComponent as t, ref as v, onMounted as C, onUnmounted as c, onUpdated as g, openBlock as y, createElementBlock as p } from "vue";
import s from "ovenplayer";
const k = /* @__PURE__ */ t({
import { defineComponent as h, ref as v, onMounted as i, onUnmounted as c, onUpdated as C, openBlock as g, createElementBlock as m } from "vue";
import y from "ovenplayer";
const k = /* @__PURE__ */ h({
__name: "OvenPlayer",
props: {
config: {}
},
emits: ["ready", "metaChanged", "stateChanged", "resized", "playbackRateChanged", "seek", "time", "bufferChanged", "mute", "volumeChanged", "playlistChanged", "sourceChanged", "qualityLevelChanged", "cueChanged", "timeDisplayModeChanged", "adChanged", "adTime", "adComplete", "fullscreenChanged", "clicked", "allPlaylistEnded", "hlsPrepared", "hlsDestroyed", "dashPrepared", "dashDestroyed", "destroy", "error"],
setup(r, { expose: u, emit: n }) {
const h = r, a = v(), o = "ovenplayer-" + Math.random().toString().replace(".", ""), d = () => {
a.value = s.create(o, h.config), a.value.on("ready", () => n("ready")), a.value.on("metaChanged", (e) => n("metaChanged", e)), a.value.on("stateChanged", (e) => n("stateChanged", e)), a.value.on("resized", (e) => n("resized", e)), a.value.on("playbackRateChanged", (e) => n("playbackRateChanged", e)), a.value.on("seek", (e) => n("seek", e)), a.value.on("time", (e) => n("time", e)), a.value.on("bufferChanged", (e) => n("bufferChanged", e)), a.value.on("mute", (e) => n("mute", e)), a.value.on("volumeChanged", (e) => n("volumeChanged", e)), a.value.on("playlistChanged", (e) => n("playlistChanged", e)), a.value.on("sourceChanged", (e) => n("sourceChanged", e)), a.value.on("qualityLevelChanged", (e) => n("qualityLevelChanged", e)), a.value.on("cueChanged", (e) => n("cueChanged", e)), a.value.on("timeDisplayModeChanged", (e) => n("timeDisplayModeChanged", e)), a.value.on("adChanged", (e) => n("adChanged", e)), a.value.on("adTime", (e) => n("adTime", e)), a.value.on("adComplete", () => n("adComplete")), a.value.on("fullscreenChanged", (e) => n("fullscreenChanged", e)), a.value.on("clicked", (e) => n("clicked", e)), a.value.on("allPlaylistEnded", () => n("allPlaylistEnded")), a.value.on("hlsPrepared", (e) => n("hlsPrepared", e)), a.value.on("hlsDestroyed", () => n("hlsDestroyed")), a.value.on("dashPrepared", (e) => n("dashPrepared", e)), a.value.on("dashDestroyed", () => n("dashDestroyed")), a.value.on("destroy", () => n("destroy")), a.value.on("error", (e) => n("error", e));
setup(r, { expose: t, emit: s }) {
const a = v(), o = "ovenplayer-" + Math.random().toString().replace(".", ""), u = r, n = s, d = () => {
a.value = y.create(o, u.config), a.value.on("ready", () => n("ready")), a.value.on("metaChanged", (e) => n("metaChanged", e)), a.value.on("stateChanged", (e) => n("stateChanged", e)), a.value.on("resized", (e) => n("resized", e)), a.value.on("playbackRateChanged", (e) => n("playbackRateChanged", e)), a.value.on("seek", (e) => n("seek", e)), a.value.on("time", (e) => n("time", e)), a.value.on("bufferChanged", (e) => n("bufferChanged", e)), a.value.on("mute", (e) => n("mute", e)), a.value.on("volumeChanged", (e) => n("volumeChanged", e)), a.value.on("playlistChanged", (e) => n("playlistChanged", e)), a.value.on("sourceChanged", (e) => n("sourceChanged", e)), a.value.on("qualityLevelChanged", (e) => n("qualityLevelChanged", e)), a.value.on("cueChanged", (e) => n("cueChanged", e)), a.value.on("timeDisplayModeChanged", (e) => n("timeDisplayModeChanged", e)), a.value.on("adChanged", (e) => n("adChanged", e)), a.value.on("adTime", (e) => n("adTime", e)), a.value.on("adComplete", () => n("adComplete")), a.value.on("fullscreenChanged", (e) => n("fullscreenChanged", e)), a.value.on("clicked", (e) => n("clicked", e)), a.value.on("allPlaylistEnded", () => n("allPlaylistEnded")), a.value.on("hlsPrepared", (e) => n("hlsPrepared", e)), a.value.on("hlsDestroyed", () => n("hlsDestroyed")), a.value.on("dashPrepared", (e) => n("dashPrepared", e)), a.value.on("dashDestroyed", () => n("dashDestroyed")), a.value.on("destroy", () => n("destroy")), a.value.on("error", (e) => n("error", e));
}, l = () => {
if (a.value) {
try {
Expand All @@ -18,13 +18,13 @@ const k = /* @__PURE__ */ t({
a.value = void 0;
}
};
return u({
return t({
createPlayer: d,
removePlayer: l,
playerInstance: a
}), C(d), c(l), g(() => {
}), i(d), c(l), C(() => {
l(), d();
}), (e, f) => (y(), p("div", { id: o }));
}), (e, p) => (g(), m("div", { id: o }));
}
});
export {
Expand Down
2 changes: 1 addition & 1 deletion packages/vue3/dist/ovenplayer-vue3.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ff652a6

Please sign in to comment.