Browse Source

Videos Fix

master
30117125 4 years ago
parent
commit
059717b9cc

+ 9
- 3
src/components/property/commercial/singleView/contentSection.vue View File

7
             <iframe
7
             <iframe
8
               v-if="property.video !== null"
8
               v-if="property.video !== null"
9
               width="100%"
9
               width="100%"
10
-              src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10
+              :src="'https://www.youtube.com/embed/' + property.video"
11
               frameborder="0"
11
               frameborder="0"
12
               allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
12
               allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
13
               allowfullscreen
13
               allowfullscreen
130
             style="margin-bottom:-6px"
130
             style="margin-bottom:-6px"
131
             class="mt-3"
131
             class="mt-3"
132
           ></iframe>
132
           ></iframe>
133
-
134
           <h4 v-if="property.video !== null" class="mt-5">Video</h4>
133
           <h4 v-if="property.video !== null" class="mt-5">Video</h4>
135
           <iframe
134
           <iframe
136
             v-if="property.video !== null"
135
             v-if="property.video !== null"
137
             width="100%"
136
             width="100%"
138
-            src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
137
+            height="500px"
138
+            :src="'https://www.youtube.com/embed/' + property.video"
139
             frameborder="0"
139
             frameborder="0"
140
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
140
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
141
             allowfullscreen
141
             allowfullscreen
178
   },
178
   },
179
   created() {},
179
   created() {},
180
   mounted() {
180
   mounted() {
181
+    if (this.property.video === "") {
182
+      this.property.video = null;
183
+    }
184
+    if (this.property.virtualTour === "") {
185
+      this.property.virtualTour = null;
186
+    }
181
     this.$emit("Loaded", true);
187
     this.$emit("Loaded", true);
182
   }
188
   }
183
 };
189
 };

+ 10
- 3
src/components/property/residential/singleView/contentSection.vue View File

7
             <iframe
7
             <iframe
8
               v-if="property.video != null"
8
               v-if="property.video != null"
9
               width="100%"
9
               width="100%"
10
-              src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10
+              :src="'https://www.youtube.com/embed/' + property.video"
11
               frameborder="0"
11
               frameborder="0"
12
               allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
12
               allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
13
               allowfullscreen
13
               allowfullscreen
128
               </div>
128
               </div>
129
             </div>
129
             </div>
130
           </div>
130
           </div>
131
-
132
           <h4 v-if="property.virtualTour != null" style="margin-top:150px">Virtual Tour</h4>
131
           <h4 v-if="property.virtualTour != null" style="margin-top:150px">Virtual Tour</h4>
133
           <iframe
132
           <iframe
134
             v-if="property.virtualTour != null"
133
             v-if="property.virtualTour != null"
135
             width="100%"
134
             width="100%"
135
+            height="500px"
136
             :src="property.virtualTour"
136
             :src="property.virtualTour"
137
             frameborder="0"
137
             frameborder="0"
138
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
138
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
145
           <iframe
145
           <iframe
146
             v-if="property.video != null"
146
             v-if="property.video != null"
147
             width="100%"
147
             width="100%"
148
-            src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
148
+            height="500px"
149
+            :src="'https://www.youtube.com/embed/' + property.video"
149
             frameborder="0"
150
             frameborder="0"
150
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
151
             allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
151
             allowfullscreen
152
             allowfullscreen
190
     //this.getListsForPropertyEdit(this.property.id);
191
     //this.getListsForPropertyEdit(this.property.id);
191
   },
192
   },
192
   async mounted() {
193
   async mounted() {
194
+    if (this.property.video === "") {
195
+      this.property.video = null;
196
+    }
197
+    if (this.property.virtualTour === "") {
198
+      this.property.virtualTour = null;
199
+    }
193
     this.currentUrl = window.location.origin + this.$route.fullPath;
200
     this.currentUrl = window.location.origin + this.$route.fullPath;
194
   },
201
   },
195
   data() {
202
   data() {

Loading…
Cancel
Save