Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
1286357
feat: WIP video-player
aman-imagekit Jun 9, 2025
d1ecd70
feat: WIP angular wrapper, changed package manager to pnpm from yarn
aman-imagekit Jun 9, 2025
ea0dbb6
feat: playlist CSS fixed
aman-imagekit Jun 10, 2025
8e820bc
fix: CSS issues fixed chapters, thumbnails, subtitles highlighting
aman-imagekit Jun 10, 2025
f6d7ad7
feat: WIP shoppable
aman-imagekit Jun 10, 2025
32a8a9d
fix: CSS issues in post play shoppable overlay
aman-imagekit Jun 11, 2025
9a8caca
WIP
aman-imagekit Jun 11, 2025
60cf66b
build: migrate from pnpm to yarn and restructure Angular build config…
ahnv Jun 11, 2025
68824cc
docs: add development setup instructions to README
ahnv Jun 11, 2025
6184e8d
WIP: vue wrapper working + layout issues fixed when fluid is present
aman-imagekit Jun 12, 2025
5105426
feat: added floatingWhenNotVisible, added logic for translate in Remo…
aman-imagekit Jun 16, 2025
f79c117
feat: added present upcoming
aman-imagekit Jun 16, 2025
1914bdf
feat: added context menu
aman-imagekit Jun 17, 2025
0579c8a
feat: added grab carousal, cross button
aman-imagekit Jun 17, 2025
4b9a627
fix: CSS fixes for recommendation overlay, next up widget, shoppable …
aman-imagekit Jun 25, 2025
408d1e4
feat: WIP added pages for different features in javascript example, a…
aman-imagekit Jun 26, 2025
3e02c6e
chore: trigger action on pushing changes in dev branch
aman-imagekit Jun 27, 2025
295306b
feat: enable corepack in github workflow
aman-imagekit Jun 27, 2025
eab6297
temp: skip building angular
aman-imagekit Jun 27, 2025
b052e59
feat: added logic to skip preparing urls once prepared in playlist
aman-imagekit Jul 1, 2025
de5d51c
fix: links fixed in javascript example
aman-imagekit Jul 1, 2025
13b5429
fix: tyescript error fix
aman-imagekit Jul 1, 2025
d8b2c1d
fix: back to examples fix, styles on index not loading fix
aman-imagekit Jul 1, 2025
989c520
feat: refactored shoppable
aman-imagekit Jul 16, 2025
6c92ef3
feat: added playlist next/previous controls
aman-imagekit Jul 16, 2025
8317552
chore: playlist, control bar feedback addressed
aman-imagekit Jul 22, 2025
b8ad81a
feedback 2
aman-imagekit Jul 23, 2025
672a125
fix: abs path
aman-imagekit Jul 23, 2025
6de8a35
fix: icon style fix
aman-imagekit Jul 23, 2025
f064331
fix: waitForVideo logic fix
aman-imagekit Jul 25, 2025
d86b2dc
feat: add Try It Yourself page and update navigation
aman-imagekit Dec 22, 2025
b019f37
feat: implement signer functionality for ImageKit URLs in Try It Your…
aman-imagekit Dec 22, 2025
0ecc80d
feat: add logo button functionality and example page
aman-imagekit Jan 16, 2026
7dec285
refactor: update subtitle handling and improve caption generation logic
aman-imagekit Jan 19, 2026
2e3d7c6
feat: integrate CleanupRegistry for improved resource management acro…
aman-imagekit Jan 19, 2026
a4e3e1f
feat: enhance context menu cleanup logic to manage event listeners mo…
aman-imagekit Jan 20, 2026
15f4ef4
feat: update video source URLs for player examples to new staging links
aman-imagekit Jan 20, 2026
785dd49
refactor: streamline video player module structure and enhance type d…
aman-imagekit Jan 22, 2026
a2d2876
chore: remove Angular example files and clean up project structure
aman-imagekit Jan 28, 2026
437dc7f
updated text track options, removed overriding of player.addRemoteTex…
aman-imagekit Jan 28, 2026
1dddd4e
chore: update Vite configuration and import paths for video player st…
aman-imagekit Jan 28, 2026
1714fb6
feat: enhance chapters functionality with new configuration options a…
aman-imagekit Feb 2, 2026
79c8b94
fix: remove subtitles from video info objects in App component for cl…
aman-imagekit Feb 2, 2026
2a46d31
chore: update package.json to include all examples in workspaces
aman-imagekit Feb 2, 2026
987bbee
temp: workspace configuration updated
aman-imagekit Feb 2, 2026
80cb2de
feat: add new assets build step and include info-circle icon in styles
aman-imagekit Feb 2, 2026
bf9a088
refactor: update video player package to remove Angular dependencies,…
aman-imagekit Feb 10, 2026
1f6a09b
style: enhance playlist UI with flexbox layout and improved thumbnail…
aman-imagekit Feb 10, 2026
a815336
refactor: simplify playlist menu item retrieval and enhance UI update…
aman-imagekit Feb 10, 2026
4d57563
chore: updated README.md
aman-imagekit Feb 12, 2026
eae4e8a
feat: add subtitle highlight color customization feature and improve …
aman-imagekit Feb 17, 2026
682e6e0
style: remove custom styling from subtitle cue as it was interfering …
aman-imagekit Feb 18, 2026
452eb98
feat: implement filtering of transformation parameters in video and s…
aman-imagekit Feb 18, 2026
0d6cdd9
refactor: optimize initialization of video player components by using…
aman-imagekit Feb 18, 2026
b7a810f
feat: enhance chapter marker functionality with translation support a…
aman-imagekit Mar 9, 2026
ae53b59
feat: update README for documentation link and enhance try-it-yoursel…
aman-imagekit Mar 9, 2026
b0a45b4
feat: enhance subtitle processing by removing unused properties and a…
aman-imagekit Mar 9, 2026
1f8806f
style: update shoppable panel styles with responsive font sizes and i…
aman-imagekit Mar 9, 2026
1f0058a
refactor: streamline chapter handling by introducing cleanup registri…
aman-imagekit Mar 10, 2026
f332970
chore: update workspace configuration to include all examples and rem…
aman-imagekit Mar 10, 2026
1bde31c
chore(workflow): add GitHub Actions workflow for automated NPM packag…
ahnv Mar 10, 2026
f3a0286
refactor: comment out previous and next line logic
aman-imagekit Mar 10, 2026
dafb873
Merge pull request #2 from imagekit-developer/workflow-publish
aman051197 Mar 10, 2026
933ec53
refactor: simplify caption generation by directly creating captions f…
aman-imagekit Mar 11, 2026
5fe5d70
feat(video-player): add browser support and IIFE format to package co…
aman-imagekit Mar 11, 2026
3cda780
chore(video-player): bump version to 1.0.0-alpha.1 in package.json
aman-imagekit Mar 11, 2026
0677757
chore(workflow): copy README.md to video-player package before publis…
ahnv Mar 11, 2026
14426b4
chore(workflow): remove README.md copy step from publish workflow out…
ahnv Mar 11, 2026
283897e
chore(video-player): update build configuration and language codes; e…
aman-imagekit Mar 12, 2026
99dd5fa
fix(video-player): update video sources and player options across exa…
aman-imagekit Mar 12, 2026
3483b4c
chore(video-player): remove README.md from imagekit-signer-server and…
aman-imagekit Mar 12, 2026
4679d67
feat(video-player): add getOriginalCurrentSource callback and update …
aman-imagekit Mar 12, 2026
c9e5bf1
feat(video-player): add getOriginalCurrentSource method to retrieve o…
aman-imagekit Mar 12, 2026
058c9a6
fix(video-player): remove transformation parameters from poster sourc…
aman-imagekit Mar 12, 2026
1303ab2
chore(video-player): bump version to 1.0.0-beta.1 and update z-index …
aman-imagekit Mar 12, 2026
87fc48f
fix(video-player): prevent concurrent chapter language switches and i…
aman-imagekit Mar 13, 2026
48d8e4d
feat(video-player): enhance playlist functionality with chapters, sub…
aman-imagekit Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/deploy-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy JavaScript Examples to GitHub Pages

on:
push:
branches:
- dev # Or your default branch, e.g., 'main'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Enable Corepack to use the yarn version defined in package.json
- name: Enable Corepack
run: corepack enable


- name: Set up Node.js and Yarn
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install root dependencies
# This single command installs dependencies for the entire monorepo using Yarn.
# It respects your yarn.lock file and workspace setup.
run: yarn install --immutable

- name: Build all packages
# This runs the "build" script in your root package.json,
# which in turn runs `lerna run build`.
run: yarn run build

- name: Set up GitHub Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# The path is correct, pointing to your example app's build output
path: './examples/javascript/dist'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
86 changes: 86 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Publish NPM

on:
workflow_dispatch:
inputs:
tag:
description: NPM dist tag (alpha, beta, latest)
required: true
default: 'alpha'
type: choice
options:
- alpha
- beta
- latest

release:
types: [published]

jobs:
publish:
name: publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Enable Corepack
run: corepack enable

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

- name: Install dependencies
run: |
yarn install --immutable

- name: Build packages
run: |
yarn build

- name: Determine NPM tag
id: npm-tag
run: |
if [ -n "${{ github.event.inputs.tag }}" ]; then
NPM_TAG="${{ github.event.inputs.tag }}"
elif [ "${{ github.event_name }}" == "release" ]; then
# For releases, use 'latest' tag unless version contains alpha/beta
RELEASE_TAG="${{ github.event.release.tag_name }}"
if [[ "$RELEASE_TAG" == *"alpha"* ]] || [[ "$RELEASE_TAG" == *"-alpha"* ]]; then
NPM_TAG="alpha"
elif [[ "$RELEASE_TAG" == *"beta"* ]] || [[ "$RELEASE_TAG" == *"-beta"* ]]; then
NPM_TAG="beta"
else
NPM_TAG="latest"
fi
else
NPM_TAG="alpha"
fi

echo "tag=$NPM_TAG" >> $GITHUB_OUTPUT

- name: Publish to NPM
run: |
cp README.md packages/video-player/
cd packages/video-player

# Publish with the specified tag
npm publish --tag ${{ steps.npm-tag.outputs.tag }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Output published version
run: |
cd packages/video-player
PUBLISHED_VERSION=$(node -p "require('./package.json').version")
echo "✅ Published @imagekit/video-player@${PUBLISHED_VERSION} with tag: ${{ steps.npm-tag.outputs.tag }}"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
old-code
.yarn
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.19.2
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
# imagekit-video-player
ImageKit.io
ImageKit.io Video Player
[![Node CI](https://img.shields.io/badge/Node-CI-blue)](https://github.com/imagekit-developer/imagekit-video-player)
[![npm version](https://img.shields.io/npm/v/@imagekit/video-player.svg)](https://www.npmjs.com/package/@imagekit/video-player)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Twitter Follow](https://img.shields.io/twitter/follow/imagekitio?style=social)](https://twitter.com/imagekitio)

## Introduction

ImageKit's video player is an advanced video player built on top of [Video.js 8.20.0](https://videojs.org/guides) delivering enhanced features for a seamless, interactive video experience. It's fully integrated with ImageKit's video delivery and transformation solution.

## Key features

- **Video transformations**: Apply ImageKit video transformations at the player level or per-video level.
- **Adaptive bitrate streaming**: Full support for HLS and MPEG-DASH with automatic generation of streaming representations.
- **Subtitles and chapters**: Easy addition of subtitles, captions, and chapter markers for better video navigation.
- **Player enhancements**: Floating player when scrolled out of view, and seek thumbnails on the progress bar.
- **Custom branding**: Add a clickable logo to brand your video player.
- **Playlists and recommendations**: Create playlists with scrollable widgets or show recommended videos when playback ends.
- **Shoppable Video**: Make videos shoppable by displaying product images alongside videos.

## Installation

You can install the SDK in your project using npm or yarn.

```bash
npm install @imagekit/video-player
```

## TypeScript support

The SDK is written in TypeScript, offering first-class TypeScript support. Enjoy excellent type safety and IntelliSense in your IDE. You can use it in your TypeScript projects without any additional configuration.

## Documentation

Refer to the [ImageKit official documentation](https://imagekit.io/docs/video-player/overview) for more details on how to use the SDK.
33 changes: 33 additions & 0 deletions examples/javascript/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ImageKit Video Player Examples</title>
<link rel="stylesheet" href="src/style.css" />
</head>

<body>
<div class="container">
<h1>ImageKit Video Player Examples</h1>
<p>Select a feature below to see a live demonstration and its implementation code.</p>
<nav class="example-nav">
<ul>
<li><a href="pages/shoppable.html">Shoppable Video</a></li>
<li><a href="pages/playlist.html">Playlist</a></li>
<li><a href="pages/recommendations.html">Recommendations</a></li>
<li><a href="pages/floating-window.html">Floating Window</a></li>
<li><a href="pages/chapters.html">Chapters</a></li>
<li><a href="pages/subtitles.html">Subtitles</a></li>
<li><a href="pages/seek-thumbnails.html">Seek thumbnails</a></li>
<li><a href="pages/abs.html">ABS</a></li>
<li><a href="pages/logo.html">Logo Button</a></li>
<li><a href="pages/try-it-yourself.html">Try It Yourself</a></li>
</ul>
</nav>
</div>
<script type="module"></script>
</body>

</html>
24 changes: 24 additions & 0 deletions examples/javascript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "javascript-example",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/node": "^20.14.2",
"typescript": "^5.2.2",
"vite": "^5.2.0"
},
"dependencies": {
"@imagekit/video-player": "workspace:*",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"imagekit": "^3.1.5"
}
}
27 changes: 27 additions & 0 deletions examples/javascript/pages/abs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ABS Example</title>
<link rel="stylesheet" href="/src/style.css" />
</head>

<body>
<div class="container">
<a href="../" class="back-link">&larr; Back to examples</a>
<h1>ABS Example</h1>
<h2>DASH</h2>
<video id="player" class="video-js" controls preload="auto" width="960" height="540"></video>
<h2>HLS</h2>
<video id="player-2" class="video-js" controls preload="auto" width="960" height="540"></video>
<h2>Example Code</h2>
<div class="code-block">
<pre><code id="code-display" class="language-javascript"></code></pre>
</div>
</div>
<script type="module" src="/src/abs.ts"></script>
</body>

</html>
59 changes: 59 additions & 0 deletions examples/javascript/pages/chapters.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chapters Example</title>
<link rel="stylesheet" href="/src/style.css" />
<style>
.tabs {
display: flex;
gap: 10px;
margin: 20px 0;
border-bottom: 2px solid #ddd;
}
.tab-button {
padding: 10px 20px;
background: none;
border: none;
border-bottom: 3px solid transparent;
cursor: pointer;
font-size: 16px;
color: #666;
transition: all 0.3s;
}
.tab-button:hover {
color: #333;
}
.tab-button.active {
color: #0066cc;
border-bottom-color: #0066cc;
font-weight: bold;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
</style>
</head>
<body>
<div class="container">
<a href="../" class="back-link">&larr; Back to examples</a>
<h1>Chapters Example</h1>
<p>This example demonstrates three different ways to configure chapters:</p>
<div class="tabs">
<button class="tab-button active" data-tab="auto">Auto-generate (AI)</button>
<button class="tab-button" data-tab="url">VTT URL</button>
<button class="tab-button" data-tab="manual">Manual Object</button>
</div>
<video id="player" class="video-js" controls preload="auto" width="960" height="540"></video>
<h2>Example Code</h2>
<div class="code-block">
<pre><code id="code-display" class="language-javascript"></code></pre>
</div>
</div>
<script type="module" src="/src/chapters.ts"></script>
</body>
</html>
26 changes: 26 additions & 0 deletions examples/javascript/pages/floating-window.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Floating Window Example</title>
<link rel="stylesheet" href="/src/style.css" />
</head>
<body>
<div class="container">
<a href="../" class="back-link">&larr; Back to examples</a>
<h1>Floating Window Example</h1>
<p>Scroll down the page to see the player shrink and float in the corner.</p>
<video id="player" class="video-js" controls preload="auto" width="960" height="540"></video>
<h2>Example Code</h2>
<div class="code-block">
<pre><code id="code-display" class="language-javascript"></code></pre>
</div>
<div style="height: 2000px; padding-top: 2rem; border-top: 1px solid #ddd; margin-top: 2rem;">
<h2>Scroll down to test...</h2>
<p>As you scroll down and the main player leaves the viewport, it will automatically float into the corner so you can keep watching.</p>
</div>
</div>
<script type="module" src="/src/floating-window.ts"></script>
</body>
</html>
Loading
Loading