HTML embed only displays after manually resizing or inspecting element
Posted: 23 Jun 2017 20:59
Hello all.
I'm trying to embed a VLC player into a webpage, feeding it a live stream from a camera of mine. Unfortunately, I've encountered an issue that I haven't been able to find a solution for. Nothing at all will display when the page is first loaded, with the stream only appearing after opening or closing the inspect element toolbar or manually resizing the page. Using JS to alter the dimensions of the page does not cause the player to display, though using any other function that alters the size of the window, from maximizing/minimizing to telling the computer to cascade windows does cause the player to display.
Once the player has been made to display through the above means, the feed works perfectly.
The relevant code is:
Am I forgetting a display setting? I couldn't find a relevant one in the documentation. Alternatively, is there a method I can call on page load that will force the player to display?
I'm trying to embed a VLC player into a webpage, feeding it a live stream from a camera of mine. Unfortunately, I've encountered an issue that I haven't been able to find a solution for. Nothing at all will display when the page is first loaded, with the stream only appearing after opening or closing the inspect element toolbar or manually resizing the page. Using JS to alter the dimensions of the page does not cause the player to display, though using any other function that alters the size of the window, from maximizing/minimizing to telling the computer to cascade windows does cause the player to display.
Once the player has been made to display through the above means, the feed works perfectly.
The relevant code is:
Code: Select all
<object
classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab"
id="vlc"
name="vlc"
class="vlcPlayer"
events="True">
<param name="src" value="rtsp://camera_url_here">
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="True" />
<param name="AutoPlay" value="True" />
</object>