Invalid Entry_Id in reactJS

Hi all. I’m currently trying to make a call to the kaltura api to embed a video in my ReactJS app. The entry_id works correctly in raw HTML and Javascript (Dynamic Embed) but when making a call using the Auto Embed method (https://developer.kaltura.com/player/web/embed-types-web) I get the following error:

‘error: Object { code: “INVALID_ENTRY_ID”, message: “Invalid entry id [“1_hpntfdze”]” }’.

I’m wondering if there is a “correct” way to format the entry id when passing it as a parameter in the URL…?

Hi @fjcampo ,

Please post your full embed code here and we’ll take a look.

Thanks,

Below is both my React and html implementations (I’m getting the same issue using two different assets in the same asset repo, they have the same partnerId, uiconf_id, and targetId)

REACT (The player renders but doesn’t stream video):

import React,{Component} from "react";
import "./styles.css";

export default class VideoPlayer extends Component {
    componentDidMount() {
        const script = document.createElement("script");
        script.async = true;
        script.src = 'https://cdnapisec.kaltura.com/p/3241173/embedPlaykitJs/uiconf_id/47425753?autoembed=true&targetId=VideoPlayer&entry_id=1_hpntfdze';
        document.body.appendChild(script);  
    }
  render() {
    return (
        <div id="VideoPlayer" style={{width: "640px", height: "360px"}}>
            <h1>Video Player</h1>
        </div>
    );
  }
}

HTML (player renders and streams correctly):

<body>
    <div id="my-player" style="width: 640px;height: 360px">
        <script type="text/javascript" src="http://cdnapisec.kaltura.com/p/3241173/embedPlaykitJs/uiconf_id/47425753"></script>
        <script type="text/javascript">
            try {
                var config = {
                    targetId: "my-player",
                    provider: {
                        partnerId: 3241173,
                        uiConfId: 47425753,
                    }
                };
                var kalturaPlayer = KalturaPlayer.setup(config);
                kalturaPlayer.loadMedia({entryId: '1_hpntfdze'});
            } catch (e) {
                console.error(e.message);
            }
        </script>
    </div>
</body>

Hi @jess,
Attached above is my embed code. I don’t think I replied to you directly so idk if you would’ve gotten notifications on the thread