I had your problem. You want your users to pass the video tutorial as a backup, but the naive user does not know what the inline link is, it just copy and paste the URL from the browser and paste it, which will not be inline, but you can convert It. Check out this example:
Original video: - https://www.youtube.com/watch?v=qaiLSpqeBHY
Embedded video: - https://www.youtube.com/embed/qaiLSpqeBHY
Let's see how you can convert it:
const OriginalVideo = "https://www.youtube.com/watch?v=qaiLSpqeBHY" const SplitedVideo = OriginalVideo.split("watch?v=") const Embed = SplitedVideo.join("embed/") console.log(Embed)
Here is your embedded video converted from the original video URL.
Life example: -
componentDidMount() { const Video = this.props.navigation.getParam("Video"); const MyVideo = Video.split("watch?v="); const EmbededVideo = MyVideo.join("embed/"); this.setState({ Video: EmbededVideo }); }
source share