Why this tutorial does not behave similarly in Win and iOS? - delphi

I was following this tutorial on the embarcadero docwiki and I noticed that when on iOS if I change the track bar the video will follow, or if I move another window above the video, when that window is removed I'll still be able to see the video. On windows though, changing the track bar position has no effect, and if another window comes above the media player then that window will be painted in it until I press play. Why does this happen?

Related

YouTube API html5 desktop click video area vs Android Chrome touch video area for pause

I can't find a simple yes/no answer - maybe my inability to ask the right question. I'm probably not seeing the obvious.
https://developers.google.com/youtube/iframe_api_reference
If I set-up the iframe api example as per the linked page, with an appropriate header (e.g. viewport etc.) then when I view the page in Chrome on the desktop, I can click on the video area to play, and pause the video. I do not need to use the play/pause control.
If I view the same site on my Note 4, I can touch the video area to play. But in order to pause, I have to click on the (now tiny) pause control. Touching the video area does nothing.
I know I can programmatically add some other element and initiate a pause via the API ... but I don't think I can add a touch or onclick event to the player ... and the player state change event won't be any good if the player isn't changing state on subsequent touches?
Yes / No (trying to keep within non-vague / discursive guidelines) ... is it possible, without "hacks" to pause the video, on mobile, with a touch to the video area?
I suspect not, as YouTube's own site, on my Note 4, behaves in the same way. I just can't find any discussion/questions about it. I ask the question, as it seems counter-intuitive to reduce the control area on a smaller touch device for pausing. It's annoying to me ... trying to use embedded YouTube in CSS3D where I have a video-wall 2x2 and the controls become tiny. I might have to overlay a transparent control element for touch but just want to check I haven't gone mad.

MPMoviePlayerViewController locks up application with unusual appearance?

So, I've tried this a number of ways with the same result.
I've tested by using a YouTube MP4 URL, such as:
This
The way I do it looks pretty much like:
self.moviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:videoUrlString]];
And then I play the video. If I play the video and it goes fullscreen, the whole app locks up. The video player appears, but parts of the status bar (such as the time and bars) disappear leaving only the carrier name. The volume slider is only half there, and it loads indefinitely, and ignores any further touch input until I kill the app. If I rotate the iPhone, the volume slider and the rest of the status bar reappear, but it still will not respond to touch or finish loading. Screenshot of issue.
If, instead, I pass the MPMoviePlayerViewController object to a UINavigationController with presentViewController:, the app seems to hang: until I rotate, then suddenly the video appears correctly and starts playing! However, again, all touch input is ignored and the application is essentially locked.
This is one of the strangest issues I've troubleshot.
So I tried using tools others have built. I tried XCDYouTubeKit and YKMediaKit using the Youtube ID instead of the direct link, with the exact same result. After looking at their code, they both use MPMoviePlayerViewControllers.
What's happening here? Can anyone help me figure out what's wrong?
That's surprising. Have you tried playing around with AV Foundation? It's a more modern media API than MediaPlayer.framework.
If you can target iOS 8 only, then AVPlayerViewController is a simple way to playback media via AVPlayer.

how to close the native video player in Air for iOS using StageWebView

I open a video to play in the StageWebView:
var webView:StageWebView = new StageWebView();
var path:String = 'http://www.winterlife.com/files/apps/zhdk/test.mp4';
webView.stage = this.stage;
webView.viewPort = new Rectangle( x, y, width, height);
webView.loadURL(path);
This works fine, video starts playing.
Question 1: If I want to close the StageWebVideo, I touch "Done/Close". But nothing happens, except the video stops. (I want to close the video player and go back to my app.)
Question 2: How can I set the video to autoplay?
Question 3: When I start StageWebView, a white background appears for some short time. What is that, and how can I avoid it.
Thank you very much!
You have zero control over the video player in StageWebView by default. No events, no auto-play, nothing. What you want to do is simply not possible using that component.
You have two options:
Use a replacement ANE that mimics the functionality and gives you access to the things you want. UIWebView from Darkredz may be a possible substitute, though I haven't used it in 18 months, it hasn't been updated in 12, and it's not free.
Use StageVideo and build your own player around it. This is my preferred method. It still uses the native video player, but gives you great control over the video and a plethora of events to listen for. Plus you can design your own controls for it.
You can close the native video player by adding StageWebView in the popup container with a close button. Because, .mp4 is not supported flex video player in ios, instead of this we use native player to play the video.
While we use StageWebView it automatically take Native player in IOS. So we can add StageWebView in a popup container with a custom close button for dispose() StageWebView and close the popup container. By this method we can close our native video player in IOS.
StageWebView is always open in top of our application, when you click the link, the popup will open in top of the application, and stagewebview also will open in top of the application. You can modify the viewPort for adding close button.

Movie Player goes blank with white screen once the movie is completely played

I have a MPMoviePlayer whose controls have been hidden.
I have custom sliders to move the video, back and forth and controls to control the speed as well.
Now whenever it reaches the end I can see a white screen.
app does not crash but I can't see the video.
I tried debugging and realized that moviPlayer instance is still there, but naturalSize is reported to be zero.
rest everything is there, including the contentURL property.
has the player released the video ?
UPDATE:
The bug onbly appears on iOS4 and not on iOS5.
Anyone any idea on what changes have come to movieplayer in the two versions which we might have missed.

MPMoviePlayerController, disallow fullscreen but allow navigation through clip?

I have a video in my iPad app, but I dont want it to be able to go to fullscreen. However I do potentially want the user to be able to navigate to the part of the video that they want to see.
As far as I can tell there are only three options for the controls that you give the user:
None, Embedded, or Fullscreen.
None gives the user no control.
Embedded and Fullscreen basically give the use the same amount of control but just start in different states.
Basically what I want is Embedded with the switch to Fullscreen option taken out.
Anybody know if its possible? Thanks
You can set the controls style to "None", and then add your own custom view to navigate using a UISlider (I've done this in the past).
MPMoviePlayerController adheres to the MPMediaPlayback protocol, so you take the total playback time of the movie, multiply it by the UISlider value (when it changes), and then adjust the movie's playback head position.
You'll also need an NSTimer or KVO to monitor the playback time so it can update the slider UI element in realtime.

Resources