Guide on how to incorporate a Wistia Channel video gallery into a Gridsome webpage/template

I'm currently working on a Gridsome website and I'd like to incorporate a Wistia Channel video gallery into one of the pages. Specifically, I want to place it within the "frame" div class on top of the existing image. However, I'm unsure about where or how to insert the Wistia script. Any assistance would be greatly appreciated. Below is the code for the Gridsome page:

<template>
  <Layout>
    <div class="top-blue">
      <div class="frame">
          <g-image class="frame" src="../assets/images/top-frame.svg"/>
        </div>
        <div>
          <g-image class="bottom-bg" src="../assets/images/bottom-bg.svg"/>
      </div>
    </div>
  </Layout>
</template>

<script>
export default {
  metaInfo: {
    title: 'Hello, world!'
  }
}
</script>

<style>
.home-links a {
  margin-right: 1rem;
}

.top-blue{
  background-image: url("../assets/images/top-blue-bg.png");
  width:100%;
}

.frame{
  width:100%;
  z-index:1;
  position: relative;
}


.bottom-bg{
  width:100%;
  position: relative;
  margin-top:-150px;
  margin-bottom:-50px;
}
</style>

Here is the embed code for the Wistia Gallery:

<script src="https://fast.wistia.com/assets/external/channel.js" async></script><link rel="stylesheet" href="https://fast.wistia.com/embed/channel/project/x2dhyl75kf/font.css" /><div class="wistia_channel wistia_async_x2dhyl75kf mode=inline" style="min-height:100vh;position:relative;width:100%;"></div>

Answer №1

Although this solution may not be perfect, it certainly gets the job done if anyone else encounters the same issue. To incorporate a Wistia video collection into a Gridsome / Vue.js website, consider using an iframe with the src URL of the collection instead of the standard Wistia embed code. Here's an example of how it can be implemented:

<iframe src="https://fast.wistia.com/embed/channel/x2dh"
   height = "900px" 
   width = "1200px" 
   style = "2px solid red">
 </iframe>

Answer №2

To easily integrate Wistia videos into your website, you can directly insert the Wistia embed element tag into your HTML code.

<div class="frame">
  <!-- wistia_embed section -->
  <iframe src="https://fast.wistia.net/embed/iframe/avk9twrrbn" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="620" height="349"></iframe>

  <!-- alternative option -->
  <div class="wistia_embed wistia_async_j38ihh83m5" style="height:349px;width:620px">&nbsp;</div>
</div>

Remember to add the Wistia script to your header or body element, but make sure it is placed outside of any Vue components.

<script src="https://fast.wistia.net/assets/external/E-v1.js" async></script>
...

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

attempting to embed a .js.erb file within a webpage

Struggling to incorporate js.erb script into my view for a polling-based chat feature. What seemed straightforward at first has turned into a complex task. Snippet of the js.erb script: $( document ).ready(function() { $(function() { setT ...

Steps to populate an array in a mongoose schema post creation:

I am faced with the challenge of working with two different schemas: var UserSchema = new Schema({ provider: String, username: String, ... categories: [{type: Schema.Types.ObjectId, ref: 'Category'}], ... }); export default mongoose.m ...

What might be causing the delay in synchronization between the state in my parent component?

import React, { Component } from "react"; import "./Game.css"; class Game extends Component { static defaultProps = { list: ["rock", "paper", "scissors"] }; constructor(props) { super(props); this.state = { play: false, rando ...

Guide to Chrome's Document Object Model and JavaScript Reference

Does Chrome have a Javascript/DOM Reference page similar to the Mozilla Developer Network? I am curious about other websites that provide detailed information on Chrome's specific interpretations of web standards. ...

Adding a component to a slot in Vue.js 3

My Goal I aim to pass the Component into the designated slot. The Inquiry How can I effectively pass the Component into the slot for proper rendering? It works well with strings or plain HTML inputs. Additional Query If direct passing is not feasible, ...

Fetching server-side data for isomorphic React app: A guide to accessing cookies

Currently, I am in the process of developing an isomorphic/universal React + Redux + Express application. The method I use for server-side data fetching is quite standard: I identify the routes that match the URL, call the appropriate data-fetching functio ...

The cdkDropList in Angular's drag and drop feature does not support the application of element styles

Just wanted to share my experience in case it helps someone else out there! I've been working on an Angular project where I needed to create a Trello-like application. To enable dragging elements from one list to another, I installed the Angular cdk ...

Add a container element resembling a div inside a table without implementing the table layout

I am working with a table that is rendered by DataTable, and I have the requirement to dynamically append new elements inside the table like this: The dark grey area represents the new DOM elements that need to be inserted dynamically. The first row cont ...

Leveraging Handlebars Object within JavaScript

Is there a way to pass an entire object into javascript directly? I've tried using the {{{data}}} and {{data}} methods as suggested in other posts, but it doesn't seem to be working for me. Here's what I have in my handlebars file: <scri ...

Google Feed API - Retrieving saved data from RSS feed cache

We have implemented the Google Feed API to display our latest blog posts on our website. However, even after 24 hours, our most recent post is still not appearing on our site. Despite confirming that the RSS feed contains the newest content, it seems that ...

Django: Comparing the benefits of embedding JavaScript in templates versus loading it externally

My current project involves incorporating JavaScript functionality to allow for commenting without the need to refresh the page. This works seamlessly when I embed the JavaScript directly into the template. However, when I extract the JavaScript code into ...

Modify the current item in the array of vuex objects

In my development project, I have opted for the latest version of Nuxt JS 2.8.1 to create a hybrid app. To ensure efficient data storage and accessibility throughout various pages, components, and layouts, I am utilizing the modules mode of Vuex as per the ...

Using React hook form to create a Field Array within a Dialog component in Material UI

I have a form with custom fields added via Field Array from react-hook-form, and everything is functioning properly. However, I recently implemented drag and drop functionality for the property items to allow reordering them. Due to the large number of fie ...

Guide on utilizing Subscribe Observable for performing lookup in Angular

I am new to Angular and seeking guidance as my approach may not be the best. Please advise me on a better solution if you have one. My goal is to display a list of records in table format, retrieved from the database where only Foreign Keys IDs are availa ...

Iterating through a collection of objects, triggering a promise for each object and recording its completion

I have encountered a challenge where I need to iterate through an array of objects obtained from a promise, and for each object in the array, I must invoke another promise. After all these promises are executed, I want to display "DONE" on the console. Is ...

`What can be done if ng-if is not responding?`

I'm facing an issue where I want to display a link <a href> only when a certain condition is met, but the link doesn't show up as expected. I have already attempted to experiment with changing the position of the code (inside or outside of ...

How can I create a custom Sweet Alert button in JavaScript that redirects to a specific webpage when clicked?

Here's what I have in my code: swal({ title: 'Successfully Registered!', text: "Would you like to proceed to the Log In page?", type: 'success', showCancelButton: true, confirmButtonColor: '#308 ...

What is the best way to extract information from a JSON XHR request and incorporate it into my template?

I am brand new to using Ember. Right now, my main goal is to connect to an API that provides random text and then show that text on a webpage. The specific API endpoint I am using is "" which will give back a response in JSON format. app/controllers/rando ...

Unable to locate element in Internet Explorer when using frame switching within Selenium

I am currently working on a project in Selenium that is specifically designed to run in Internet Explorer, but I am encountering issues locating the xpath element. Despite this setback, I managed to make progress in the test by using the switch frame func ...

Pattern matching using regular expressions can detect any number from 1 to 9 except for 2

Looking for a regular expression pattern that can match any number from 1 to 9, excluding the number 2? Here's my attempt: ([1-9][^2]) Unfortunately, this pattern doesn't seem to be working for me. ...