Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish to npm
name: Publish to npm

on:
release:
types: [created]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag-after-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
# Match lines starting with "## vX.Y.Z " until the next "## "
awk "/^## v${{ env.version }}[[:space:]]/{flag=1; next} /^## /{flag=0} flag" CHANGELOG.md > RELEASE_NOTES.md

echo "notes<<EOF" >> $GITHUB_ENV
if [ "${{ env.release_type }}" = "major" ]; then
echo "## 🚀 Major Release" >> $GITHUB_ENV
Expand All @@ -83,7 +83,7 @@ jobs:
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.version }}
name: "Release v${{ env.version }}"
name: 'Release v${{ env.version }}'
body: ${{ env.notes }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ on:
- minor
- major



jobs:
bump:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"ignores": ["node_modules", "dist"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Replace unsupported "ignores" with .prettierignore.

Prettier config doesn’t support an "ignores" key; it’ll be ignored. Use a .prettierignore file instead to exclude paths like dist.

Apply this diff to the config and add an ignore file:

   "tabWidth": 2,
-  "ignores": ["node_modules", "dist"]
+  // moved to .prettierignore

.new file: .prettierignore

node_modules
dist

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
.prettierrc.json around line 7: the config contains an unsupported "ignores" key
which Prettier ignores; remove the "ignores" entry from .prettierrc.json and
instead create a new .prettierignore file at the repo root containing the
ignored paths (node_modules and dist) so Prettier will properly exclude them.

}
15 changes: 7 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## Unreleased

## 0.1.0 - 2025-08-09

### Features

* `6b37d3b` feat: Add MIT license to build output and refactor component structure
* `d44a709` feat: Refine target element mounting and bump version
* `b89538d` feat: Allow specifying targetElementId for player mounting
* `d1888ea` feat: Improve player initialization and build output
- `6b37d3b` feat: Add MIT license to build output and refactor component structure
- `d44a709` feat: Refine target element mounting and bump version
- `b89538d` feat: Allow specifying targetElementId for player mounting
- `d1888ea` feat: Improve player initialization and build output

### Chores

* `11e7138` chore: Bump package version to `0.1.0` to reflect the new feature and breaking change in rendering behavior.
* `e919430` chore: Update examples/ExampleInteractiveVideo.vue
* `47f4db5` chore: Update examples/package.json
- `11e7138` chore: Bump package version to `0.1.0` to reflect the new feature and breaking change in rendering behavior.
- `e919430` chore: Update examples/ExampleInteractiveVideo.vue
- `47f4db5` chore: Update examples/package.json

## 0.0.2 - 2025-08-05

Expand Down
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which can reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery, and sexual attention or advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address, without their explicit permission
- Other conduct which can reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Expand Down Expand Up @@ -67,4 +67,4 @@ Community leaders will follow these Community Impact Guidelines in determining t
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
42 changes: 21 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ This project adheres to the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). By partici

If you find a bug, please open an issue on our [GitHub Issues page](https://github.com/interactive-video-labs/interactive-video-vue-wrapper/issues). When reporting a bug, please include:

- A clear and concise description of the bug.
- Steps to reproduce the behavior.
- Expected behavior.
- Actual behavior.
- Screenshots or videos if applicable.
- Your environment (Vue version, browser, OS, etc.).
- A clear and concise description of the bug.
- Steps to reproduce the behavior.
- Expected behavior.
- Actual behavior.
- Screenshots or videos if applicable.
- Your environment (Vue version, browser, OS, etc.).

### Suggesting Enhancements

If you have an idea for a new feature or an improvement, please open an issue on our [GitHub Issues page](https://github.com/interactive-video-labs/interactive-video-vue-wrapper/issues). When suggesting an enhancement, please include:

- A clear and concise description of the proposed enhancement.
- The problem it solves or the benefit it provides.
- Any alternative solutions you've considered.
- A clear and concise description of the proposed enhancement.
- The problem it solves or the benefit it provides.
- Any alternative solutions you've considered.

### Your First Code Contribution

Expand All @@ -68,9 +68,9 @@ If you're looking to make your first code contribution, look for issues labeled

In your pull request description, please:

- Reference any related issues (e.g., `Fixes #123`, `Closes #456`).
- Provide a clear explanation of your changes.
- Include screenshots or GIFs if your changes affect the UI.
- Reference any related issues (e.g., `Fixes #123`, `Closes #456`).
- Provide a clear explanation of your changes.
- Include screenshots or GIFs if your changes affect the UI.

## Development Setup

Expand All @@ -82,18 +82,18 @@ For detailed instructions on setting up your development environment, installing

We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for our commit messages. This helps with automated changelog generation and semantic versioning. Examples:

- `feat: add new video playback controls`
- `fix: resolve autoplay issue on iOS`
- `docs: update installation instructions`
- `refactor: improve player initialization logic`
- `test: add unit tests for cue points`
- `feat: add new video playback controls`
- `fix: resolve autoplay issue on iOS`
- `docs: update installation instructions`
- `refactor: improve player initialization logic`
- `test: add unit tests for cue points`

### TypeScript Styleguide

- Follow existing code style and formatting.
- Use clear and descriptive variable and function names.
- Ensure proper type annotations for all functions, variables, and parameters.
- Avoid `any` type unless absolutely necessary.
- Follow existing code style and formatting.
- Use clear and descriptive variable and function names.
- Ensure proper type annotations for all functions, variables, and parameters.
- Avoid `any` type unless absolutely necessary.

## License

Expand Down
41 changes: 21 additions & 20 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This document provides essential information for developers looking to contribut
To get started with local development, follow these steps:

1. **Clone the repository:**

```bash
git clone https://github.com/interactive-video-labs/interactive-video-vue-wrapper.git
cd interactive-video-vue-wrapper
Expand All @@ -26,35 +27,35 @@ To get started with local development, follow these steps:

Here are the common development scripts available:

- **`pnpm build`**: Compiles the TypeScript source code into JavaScript (ESM and CommonJS formats) and generates declaration files (`.d.ts`). This command is run before publishing.
- **`pnpm build`**: Compiles the TypeScript source code into JavaScript (ESM and CommonJS formats) and generates declaration files (`.d.ts`). This command is run before publishing.

```bash
pnpm build
```
```bash
pnpm build
```

- **`pnpm dev`**: Starts the TypeScript compiler in watch mode, recompiling files on changes. Useful for active development.
- **`pnpm dev`**: Starts the TypeScript compiler in watch mode, recompiling files on changes. Useful for active development.

```bash
pnpm dev
```
```bash
pnpm dev
```

- **`pnpm test`**: Runs the unit tests using Vitest.
- **`pnpm test`**: Runs the unit tests using Vitest.

```bash
pnpm test
```
```bash
pnpm test
```

- **`pnpm clean`**: Removes the `dist` directory, clearing all compiled output.
- **`pnpm clean`**: Removes the `dist` directory, clearing all compiled output.

```bash
pnpm clean
```
```bash
pnpm clean
```

- **`pnpm prepare`**: This script is typically run after `pnpm install` and before `pnpm publish`. In this project, it simply runs `pnpm build`.
- **`pnpm prepare`**: This script is typically run after `pnpm install` and before `pnpm publish`. In this project, it simply runs `pnpm build`.

```bash
pnpm prepare
```
```bash
pnpm prepare
```

## Testing

Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# @interactive-video-labs/vue

<p align="center">
<img src="https://raw.githubusercontent.com/interactive-video-labs/docs/main/logo.svg" width="200px" alt="Interactive Video Labs Logo" />
</p>
Expand Down Expand Up @@ -84,15 +85,15 @@ function handleAnalyticsEvent(event, payload) {

The component accepts the following props:

| Prop | Type | Required | Default | Description |
| -------------------- | -------------------------------------------------------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------- |
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. |
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. |
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. |
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. |
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. |
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. |
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). |
| Prop | Type | Required | Default | Description |
| ------------------ | ------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------- |
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. |
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. |
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. |
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. |
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. |
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. |
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). |
Comment on lines +88 to +96
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Props table: add missing targetElementId and fix cues description grammar.
Also matches the example component usage.

-| `cues`             | `CuePoint[]`                                                  | `false`  | `[]`    | An array of cue points for interactive events. Can be updated dynamically. |
+| `cues`             | `CuePoint[]`                                                  | `false`  | `[]`    | An array of cue points for interactive events that can be updated dynamically. |
 | `translations`     | `Translations`                                                | `false`  | `{}`    | An object containing translations for the player UI.                       |
 | `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false`  | -       | Callback function for analytics events emitted by the player.              |
 | `autoplay`         | `boolean`                                                     | `false`  | `false` | Whether the video should start playing automatically.                      |
 | `loop`             | `boolean`                                                     | `false`  | `false` | Whether the video should loop.                                             |
 | `locale`           | `string`                                                      | `false`  | `'en'`  | The locale to be used for the player (e.g., 'en', 'es').                   |
+| `targetElementId`  | `string`                                                      | `false`  | -       | ID of an existing DOM element to mount the player into (optional).         |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Prop | Type | Required | Default | Description |
| ------------------ | ------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------- |
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. |
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events. Can be updated dynamically. |
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. |
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. |
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. |
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. |
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). |
| Prop | Type | Required | Default | Description |
| ------------------ | ------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------- |
| `videoUrl` | `string` | `true` | - | The URL of the video to be loaded. |
| `cues` | `CuePoint[]` | `false` | `[]` | An array of cue points for interactive events that can be updated dynamically. |
| `translations` | `Translations` | `false` | `{}` | An object containing translations for the player UI. |
| `onAnalyticsEvent` | `(event: AnalyticsEvent, payload?: AnalyticsPayload) => void` | `false` | - | Callback function for analytics events emitted by the player. |
| `autoplay` | `boolean` | `false` | `false` | Whether the video should start playing automatically. |
| `loop` | `boolean` | `false` | `false` | Whether the video should loop. |
| `locale` | `string` | `false` | `'en'` | The locale to be used for the player (e.g., 'en', 'es'). |
| `targetElementId` | `string` | `false` | - | ID of an existing DOM element to mount the player into (optional). |
🧰 Tools
🪛 LanguageTool

[style] ~91-~91: To form a complete sentence, be sure to include a subject.
Context: ...y of cue points for interactive events. Can be updated dynamically. | | `translatio...

(MISSING_IT_THERE)

🤖 Prompt for AI Agents
In README.md around lines 88 to 96, the props table is missing the
targetElementId prop and the cues description has awkward grammar; add a new row
for `targetElementId` (type `string`, required `false`, default `undefined` or
`-`, description like "The id of the DOM element where the player will be
mounted.") and update the `cues` description to grammatically read something
like "An array of cue points for interactive events; can be updated
dynamically." Make sure the new prop matches the example component usage and
keep formatting consistent with the existing table.


Any additional attributes passed to the component will be forwarded to the underlying `@interactive-video-labs/core` player configuration.

Expand Down Expand Up @@ -147,10 +148,7 @@ onMounted(() => {
</script>

<template>
<InteractiveVideo
ref="videoPlayer"
video-url="https://example.com/my-video.mp4"
/>
<InteractiveVideo ref="videoPlayer" video-url="https://example.com/my-video.mp4" />
</template>
```

Expand All @@ -161,10 +159,11 @@ onMounted(() => {
For detailed development setup, project structure, testing, build, and publishing instructions, please refer to our [Developer Guide](DEVELOPER.md).

---

## Contributing

Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) to get started.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
43 changes: 43 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { defineConfig } from 'eslint/config';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import prettier from 'eslint-plugin-prettier';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default defineConfig([
{
ignores: ['node_modules/*', 'dist/*', 'examples/*', 'scripts/*', 'test/*'],
},
{
extends: compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
),

plugins: {
'@typescript-eslint': typescriptEslint,
prettier,
},

languageOptions: {
parser: tsParser,
},

rules: {
...typescriptEslint.configs.recommended.rules,
'prettier/prettier': 'error',
},
},
]);
Loading