open-index/open-npm huggingface dataset:
npm package: @phongthien/micro-fe-vite-plugin
Description: Qiankun plugin for vite
Author: Giang Nguyen
Latest version: 0.0.5

# @micro-fe/vite-plugin

Inspired by [vite-plugin-qiankun](https://github.com/tengmaoqing/vite-plugin-qiankun).

## Usage

1. Install plugin for vite config file `vite.config.ts`:

```typescript
import MicroVitePlugin from '@micro-fe/vite-plugin';

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        MicroVitePlugin('subapp1', {
            useDevMode: true,
        }),
    ],
});
```

2. Use lifecycle in entry file `src/main.ts`:

```typescript
import {
    renderWithQiankun,
    qiankunWindow,
    QiankunProps,
} from '@micro-fe/vite-plugin';

renderWithQiankun({
    bootstrap() {
        console.log('[vue] vue app bootstraped');
    },
    mount(props: MountProps) {
        console.log('[vue] props from main framework', props);
        render(props);
        // storeTest(props);
    },
    update: function (props: QiankunProps): void | Promise<void> {
        throw new Error('Function not implemented.');
    },
    unmount() {
        if (app) {
            app.unmount();
            app = null;
            history.destroy();
        }
    },
});

// render when run alone
if (!qiankunWindow.__POWERED_BY_QIANKUN__) {
    render();
}
```

## License

MIT
npm package: @phongthien/ssai-tracking
Description: **Table of Contents**
Author: ntgiang
Latest version: 0.0.5

# ssai-tracking

**Table of Contents**

## Install

```markdown
npm i @sigmaott/ssai-tracking
```

## ****Usage****

```jsx
import SSAITracking from '@sigmaott/ssai-tracking'

const video = document.getElementById('video')
// get tracking url and source
const domain = `<<domain>>`
const sessionUrl = `${domain}/manifest/manipulation/session/628e8331-d3b2-4e89-a151-10003ed76286/origin04/scte35-av4s-clear/master.m3u8`
const data = await fetch(sessionUrl)
    .then(response => response.json()) as { manifestUrl: string; trackingUrl: string }
const videoSrc = `${domain}${data.manifestUrl}`const trackingUrl = `${domain}${data.trackingUrl}`
// init tracking before play video
const ssaiPlugin = new SSAITracking({ trackingUrl, video, intervalTracking: 10000 })
ssaiPlugin.init()

//destroy before not use
ssaiPlugin.destroy()
```

## API

- SSAITracking.constructor(params:Obj)

      Call when init instance.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| params | Obj | true |  | Setting params when init instance.       |

****supported  params:****

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| trackingUrl | string | true |  | Url tracking        |
| video | HTMLVideoElement | true |  | HTMLVideoElement |
| intervalTracking | number | true | 10000  | Interval tracking (unit: ms ) |
| disableErrLog | boolen | false | false | if value is false enable log when call api error |
- SSAITracking.init()
    
    Call  before play video.
    
- SSAITracking.destroy()
    
    Call before not use instance