removed video-embed dependency

This commit is contained in:
Bachir Soussi Chiadmi 2023-07-06 15:18:59 +02:00
parent 52c0700d29
commit 50f7375eed
3 changed files with 9 additions and 15 deletions

11
package-lock.json generated
View File

@ -21,7 +21,6 @@
"paper": "^0.12.17", "paper": "^0.12.17",
"pinia": "^2.0.21", "pinia": "^2.0.21",
"poly-decomp": "^0.3.0", "poly-decomp": "^0.3.0",
"video-embed": "^0.2.0",
"vue": "^3.2.38", "vue": "^3.2.38",
"vue-easy-lightbox": "^1.16.0", "vue-easy-lightbox": "^1.16.0",
"vue-plyr": "^7.0.0", "vue-plyr": "^7.0.0",
@ -3621,11 +3620,6 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"devOptional": true "devOptional": true
}, },
"node_modules/video-embed": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/video-embed/-/video-embed-0.2.0.tgz",
"integrity": "sha512-b1pt11Dx5UscV+eKT2ZFchD/MTO5FG+mCSSEBehwwXZXkKY7NsDxn67fDpxtIU2Nbd9l9xfO7391fndlz12x/g=="
},
"node_modules/vite": { "node_modules/vite": {
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz",
@ -6469,11 +6463,6 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"devOptional": true "devOptional": true
}, },
"video-embed": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/video-embed/-/video-embed-0.2.0.tgz",
"integrity": "sha512-b1pt11Dx5UscV+eKT2ZFchD/MTO5FG+mCSSEBehwwXZXkKY7NsDxn67fDpxtIU2Nbd9l9xfO7391fndlz12x/g=="
},
"vite": { "vite": {
"version": "3.2.7", "version": "3.2.7",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz",

View File

@ -21,7 +21,6 @@
"paper": "^0.12.17", "paper": "^0.12.17",
"pinia": "^2.0.21", "pinia": "^2.0.21",
"poly-decomp": "^0.3.0", "poly-decomp": "^0.3.0",
"video-embed": "^0.2.0",
"vue": "^3.2.38", "vue": "^3.2.38",
"vue-easy-lightbox": "^1.16.0", "vue-easy-lightbox": "^1.16.0",
"vue-plyr": "^7.0.0", "vue-plyr": "^7.0.0",

View File

@ -3,8 +3,6 @@
import { mapActions, mapState } from 'pinia' import { mapActions, mapState } from 'pinia'
import { StaticsStore } from '@/stores/statics' import { StaticsStore } from '@/stores/statics'
const videoEmbed = require("video-embed");
export default { export default {
props: ['id'], props: ['id'],
// data(){ // data(){
@ -29,7 +27,15 @@ export default {
// console.log('videolinks', videolinks); // console.log('videolinks', videolinks);
for (let link of videolinks){ for (let link of videolinks){
console.log('videolink', link); console.log('videolink', link);
let iframe = videoEmbed(link[0]) let iframe;
switch (link[1]) {
case 'vimeo.com':
iframe = `<iframe src="${link[0]}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>`
break;
case 'www.youtube.com':
iframe = `<iframe src="${link[0]}" frameborder="0" allowfullscreen></iframe>`
break;
}
console.log('iframe', iframe); console.log('iframe', iframe);
text = text.replace(link[0], iframe); text = text.replace(link[0], iframe);
}; };