@mixd-id/web-scaffold 0.1.230406218 → 0.1.230406220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406218",
4
+ "version": "0.1.230406220",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -40,10 +40,15 @@ const initScript = (callback, id) => {
40
40
  document.head.appendChild(script)
41
41
  }
42
42
  else{
43
- while(callbacks.length > 0){
44
- const [ callback, id ] = callbacks.pop()
45
- callback()
46
- }
43
+ const intervalId = window.setInterval(() => {
44
+ if('YT' in window){
45
+ window.clearInterval(intervalId)
46
+ while(callbacks.length > 0){
47
+ const [ callback, id ] = callbacks.pop()
48
+ callback()
49
+ }
50
+ }
51
+ }, 500)
47
52
  }
48
53
  }
49
54
 
@@ -97,7 +102,7 @@ export default{
97
102
  mounted() {
98
103
  this.id = this.uniqid()
99
104
 
100
- /*if(parseInt(this.delay) > 0){
105
+ if(parseInt(this.delay) > 0){
101
106
  window.setTimeout(() => {
102
107
  if(!this.ready){
103
108
  this.loadVideo()
@@ -110,7 +115,7 @@ export default{
110
115
  this.loadVideo()
111
116
  }
112
117
  })
113
- }*/
118
+ }
114
119
  },
115
120
 
116
121
  methods: {