api.video-react-player icon indicating copy to clipboard operation
api.video-react-player copied to clipboard

[Bug]: Wrong URL

Open XerxesAkaEnno opened this issue 1 year ago • 1 comments

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

  1. 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: wrong_url

Additional context

No response

Relevant logs output

No response

XerxesAkaEnno avatar Dec 14 '23 15:12 XerxesAkaEnno

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"}}
  ...

olivierapivideo avatar Dec 20 '23 14:12 olivierapivideo