embedia-vue
Version:
A vue component package to embed videos such as TikTok, YouTube/Shorts, Twitter/X, Vimeo, and Dailymotion.
258 lines (177 loc) • 5.42 kB
Markdown
<p align="center">
<img src="https://raw.githubusercontent.com/demjhonsilver/embedia-vue/main/img/logo.png" alt="Logo" width="70" height="70"/>
</p>
<div align="center">
[](https://www.npmjs.com/package/embedia-vue)



[](https://github.com/demjhonsilver/embedia-vue/blob/main/LICENSE.md)
</div>
---------------------
- [Description](
- [Release Notes](
- [Features](
- [Installation](
- [Embed Video](
- [Paradigm](
- [Vue](
- [Responsiveness](
- [License](
- [Author](
Embedia Vue is an embed package for Vue which can embed from platforms like TikTok, YouTube/Shorts, Twitter/X, Vimeo and Dailymotion.
Framework | Supported versions
------ | -------- |
 | 3 & above
-----
Major Changes:
v2.0.0
- The maximum default width and height are 1366×768.
- Embedding videos from Facebook and Instagram is deprecated.
- All tests passed using Vue Test Utils. (Vitest)
-------
- Easy to set-up and responsive.
- Supports embedding one or more videos from platforms including TikTok, YouTube, YouTube Shorts, X, Dailymotion, and Vimeo.
___________
[](https://demjhonsilver.github.io/embedia-vue-docs)
-------------
To install the Embedia Vue, you can use the following npm command:
```bash
npm install embedia-vue
```
--------
Attributes |  |  |
----------|---------- |------------
Required? `width` | yes | | |
Required? `height` | yes | | |
Required? `fullscreen` | optional | | |
Required? `controls` | | | |
Required? `autoplay` | | | |
Required? `cssname` | optional | optional | optional | optional
Required? `clip` | yes | yes | yes | yes
---------
-------------------
Attributes |  |  |  |
------ | -------- | ----------|---------- |
Required? `width` | yes | yes | yes
Required? `height` | yes | yes | yes
Required? `fullscreen` | optional | optional |
Required? `controls` | optional | optional |
Required? `autoplay` | optional | optional |optional
Required? `cssname` | optional | optional | optional
Required? `clip` | yes | yes | yes
---------
You can copy and paste the following HD dimensions below:
---------------
---------------
Value | Width and Height
------- | ------------
1366×768 | width: 1366, height: 768
854x480 | width: 854, height: 480
640x360 | width: 640, height: 360
426x240 | width: 426, height: 240
256x144 | width: 256, height: 144
------------
------------
```js
<EmbediaVue
clip=""
width=""
height=""
:autoplay="false"
:fullscreen="false"
:controls="true"
cssname="rename-me-now"
/>
```
You can use any importing syntax script format:
```js
<script setup>
import { EmbediaVue } from 'embedia-vue';
</script>
```
or
```js
<script>
import { EmbediaVue } from 'embedia-vue';
export default {
components: {
EmbediaVue
}
};
</script>
```
For global usage (main.js)
```js
import { createApp } from 'vue';
import './style.css';
import App from './App.vue';
import router from './router';
import { EmbediaVue } from 'embedia-vue'; // Import global
createApp(App)
.component('EmbediaVue', EmbediaVue)
.use(router)
.mount('#app');
```
If you choose global, you can use the code below:
```js
<template>
<EmbediaVue
clip=""
width=""
height=""
/>
</template>
<style scoped>
</style>
```
-----------------------------------------------
______________________________________________
```js
<template>
<EmbediaVue
clip="https://www.youtube.com/watch?v=oEXFMGK7IC0"
width="640"
height="360"
cssname="embed-clip"
/>
</template>
<script setup>
import { EmbediaVue } from 'embedia-vue';
</script>
<style scoped>
.embed-clip {
border: 2px solid green;
}
</style>
```
______
In your built-in default style.css ( body only )
-------
Remove this: place-items: center;
```css
body {
margin: 0;
display: block;
place-items: center; // Remove this code to make it responsive, if it exists.
min-width: 320px;
min-height: 100vh;
}
```
MIT
- This library package is FREE. ❤️
----------------------------------------------------
Demjhon Silver