After I added a video to WordPress post, from the text tab, I can see the shortcode:
Screenshoot of shortcode after adding video
The current source of the video is a relative URL: "/wp-content/uploads/...".
What I need is after adding video, the shortcode should be:
"[video width="1280" height="720" mp4="https://mywebsiteurl.com/wp-content/uploads/2018/10/SampleVideo_1280x720_2mb.mp4"][/video]"
which means the source of the video is an ABSOLUTE URL: "https://mywebsiteurl.com/wp-content/uploads/...", not just "/wp-content/uploads/...".
I checked the host setting in wp-config.php, there is a line:
// WP_CONTENT_URL can be set to enable relative URLs to /wp-content
// but if undefined, it simply defaults to absolute URLs.
So I added "//" to this define:
// define('WP_CONTENT_URL', 'https://mywebsiteurl.com/wp-content/');
This works for all images and in the attachment detail (even for the attachment details of video media), the URL shows absolute link.
But, adding video still generates a relative URL. What am I doing wrong?