Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Lightweight TypeScript library for interactive videos with branching stories, questions, and animated hotspots
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Turn any video into an interactive one. Viewers answer questions, choose where the story goes and click animated hotspots, all with a single <ivkit-player> tag. No dependencies, under 9.5 KiB gzip.
IVKit works with its ready-made player or without it. Both read the same story format, so a story written for one plays in the other.
| Package | What you get | Use it when |
|---|---|---|
@ivkit/player | The <ivkit-player> Web Component: videos, questions, hotspots, controls, fullscreen and theming. | You want a player that works out of the box, in plain HTML or any framework. |
@ivkit/react | A React component around the player, with typed props and event callbacks, for React 18 and 19. | You use the player in React. |
@ivkit/core | The DOM-free engine, media controller and validator the player is built on. | You want your own interface: React or Vue components, a canvas, a game engine. |
@ivkit/player includes the engine from @ivkit/core, so you don't need both. To import story types or validateStory next to the player, add @ivkit/core at the same version.
This page plays a video that stops at second 4 and asks where to go, using the example videos of the documentation. It loads the player from a CDN, so it needs no build step:
<script type="module" src="https://cdn.jsdelivr.net/npm/@ivkit/[email protected]/dist/ivkit-player.min.js"></script>
<ivkit-player id="player" controls></ivkit-player>
<script type="module">
const videos = "https://daniel-glz.github.io/ivkit/examples/videos";
document.getElementById("player").story = {
version: "0.1",
start: "intro",
scenes: {
intro: {
src: `${videos}/adventure-intro.mp4`,
events: [
{
type: "question",
id: "path",
at: 4,
text: "Where do you want to go?",
options: [
{ id: "forest", label: "Into the forest", goto: "forest" },
{ id: "city", label: "To the city", goto: "city" },
],
},
],
},
forest: { src: `${videos}/adventure-forest.mp4` },
city: { src: `${videos}/adventure-city.mp4` },
},
};
</script>
With a bundler, install the package and import it once instead of the CDN script:
npm install @ivkit/player
import "@ivkit/player";
npm install @ivkit/core
The engine tells you what to show based on playback time, and you draw it however you like:
import { StoryEngine } from "@ivkit/core";
const engine = new StoryEngine(story);
engine.on("scene", ({ scene, time }) => {
video.src = scene.src;
video.currentTime = time;
video.play();
});
engine.on("interaction", ({ question }) => {
video.pause();
showQuestion(question); // calls engine.answer(choice.id) on click
});
engine.on("resume", ({ time }) => {
video.currentTime = time;
video.play();
});
engine.on("hotspots", ({ hotspots }) => renderHotspots(hotspots));
video.addEventListener("timeupdate", () => engine.update(video.currentTime));
video.addEventListener("ended", () => engine.mediaEnded());
engine.start();
Add MediaController to preload the next scene and change scenes without a black frame. See Custom players with core and a player built in Vue.
renderHotspot::part() and slots@ivkit/corevalidateStory errors as you typeShowcases on real footage:
@ivkit/core<ivkit-player>See CONTRIBUTING.md for setup, commands and size budgets.
Apache-2.0 © Alexis Gonzalez