0

I have an issue when embedding the video channel, I have a script complit, not partial script the script is contain like this

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

if I render it in Html this will make a child element of Div wistia_channel, but when I render it In react this also render the script, not add the child script

thi is how I render it

            .then(response => {
                if (response.Value.length > 1) {
                    this.setState(prevState => ({
                        ...prevState,
                        embededCode: decodeURIComponent(response.Value),                  
                    }));

                    const node = document.createRange().createContextualFragment(this.state.embededCode);
                    this.ref.current.innerHTML = "";
                    this.ref.current.appendChild(node);
                }```

do anybody have the same problem as me before?
Dewa Dwi
  • 105
  • 2
  • 9

0 Answers0