removed video-embed dependency
This commit is contained in:
parent
52c0700d29
commit
50f7375eed
11
package-lock.json
generated
11
package-lock.json
generated
@ -21,7 +21,6 @@
|
||||
"paper": "^0.12.17",
|
||||
"pinia": "^2.0.21",
|
||||
"poly-decomp": "^0.3.0",
|
||||
"video-embed": "^0.2.0",
|
||||
"vue": "^3.2.38",
|
||||
"vue-easy-lightbox": "^1.16.0",
|
||||
"vue-plyr": "^7.0.0",
|
||||
@ -3621,11 +3620,6 @@
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||
"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": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz",
|
||||
@ -6469,11 +6463,6 @@
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||
"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": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz",
|
||||
|
@ -21,7 +21,6 @@
|
||||
"paper": "^0.12.17",
|
||||
"pinia": "^2.0.21",
|
||||
"poly-decomp": "^0.3.0",
|
||||
"video-embed": "^0.2.0",
|
||||
"vue": "^3.2.38",
|
||||
"vue-easy-lightbox": "^1.16.0",
|
||||
"vue-plyr": "^7.0.0",
|
||||
|
@ -3,8 +3,6 @@
|
||||
import { mapActions, mapState } from 'pinia'
|
||||
import { StaticsStore } from '@/stores/statics'
|
||||
|
||||
const videoEmbed = require("video-embed");
|
||||
|
||||
export default {
|
||||
props: ['id'],
|
||||
// data(){
|
||||
@ -29,7 +27,15 @@ export default {
|
||||
// console.log('videolinks', videolinks);
|
||||
for (let link of videolinks){
|
||||
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);
|
||||
text = text.replace(link[0], iframe);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user