joriolm Posted February 1, 2017 Share Posted February 1, 2017 Hi, I have a question about video in HTML, sorry if it is not the right place to post. I have this in a UniHTMLFrame: <div id="video_container" align="center"> <video id="lab1_video" autoplay muted loop width="100%"> <source src="media/road1.mp4" type="video/mp4"> </video> </div> This code displays my video as a background in the frame, but when I resize browser window, video remains playing with old dimensions. This same code as a pure html file works well when browser resizes. Can you give me a hand on this, please? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2017 Share Posted February 1, 2017 Hi, If it is not difficult for you please can you make a test case (without video file)? Best regards. Quote Link to comment Share on other sites More sharing options...
joriolm Posted February 1, 2017 Share Posted February 1, 2017 Hi, Attached test case. To clarify, if project is built with MainForm as a mfForm, video resizes as browser resizes, but with mfPage option. To reproduce issue (certainly caused by my poor knowledge), just restore browser and maximize again. Thanks in advance for your comments and help. Regards. htmlframevideo1.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2017 Share Posted February 1, 2017 Hi, Thanks for the testcase, we will analyze... Best regards. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 14, 2017 Share Posted February 14, 2017 Hi, Maybe you need just add this CSS in CustomCSS?!: .swiper-slide { width: 100% !important; } Best regards. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted February 24, 2021 Share Posted February 24, 2021 Hello! I'm trying play YouTube video: <!DOCTYPE html> <html> <body> <iframe id="myVideo" width="100%" height="100%"> <src="https://youtu.be/z7vZUIi1pHw" allowfullscreen> </iframe> </body> </html> But, video not showing. UniHTMLFrame is empty: Is it possible work? If "no", may be possible create a new browser window and put link to YouTube video in address string? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 24, 2021 Share Posted February 24, 2021 6 hours ago, Артем said: Hello! I'm trying play YouTube video: <!DOCTYPE html> <html> <body> <iframe id="myVideo" width="100%" height="100%"> <src="https://youtu.be/z7vZUIi1pHw" allowfullscreen> </iframe> </body> </html> But, video not showing. UniHTMLFrame is empty: Is it possible work? If "no", may be possible create a new browser window and put link to YouTube video in address string? Hi You should change your source to embedded one. Please check https://developers.google.com/youtube/iframe_api_reference Quote Link to comment Share on other sites More sharing options...
newsanti Posted April 13 Share Posted April 13 On 10/3/2016 at 3:33 PM, Sherzod said: Hi, Can you try this?! For example: <video src="video.ogv" id="myVideo"> video not supported </video> <script type='text/javascript'> document.getElementById('myVideo').addEventListener('ended',myHandler,false); function myHandler(e) { // What you want to do after the event // ajaxRequest(...); } </script> http://stackoverflow.com/questions/2741493/detect-when-an-html5-video-finishes Best regards. procedure TsnbxUnimCustomApp001MainForm.Run_PLAY(Sender: TObject); begin var oForm:= TMainmForm(Form); oForm.Image1.Visible:= False; var oFrame:= oForm.UnimHTMLFrame1; oFrame.HTML.Text:= '<!DOCTYPE html> '+ ' <html>'+ ' <body>'+ // ' <video id="video01" width= "100%" height="100%" controls muted loop autoplay>'+ ' <video id="video01" width= "100%" height="100%" muted loop autoplay>'+ ' <source src="files/video01.mp4" type="video/mp4">'+ ' </video>'+ ' </body>'+ ' </html> While Video Playing..if user Click on HTLMFrame (Video), How to Stop Playing? or How to Stop Playing with Code? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 13 Share Posted April 13 2 hours ago, newsanti said: While Video Playing If possible, make a simple testcase. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.