api.video-react-player
api.video-react-player copied to clipboard
[Bug]: Wrong URL
Version
^1.0.4
Environment that reproduces the issue
Code Environment: NextJS Version 14.0.4 with app directory
Is it reproducible in the example application?
Not tested
Reproduction steps
- use React Component:
<ApiVideoPlayer video={{id: "li2JucovKs25Ts0T5bzBwmLj", live: true}} controls={["play", "unmute"]}}/>
Expected result
Render Component and show stream / offline screen
Actual result
No component rendered, console is spamming a wrong url to get the live stream from sandbox environment. From my dashboard it should be https://embed.api.video/live/li2JucovKs25Ts0T5bzBwmLj
but its calling:
Additional context
No response
Relevant logs output
No response
Hi @XerxesAkaEnno ,
Thanks for your feedback. Having this 404 is normal if the live is not running. However you should see the component with a message saying that the live stream is offline. Maybe the dimensions of the player isn't set and you can't see it for this reason. Can you try to define height & width :
<ApiVideoPlayer
style={{width: "640px", height: "480px"}}
...