Video element not playing content of shared screen

I am trying to build my custom video conferencing using mediasoup. I am totally new to WebRTC and mediasoup. I already built my own SFU script that handles things like producers, consumers, whiteboard events … etc.

I started building a simple mediasoup-client script to connect to a room and share events among peers in the same room. My problem is with sharing screens in general, the event is sent successfully with creating producer and the other users get the mediatrack that the producer is sharing but when creating a video element and setting its srcObject to the track. Everything is set successfully but when testing it locally with 2 different tabs, the video element is created with the srcObject but nothing is actually showing in the video. Not even a black screen.

mediasoup-config.js:

module.exports = {
mediaCodecs: [
    {
        kind: "audio",
        mimeType: "audio/opus",
        clockRate: 48000,
        channels: 2,
    },
    {
        kind: "video",
        mimeType: "video/VP8",
        clockRate: 90000,
        parameters: {
            "x-google-start-bitrate": 1000,
        },
    },
],
};

shareScreen function:

async function shareScreen() {
const screenStream = await navigator.mediaDevices.getDisplayMedia({
    video: true
});

const screenTrack = screenStream.getVideoTracks()[0];

await sendTransport.produce({
    track: screenTrack,
    appData: { mediaType: 'screen' }
});

console.log('Shared screen track readyState:', screenTrack.readyState);
console.log('Screen track:', screenTrack);

localVideo.srcObject = screenStream;
localVideo.autoplay = true;
localVideo.playsInline = true;
}

handleNewConsumer function:

function handleNewConsumer(consumerData) {
console.log(consumerData);

const { id, kind, rtpParameters, producerId } = consumerData;

console.log('New consumer', consumerData);

recvTransport.consume({
    id,
    producerId,
    kind,
    rtpParameters,
}).then(consumer => {
    const stream = new MediaStream();
    stream.addTrack(consumer.track);

    console.log('Remote stream tracks:', stream.getTracks());
    console.log('Consumer track:', consumer.track);
    console.log('Track readyState:', consumer.track.readyState);
    console.log('Track muted:', consumer.track.muted);

    const remoteVideo = document.createElement('video');
    remoteVideo.autoplay = true;
    remoteVideo.playsInline = true;

    remoteVideo.onerror = (event) => {
        console.error('Video playback error:', event, remoteVideo.error);
    };

    remoteVideo.addEventListener('loadedmetadata', () => {
        console.log('Remote video loaded metadata:', remoteVideo.videoWidth, remoteVideo.videoHeight, remoteVideo.duration);
        remoteVideo.play().catch(err => {
            console.error('Auto-play failed:', err);
        });
    });

    remoteVideo.addEventListener('resize', () => {
        console.log('Remote video resized to:', remoteVideo.videoWidth, remoteVideo.videoHeight);
    });

    consumer.track.addEventListener('unmute', () => {
        console.log('Track unmuted, setting srcObject');
        remoteVideo.srcObject = stream;
        console.log('Remote video srcObject set:', remoteVideo.srcObject);
    });

    if (consumer.track.readyState === 'live' && !consumer.track.muted) {
        console.log('Track already live and unmuted, setting srcObject');
        remoteVideo.srcObject = stream;
        console.log('Remote video srcObject set:', remoteVideo.srcObject);
    }

    remoteVideos.appendChild(remoteVideo);
    console.log('Remote video element appended:', remoteVideo);
});
}

Failed loki js test ci

Can someone help me with this error ? Failed loki test command as local as remote in github

loki test v0.35.0 (node:15993) NOTE: The AWS SDK for JavaScript (v2)
is in maintenance mode. SDK releases are limited to address critical
bug fixes and security issues only.

Please migrate your code to use AWS SDK for JavaScript (v3). For more
information, check the blog post at https://a.co/cUPnyil (Use node --trace-warnings ... to show where the warning was created) FAIL chrome.app
Fetching stories
Failed fetching stories because the server is down
Try starting it with “yarn storybook” or pass the –port or –host arguments if it’s not running at http://10.242.224.33:15504 Some visual tests failed to run

storybook builded fine but by some reason it can’t finish run loki test

here my scripts

"scripts": {
    "start": "webpack server --env port=3000",
    "build:prod": "webpack   --env mode=production",
    "build:dev": "webpack   --env mode=development",
    "lint:ts": "eslint "**/*{ts,tsx}"",
    "lint:ts:fix": "eslint "**/*{ts,tsx}" --fix",
    "lint:scss": " npx stylelint "**/*.scss"",
    "lint:scss:fix": " npx stylelint "**/*.scss" --fix",
    "test:unit": "jest --config ./config/jest/jest.config.ts",
    "test:ui": "npx loki test",
    "test:ui:ok": "npx loki approve",
    "test:ui:ci":  "npx loki --requireReference update --reactUri file:./storybook-static",
    "storybook": "storybook dev -p 6006 -c ./config/storybook",
    "storybook:build": "storybook build -c ./config/storybook"   
}

here my loki settings in json file

"loki": {
    "configurations": {
      "chrome.laptop": {
        "target": "chrome.app",
        "width": 1366,
        "height": 768,
        "deviceScaleFactor": 1,
        "mobile": false
      },
      "chrome.iphone7": {
        "target": "chrome.app",
        "preset": "iPhone 7"
      }
    }
  }

Can not initiate js circle progress in Gutenberg FSE

I have created a custom Gutenberg block via npx @wordpress/create-block called stat-block, I have index.js, edit.js, save.js, view.js and block.json. I believe I have everything setup correctly as all my attributes are getting saved and the circle-progress is rendering correctly on the frontend, however the backend within the FSE is not initiating the circle-progress element. What am I doing wrong in my code?

import { useBlockProps, RichText, InspectorControls } from '@wordpress/block-editor';
import { PanelBody, RangeControl } from '@wordpress/components';
import { useEffect } from '@wordpress/element';
import CircleProgress from 'js-circle-progress';

export default function Edit({ attributes, setAttributes }) {
    const { text, percentage } = attributes;

    const blockProps = useBlockProps({
        className: `stat-block`,
    });

    useEffect(() => {
        const cp = new CircleProgress();
    }, [percentage]);

    return (
        <>
            <InspectorControls>
                <PanelBody title="Stat Percentage">
                    <RangeControl
                        label="Stat Percentage"
                        value={percentage}
                        onChange={(value) => setAttributes({ percentage: value })}
                        min={0}
                        max={100}
                        step={1}
                    />
                </PanelBody>
            </InspectorControls>

            <div {...blockProps}>
                <RichText
                    tagName="div"
                    className="stat-text"
                    value={text || ''}
                    onChange={(value) => setAttributes({ text: value })}
                    placeholder="Add stat text"
                    allowedFormats={['core/bold', 'core/italic']}
                />

                <circle-progress value={percentage} max="100"></circle-progress>
            </div>
        </>
    );
}

Razor C# DataTable to Javascript Array

i have datatable in Razor Project with rows contain id,Name,title,parent, fields… and i need to bind javascript array like below, but
dynamically, so i try this code and i have got an error… please help


var testData = [
        { id: 1, name: "John", title: "CEO", parent: 0 }, { id: 2, name: "Tom", title: "SellManager", parent: 1 }, { id: 3, name: "Jerry", title: "SupportManager", parent: 1 }, { id: 4, name: "Robert", title: "SellExpert", parent: 2 },
 ];

var testData = [];
@foreach (DataRow row in Model.Table_Public.Rows)
{
   <text>
        testData.push({id:@row["id"], Name:@row["Name"],title:@row["Title"],       parent:@row["parent"]});
   </text>
}
alert(testData);


 @foreach (DataRow row in Model.Table_Public.Rows)
 {
     ScriptTemp += "{ id: " + row["id"] + ", name: '" + row["Name"] + "', title: '" + row["Title"] + "', parent: " + row["Parent"] + " },";
     
 }

<script>
var testData = [@ScriptTemp];
alert(testData);
</script>

How can I use ‘stats-base-dists-chisquare’ in SVG using JavaScript?

In SVG file, I written some JavaScript code to calculate chisquare.cdf values.
After searching a lot, I find following code that seems to be for me:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg id="chi-square_pdf"
  version="1.1"
  baseProfile="full"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:ev="http://www.w3.org/2001/xml-events"
  >

<script type="module">
    import chisquare from 'https://cdn.jsdelivr.net/gh/stdlib-js/stats-base-dists-chisquare@esm/index.mjs';
    
    let k = 4;
    let y = chisquare.cdf(2.0,k);

</script
</svg>

But when running (loading) this file, browser console is displaying following error message

enter image description here

When I test same thing using HTML, that is working. This problem occurs because SVG is XML and module script are not accepted in XML file.

<!DOCTYPE html>
<html>
<body>
<script type="module">

import roundn from 'https://cdn.jsdelivr.net/gh/stdlib-js/math-base-special-roundn@esm/index.mjs';
import chisquare from 'https://cdn.jsdelivr.net/gh/stdlib-js/stats-base-dists-chisquare@esm/index.mjs';

// Define degrees of freedom:
var k = 5.0;

// Evaluate probability functions:
var x = 3.0;
console.log( 'nEvaluating at x = %d', x );
console.log( 'PDF: %d', roundn( chisquare.pdf( x, k ), -4 ) );
console.log( 'logPDF: %d', roundn( chisquare.logpdf( x, k ), -4 ) );
console.log( 'CDF: %d', roundn( chisquare.cdf( x, k ), -4 ) );

</script>
</body>
</html>

What must I do to use chisquare.cdf() function in SVG file?

I have already tried to use require() function or import statement in normal <script type="text/javascript"> tag, but nothing works.

why my spinner component doesnt take the scheme color selected by the user – Next js +13

YES, I ALREADY ASKED TO CHATGPT.

i am using next js 15.2.3 and i implemented a spinner component that is activated when one navigation occurs, it is works! now i implemented a ThemeProvider (Context) for when the user select between dark mode or light mode. so… my spinner component doesnt paint its background with the theme selected by the user. only that spinner component, the others do take the theme.

below i share my code and then the chatgpt solutions that didn’t work for me:

app/layout.js:

import "./global.css";

export default function RootLayout({children}) {
   return(
      <html lang="en">
         <body>
           <ThemeProvider>
              <GlobalLoader />
              {children}
           </ThemeProvider>
         </body>
      </html>
   );

}

global.css

body.light {
   --background: #fff;
   --foreground: #000;
   background: var(--background);
   color: var(--foreground);
}

body.dark {
   --background: #000;
   --foreground: #fff;
   background: var(--background);
   color: var(--foreground);
}

ThemeProvider

"use client";

import { createContext, useContext, useEffect, useState } from "react";

const ThemeContext = createContext();

export function ThemeProvider({ children }) {
    const [theme, setTheme] = useState(() => {
        if (typeof window !== "undefined") {
            const storedTheme = localStorage.getItem("theme");
            if (storedTheme) return storedTheme;

            const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
            return prefersDark ? "dark" : "light";
        }

        return "light";
    });

    useEffect(() => {
        document.body.classList.remove("light", "dark");
        document.body.classList.add(theme);
        localStorage.setItem("theme", theme);
    }, [theme]);

    return (
        <ThemeContext.Provider value={{ theme, setTheme }}>
            {children}
        </ThemeContext.Provider>
    );
}

export const useTheme = () => useContext(ThemeContext);

in my switch component to change the theme only i do:

const {theme, setTheme} = useTheme();
<input onChange((e) => e.target.checked ? "light" : "dark") />

it works! except the question…

GlobalLoader:

export default function GlobalLoader() {
    const pathname = usePathname();
    const [spinner, setSpinner] = useState(false);

    useEffect(() => {
        setSpinner(true);

        const handleLoad = () => {
           setSpinner(false);

        };

        const handleBeforeUnload = () => {
            setSpinner(true);
        };

        window.addEventListener("load", handleLoad);
        window.addEventListener("beforeunload", handleBeforeUnload);

        return () => {
            window.removeEventListener("load", handleLoad);
            window.removeEventListener("beforeunload", handleBeforeUnload);
        };
    }, [pathname]);

    if (spinner) return null;

    return <Spinner/>;

Spinner:

export default function Spinner() {
    return (
        <section className={`${style.wrapper} ${style.dark}`}>
            <div className={`${style.spinner}`}>
                <i></i>
                <i></i>
                <i></i>
                <i></i>
                <i></i>
                <i></i>
                <i></i>
                <i></i>
            </div>
        </section>
    );

Spinner.module.css

section.wrapper {
    padding: 40px 0;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 500;
}

section.wrapper.dark {
    background: var(--background);
    display: flex;
    justify-content: center;

    transition: background-color 1s ease;
}

at begin i had global.css like this:

:root {
   /* light by default */
   --background: #fff;
   --foreground: #000;
}

@media(prefers-color-scheme: dark) {
   --background: #000;
   --foreground: #fff;
}

and works! my spinner component has background by default system ( win10 ), but i want that change with de user select-

GPT told me the problem is that my spinner component it build before the theme is apply on html tag or body tag. it suggested me to do below (no one suggestions works for me):

1: define a script that applies theme before it rendered:

<head>
   <script dangerouslySetInnerHTML={{
      __html: `
         (function(){
            const stored = localStorage.getItem("theme");
            const theme = stored || (window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
            document.documentElement.classList.add(theme);
         })();
      `,
   }} />
</head>

2: apply the theme on html tag from my ThemeProvider:

useEffect(() => {
   // ThemeProviderComponent
   document.documentElement.classList.remove("light", "dark");
   document.documentElement.classList.add(theme);
   localStorage.setItem("theme", theme);
}, [theme]);


// changes global.css to:
html.light {
   --background: #fff;
   --foreground: #000;

   background: var(--background);
   color: var(--foreground);
}

html.dark {
   --background: #000;
   --foreground: #fff;

   background: var(--background);
   color: var(--foreground);
}

3: wait until my spinner it had mounted on my GlobalLoader:

// GlobalLoader
const [mounted, setMounted] = useState(false);

useEffect(()=>{
   setMounted(true);
}, []);

...

if(!mounted) return null; // here it does not show my spinner

if(spinner) return null;

return <Spinner />

anomaly: if in this line if (spinner) return null
i deny with !: if (!spinner) return null
my spinner it will be showing forever with the background selected by the user, if it is select light or dark, it is draw… akward. ( i must select the theme before and then negate the state variable because it does not let me afterwards)

and that is all, i have no idea why this problem occurs…

How to test ref assignment inside a mapped component using a custom Checkbox with forwardRef in React?

Issue

I’m testing a React component that renders checkboxes from a third-party library. I assign each checkbox a ref using useRef({}) and attach a change event listener in useEffect. This works in the browser, but in tests, console.log of ref.current is empty and the listeners are never added.

Setup

Component:

const checkBoxRef = useRef({});

useEffect(() => {
console.log(checkBoxRef.current)
  Object.entries(checkBoxRef.current).forEach(([_, el]) => {
    if (el) el.addEventListener("change", () => {});
  });
}, [fields]);

<Checkbox
  ref={(el) => { checkBoxRef.current[index] = el; }}
  checked={fieldItem.value === "Yes"}
/>

Mock:

jest.mock("external-checkbox-library", () => ({
  Checkbox: React.forwardRef(({ checked, ...props }, ref) => (
    <input ref={ref} type="checkbox" checked={checked} {...props} />
  )),
}));

Question

  • How can I properly test that refs are assigned and listeners attached?

Looking for best practices when working with refs in tests, especially with third-party components.

i can’t build a turbo-repo chatgpt enable to solve my problem

i have used commands like
npx create-turbo@latest
Rename the two Next apps to
user-app
merchant-app
Add tailwind to it.
cd apps/user-app
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

cd ../merchant-app
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
but i am getting error like
S D:mynextfilespaytmrepoappsuser-app> npx tailwindcss init -p

npm error could not determine executable to run
npm error A complete log of this run can be found in: C:UsersThinkpadAppDataLocalnpm-cache_logs2025-04-26T01_47_21_894Z-debug-0.log
HELP ME FIX IT (i used chat gpt too build it is trying to waste my time going to offtopic always and not fixing my error)

What’s the difference between the call stack, event loop, task queue, and microtask queue in JavaScript?

Sure! Here’s an expanded version of the theory-based async question body that meets the 220-character minimum for Stack Overflow:


Body:

I’m trying to get a deeper understanding of how JavaScript handles asynchronous behavior. I often hear about the call stack, event loop, task queue (aka callback queue), and microtask queue, especially when dealing with things like setTimeout, Promises, and async/await.

I get that JavaScript is single-threaded and uses the event loop to manage asynchronous code, but I don’t fully understand how these parts interact. Specifically:

  • What exactly is the difference between the task queue and microtask queue?
  • Why does a Promise.then() run before a setTimeout() even when both are async?
  • How do async/await and Promise chains fit into the microtask queue?
  • In what order are these executed when mixed together?

A clear breakdown of how these pieces work together (especially with an example or timeline) would be really helpful. I want to write more predictable asynchronous code and avoid hidden timing issues. Thanks!

Can’t embed YouTube videos in React.js

I am trying to embed a youtube video in my react.js website, I have tried multiple different code samples in my file as seen below:

<h1>Embedd Test1</h1>

<YouTube videoId="6pH4Ot-vFlc" />

<div>
    <iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;"
        allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/nqO6cEbXyKM"
        width="560"></iframe>
</div>

<h1>Embedd Test2</h1>
<iframe width="420" height="315" src="https://www.youtube.com/embed/fnqO6cEbXyKM"></iframe>

<h1>Embedd Test3</h1>
<iframe width="872" height="499" src="https://www.youtube.com/embed/nqO6cEbXyKM"
    title="Error fixed &quot;www.youtube.com refused to connect&quot; when trying to embed video in blogs or html page"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
    referrerpolicy="strict-origin-when-cross-origin" allowfullscreen>
</iframe>

But all of my embedded youtube videos always appear as “www.youtube.com refused to connect.” both on localhost or in production at the url here: https://jermasearch.com/discogs2youtube

How can I embed YouTube videos in my react.js website? Is it a cors issue?
enter image description here

Getting proper rendering of local sourced HTML/CSS/JS from within iframes for game GUI (no gaming code)

I’ve uploaded a first set of files to my GitHub account as follows (no gaming logic, only layout and GUI aspects so far):

This is an iteration in the development of the GUI for an internet-based, peer-to-peer, browser-to-browser, 2-player version of the well-known Battleship game.

The development status is “early stages of methods selection”. I am absolutely a novice JavaScript programmer, having only done programming by example, leveraging my previous professional experience with other languages (C, Pascal, Bash, Fortran, Graftek Agile) and some very limited ad-hoc Python programming.

At this point, because other approaches did not appear to be as simple or workable, the “iframe” approach for “importing” external content has been used, but with apparent limited success. The issue encountered are:

  • the apparent inability to fully control the sizes and placement of iframes within clearly defined parent “div” elements (inconsistencies between grid specifications and element style values required to make things “fit”);

  • the apparent inability to use “global” CSS files for content within the iframes; and

  • the apparent inability to reference “global” JavaScript variables/objects from within the iframes.

It would be much appreciated if anyone could offer specific/detailed

  • explanations as to why these issues have arisen, and

  • coding changes that would address the issues encountered, while adhering to the conditions of using ONLY basic vanilla JavaScript, no external web-based libraries/frameworks, so that two independant, non-co-located computers could play the game with nothing more than installing distro-standard packages/libraries that have purely desktop-based dependencies (no use of third-party resources; Is this even possible ???).

I’m beginning to suspect possible impact/restrictions originating from “Content Security Policy”, but different attempts at setting that in the tag have failed to produce any visible change in behaviour or rendered output.

Thank you in advance for sharing your insights and experience.

Current Layout of GUI (work-in-progress):

Current Layout of GUI

Why is my JavaScript shuffle and selection game not properly detecting the correct guess after shuffling?

I am working on a simple animal card shuffle game using plain JavaScript, where:

The user selects an animal card.

Then presses “Start” to shuffle the cards randomly at a selected speed.

After shuffling, all cards are hidden, and the user has to guess their chosen animal.

I tried assigning the user’s selected animal to a variable before the shuffle and then comparing it during the guessing phase. I expected that when the user clicked the correct hidden card, the game would recognize the match and display a “Correct” message while updating the score. However, sometimes even after clicking the right card, it incorrectly shows “Try Again.” I suspect the issue lies in how the selection and guess are being handled after shuffling

Google App Script: setOwner(emailAddress) method returns a Exception: Access denied: DriveApp error? Is there a fix to this?

function transferOwnership() {

  const fileId = "some-sheet-id-that-i-own";
  const newOwnerEmail = "[email protected]"
  const file = DriveApp.getFileById(fileId);
  const owner= file.getOwner().getName();
  
  console.log(owner); // Successfully loggs my name
  file.addEditor(newOwnerEmail); // Successfully adds newOwnerEmail as an editor
  file.revokePermissions(newOwnerEmail); // Succesffully removes newOwnerEmail as an editor 
  file.setOwner(newOwnerEmail); // Returns Access Denied Exception. 

}

I added the .addEditor and .revokePermisisons methods to showcase that the drive api works and I’m able to execute them without error. If you give this a try on your own I believe you’d run into the same issue. I wanted to pass the fileId as an argument to use the function within a for loop in order to transfer ownership for some of the files and sheets I own to my other account instead of doing it manually. But when I try to run this function the .setOwner() method always gives me the Exception: Access denied: DriveApp error.

I got stuck with the documentation and when I tried to use gpt it gave the following reason:

If you’re using a Gmail account (e.g. @gmail.com) and trying to transfer ownership to another Gmail account, setOwner() will always fail — even though the method exists and no clear error is in the docs.

✅ This only works in Google Workspace, and only within the same domain (like [email protected][email protected]).

Thing is I don’t really trust it because I usually get mistakes when using it for code, and when I tried to google if the domain is the reason I found nothing, also the documentation https://developers.google.com/apps-script/reference/drive/file doesn’t say anything about exceptions. I feel very stuck here and would appreciate any help or work around or even a discussion.

Thank you.

Odoo Contact Form won’t Autofill correctly

I’m using odoo for my webstore and want to an “inquire” button on each product that goes to contact page with the product name passed in the url and then autofilled into the contact form.
Currently, I have been able to get the url to pass the variable as so mywebsite.com/contactus?product_name=Productname I also have a script on the contact page that should be inputting it into the form.

function getQueryParam(param) {
   const urlParams = new URLSearchParams(window.location.search);
   return urlParams.get(param);
   }
const productName = getQueryParam('product_name');
if (productName) {
   const productField = document.getElementById('product_name');
   if (productField) {
      productField.value = decodeURIComponent(productName);
   }
}

What seems to happen is that the moment the page loads it gets filled and then immediately gets cleared. Not sure why though. Here’s the code to the webpage- I’m trying to autofill into the “Subject” which id is “obmoxynau18w” on the form (I think that’s an odoo thing):

<t name="Contact Us" t-name="website.contactus">
        <t t-call="website.layout">
            <t t-set="logged_partner" t-value="request.env['website.visitor']._get_visitor_from_request().partner_id"/>
            <t t-set="contactus_form_values" t-value="{                 'email_to': res_company.email,                 'name': request.params.get('name', ''),                 'phone': request.params.get('phone', ''),                 'email_from': request.params.get('email_from', ''),         'subject': request.params.get('subject', ''),        'company': request.params.get('company', ''),                              }"/>
            <span class="hidden" data-for="contactus_form" t-att-data-values="contactus_form_values"/>
            <div id="wrap" class="oe_structure oe_empty">
                <section class="s_title parallax s_parallax_is_fixed bg-black-50 pt24 pb24" data-vcss="001" data-snippet="s_title" data-scroll-background-ratio="1" data-name="Title">
                    <span class="s_parallax_bg oe_img_bg" style="background-image: url('/web/image/website.s_parallax_default_image'); background-position: 50% 0;"/>
                    <div class="o_we_bg_filter bg-black-50"/>
                    <div class="container">
                        <h1>Contact us</h1>
                    </div>
                </section>
                <section class="s_text_block pt40 pb40 o_colored_level" data-snippet="s_text_block" data-name="Text">
                    <div class="container s_allow_columns">
                        <div class="row">
                            <div class="col-lg-7 mt-4 mt-lg-0 o_colored_level">
                                <p class="lead">
                                    Contact us about anything related to our company or services.<br/>
                                    We'll do our best to get back to you as soon as possible.
                                </p>
                                <section class="s_website_form" data-vcss="001" data-snippet="s_website_form" data-name="Form">
                                    <div class="container">
                                        <form id="contactus_form" action="/website/form/" method="post" enctype="multipart/form-data" class="o_mark_required" data-mark="*" data-model_name="mail.mail" data-success-mode="redirect" data-success-page="/contactus-thank-you" data-pre-fill="true">
                                            <div class="s_website_form_rows row s_col_no_bgcolor">
                                                <div class="s_website_form_field mb-3 col-lg-6 s_website_form_custom s_website_form_required" data-type="char" data-name="Field" data-translated-name="Field"><label class="s_website_form_label" style="width: 200px" for="ocx8y6rcmnqv"><span class="s_website_form_label_content">Name</span><span class="s_website_form_mark">     *</span></label><input class="form-control s_website_form_input" type="text" name="Name" required="1" placeholder="" id="ocx8y6rcmnqv" data-fill-with="name"/></div>
                                                <div class="mb-3 col-lg-6 s_website_form_field s_website_form_custom" data-type="char" data-name="Field">
                                                    <label class="s_website_form_label" style="width: 200px" for="contact2">
                                                        <span class="s_website_form_label_content">Phone Number</span>
                                                    </label>
                                                    <input id="contact2" type="tel" class="form-control s_website_form_input" name="phone" data-fill-with="phone"/>
                                                </div>
                                                <div class="mb-3 col-lg-6 s_website_form_field s_website_form_required s_website_form_model_required" data-type="email" data-name="Field">
                                                    <label class="s_website_form_label" style="width: 200px" for="contact3">
                                                        <span class="s_website_form_label_content">Email</span>
                                                        <span class="s_website_form_mark"> *</span>
                                                    </label>
                                                    <input id="contact3" type="email" class="form-control s_website_form_input" name="email_from" required="" data-fill-with="email"/>
                                                </div>
                                                
                                                <div data-name="Field" class="s_website_form_field mb-3 col-12 s_website_form_required" data-type="char" data-translated-name="Field"><label class="s_website_form_label" style="width: 200px" for="obmoxynau18w"><span class="s_website_form_label_content">Subject</span><span class="s_website_form_mark">                                 *</span></label><input class="form-control s_website_form_input" type="text" name="subject" required="1" placeholder="" id="obmoxynau18w" data-fill-with="undefined"/></div>
                                                <div class="mb-3 col-12 s_website_form_field s_website_form_custom s_website_form_required" data-type="text" data-name="Field">
                                                    <label class="s_website_form_label" style="width: 200px" for="contact6">
                                                        <span class="s_website_form_label_content">Question</span>
                                                        <span class="s_website_form_mark"> *</span>
                                                    </label>
                                                    <textarea id="contact6" class="form-control s_website_form_input" name="description" required="" rows="8"></textarea>
                                                </div>
                                                
                                                <div data-name="Field" class="s_website_form_field mb-3 col-12 s_website_form_dnone"><div class="row s_col_no_resize s_col_no_bgcolor"><label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px"><span class="s_website_form_label_content"/></label><div class="col-sm"><input type="hidden" class="form-control s_website_form_input" name="email_to" value="[email protected], [email protected]"/><input type="hidden" value="bbba7c0ac81f75c8eea3b49b91fd29cd4e527f94d413ae6bba168b58737415af" class="form-control s_website_form_input s_website_form_custom" name="website_form_signature"/></div></div></div><div class="mb-0 py-2 col-12 s_website_form_submit s_website_form_no_submit_label text-end" data-name="Submit Button">
                                                    <div style="width: 200px;" class="s_website_form_label"/>
                                                    <a href="#" role="button" class="btn btn-primary s_website_form_send">Submit</a>
                                                    <span id="s_website_form_result"/>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </section>
                                <script>
                                    function getQueryParam(param) {
                                        const urlParams = new URLSearchParams(window.location.search);
                                        return urlParams.get(param);
                                        }
                                        const productName = getQueryParam('product_name');

                                        if (productName) {
                                            const productField = document.getElementById('obmoxynau18w');
                                            if (productField) {
                                                productField.value = decodeURIComponent(productName);
                                                }
                                            }
                                            </script>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </t>
    </t>