Flutter Video Player appears on second time webpage loads and overlay buttons not functional - flutter

Link: Website
Problem: The video on the front page below the video banner does not render until you navigate away from the page and return back. When the video finally appears and plays, the play button does not work. Is there a way to have the video appear on first appearance and have the overlay work as expected.
I am using the latest video_player widget to play the video. Other videos I have implemented work just fine.
When I debug my flutter web application, the application pauses at videoController.play() inside initState(). I continue execution to see if there is was an exception, but nothing new shows in debug console.

One solution I found to work is by setting the volume to 0 then starting the video.
This allows the video to play, but the overlay still not functioning as expected, so I just removed it. For now it works, but still wondering on how the overlay can be implemented.

Related

How to stop the video player from playing when moving from one page to another

I am using video_player package for displaying a video. I have written the video player inside separate class. The issue is, during the video playing, when I try to close the page by pressing back button, a bottomsheet will be presented on the screen. After clicking on the bottom sheet, the user will be navigated to another page. During this process, the audio from the video_player is heard.
If we are not using bottomsheet and directly pressing backbutton, the video_player is properly disposed.
Have anyone encountered this scenario before?
Try calling pop() before navigating to new page from bottom sheet.
Keep me posted.

Tips on using webview to play an embedded Flash movie

I've tried (without success) to get a video to play within a webview. I can see the video thumbnail with the default play button overlaying the video.
When I click the play button - the entire video hi-lights in transparent yellowish/orange. Clicking play again causes the Play button to blink. The thumbnail always remains, but never plays. I can even see the timeline below the video with the play-head, etc. I can never touch the video controls, because every click treats the entire video like one big button - and hi-lights like mentioned above.
They are numerous videos to be played and they are not at YouTube, so launching the YT player with an intent isn't desired.
I'm using SDK 8 (2.2), runing on a 2.3.6 device, and Have the latest Flash Player 11.xxxxx installed.
Any suggestions?
Took another approach in the app.

Adding a YouTube video to my application

I am trying to embed a YouTube video in my application, and I am going through this tutorial as a start. I get the red screen when I run it on the stimulator, so I presume everything went well.
Now when the user taps on the screen while the video is playing I need a toolbar to appear, with a slider showing the length of the video (and the user could slide to his/her desired time on the video).
I need to know if this feature comes by default when you embed the YoutTube video, or do i have to code it? If i have to code it how should i do it? Any sample codes or tutorial?
The only way to show a YouTube video in an iOS app is by having it inside a UIWebView (that is what the tutorial walks you through). Once the user taps the "play" button, the video should go full screen and automatically present the standard video controls that you see when you play videos on iOS.
Youtube provides the HTML code for embedding videos in web pages. This HTML code will also produce a video when embedded in a UIWebView. While the video is playing, all of the standard Youtube video controls (Play, Pause, Time Slider) should also show up in the UIWebView.

Issue exiting video after playing(ios phonegap app)

I am currently using iwebkit and phonegap together. Once everything is compiled and tested on an idevice, I can click a video link and get it to play. It play full screen but it uses the ios web video player (the one that doesn't have the "done" button" and the top and has a bar that spans the bottom of the screen. I can then press the full screen button to have it use the regular ios media player but when i click done from that, it doesn't take me back to the part of the app before the video, it just takes me to the full screen video in the web player. I hope someone can help me solve this and I hope I was able to describe my problem in a clear way. I've spent 2 hours searching and have come up with nothing.
I'm having the same problem. iOS 4.3.x introduced this problem as far as I can tell. There's a few comments about it on Apple's developer site but so far I haven't found any solution. Part of the problem seems to be Phonegap because I experience the exact same thing you describe when running the compiled app. However, if I simply browse to the same HTML pages it seems to work fine. Note - I changed from directly linking to video files to using the HTML5 tag. Using the tag works better than direct linking in Phonegap -- the videos still open in the player but when you click the Done button it returns to where it was. Keep in mind that if you do this the video will be on the inline in the page and paused but when you click the play button it opens in the player. The only problem I've found with this solution is that it won't rotate when you change from portrait to landscape when running in the phonegap app but it does rotate when browsing to the video in mobile safari. Not sure if any of that helps. I would be interested in what you've been able to work out since you posted.

YouTube javascript API accessible via UIWebView on iPad?

I can't seem to get this working using stringByEvaluatingJavascriptFromString. Apparently the webview does something peculiar to youtube videos (due to the YouTubePlugIn.webplugin perhaps?) and the javascript API is unusable.
The problem I'm having: How do I pause\stop a video when the user navigates away from a UIWebView with an embedded YouTube video?
Right now the only thing I can think off is reloading the view from a string before navigating away... but that seems heavy and hackish.
Has anyone had any luck with this?
Loading an empty string is the only thing I have found that works right now.
I am trying to play the video in a popover, and clicking off the popover (closing it), causes the sound to still play in the background until a new video is selected. The solution to this is to load an empty string. Unfortunately, if they fullscreen, clicking off the popover to close it (because it sits on top of the fullscreen video) loads the empty string, and then the entire application crashes. :(