Douglas Farias Expert Licensed User Longtime User Aug 7, 2015 #1 Hi all, i m trying to put a video to run on a webview. i have put the webview size B4X: web.SetLeftAndRight(0%x,100%x) web.SetTopAndBottom(0%y,100%y) but the video stay on center, dont go to 100% screen. how can i change the size of the player on webview to put the video 100% of screen? Any way to put this 100%? css etc? Last edited: Aug 7, 2015
Hi all, i m trying to put a video to run on a webview. i have put the webview size B4X: web.SetLeftAndRight(0%x,100%x) web.SetTopAndBottom(0%y,100%y) but the video stay on center, dont go to 100% screen. how can i change the size of the player on webview to put the video 100% of screen? Any way to put this 100%? css etc?
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2015 #2 Can you post the html that you are using to load the video? Upvote 0
Douglas Farias Expert Licensed User Longtime User Aug 7, 2015 #3 i have try with this 2 codes B4X: wv.LoadUrl("http://www.dailymotion.com/video/x2oa18s_une-video-amateur-montre-le-moment-ou-le-seisme-a-frappe-le-tibet_news") ' wv.LoadHtml($"<iframe frameborder="0" width="480" height="270" src="http://www.dailymotion.com/embed/video/x2bi11w" allowfullscreen></iframe><br /><a href="http://www.dailymotion.com/video/x2bi11w_un-sinkhole-engloutit-une-voiture-sur-une-route-de-chine_news" target="_blank">Un "sinkhole" engloutit une voiture sur une...</a> <i>by <a href="http://www.dailymotion.com/lemondefr" target="_blank">lemondefr</a></i>"$) i m try to change de width and height of 2° example but dont work. this 2 options show like the image on center Upvote 0
i have try with this 2 codes B4X: wv.LoadUrl("http://www.dailymotion.com/video/x2oa18s_une-video-amateur-montre-le-moment-ou-le-seisme-a-frappe-le-tibet_news") ' wv.LoadHtml($"<iframe frameborder="0" width="480" height="270" src="http://www.dailymotion.com/embed/video/x2bi11w" allowfullscreen></iframe><br /><a href="http://www.dailymotion.com/video/x2bi11w_un-sinkhole-engloutit-une-voiture-sur-une-route-de-chine_news" target="_blank">Un "sinkhole" engloutit une voiture sur une...</a> <i>by <a href="http://www.dailymotion.com/lemondefr" target="_blank">lemondefr</a></i>"$) i m try to change de width and height of 2° example but dont work. this 2 options show like the image on center
Erel B4X founder Staff member Licensed User Longtime User Aug 8, 2015 #4 You are changing the iframe size not the video size. This code will show it full screen: B4X: WebView1.LoadUrl($"http://www.dailymotion.com/embed/video/x2bi11w"$) Upvote 0
You are changing the iframe size not the video size. This code will show it full screen: B4X: WebView1.LoadUrl($"http://www.dailymotion.com/embed/video/x2bi11w"$)
Douglas Farias Expert Licensed User Longtime User Aug 8, 2015 #5 hmm but in this case i need to make my html video player? i have try u example but dont show full screen. http://sample-videos.com/video/mp4/720/big_buck_bunny_720p_30mb.mp4 what html player are suported by webview like this daylymotion ? Upvote 0
hmm but in this case i need to make my html video player? i have try u example but dont show full screen. http://sample-videos.com/video/mp4/720/big_buck_bunny_720p_30mb.mp4 what html player are suported by webview like this daylymotion ?
Erel B4X founder Staff member Licensed User Longtime User Aug 8, 2015 #6 Try to use the video html5 element. See this question: http://stackoverflow.com/questions/8899404/using-html5-video-tag-in-a-javafx-application Upvote 0
Try to use the video html5 element. See this question: http://stackoverflow.com/questions/8899404/using-html5-video-tag-in-a-javafx-application
Douglas Farias Expert Licensed User Longtime User Aug 8, 2015 #7 with this B4X: Dim sb As StringBuilder sb.Initialize sb.Append("<video width='100%' height='100%' controls>") sb.Append("<source src='http://sample-videos.com/video/mp4/720/big_buck_bunny_720p_30mb.mp4' Type='video/mp4'/>") sb.Append("</video>") show the same on center very strange i have put 100% Upvote 0
with this B4X: Dim sb As StringBuilder sb.Initialize sb.Append("<video width='100%' height='100%' controls>") sb.Append("<source src='http://sample-videos.com/video/mp4/720/big_buck_bunny_720p_30mb.mp4' Type='video/mp4'/>") sb.Append("</video>") show the same on center very strange i have put 100%
Erel B4X founder Staff member Licensed User Longtime User Aug 9, 2015 #8 This code does fill the entire WebView here: B4X: sb.Initialize sb.Append("<video width='100%' height='100%' controls>") sb.Append("<source src='http://sample-videos.com/video/mp4/720/big_buck_bunny_720p_30mb.mp4' Type='video/mp4'/>") sb.Append("</video>") WebView1.LoadHtml(sb.ToString) I guess that it depends on the display driver. Upvote 0
This code does fill the entire WebView here: B4X: sb.Initialize sb.Append("<video width='100%' height='100%' controls>") sb.Append("<source src='http://sample-videos.com/video/mp4/720/big_buck_bunny_720p_30mb.mp4' Type='video/mp4'/>") sb.Append("</video>") WebView1.LoadHtml(sb.ToString) I guess that it depends on the display driver.
Douglas Farias Expert Licensed User Longtime User Aug 9, 2015 #9 I have fixed thx http://www.videojs.com/ i m using this and all its fine now *-* Upvote 0