Play Video on Mobile Safari for iPod touch - safari

I have a web site that opens iframe for video on page, page uses ajax to pull in videos from selected menu. As expected and understood, on iPod touch after selecting video it shows a play button, which brings up video in another screen. However, when the video completes, it returns browser to page prior to one where video was played from. Sequence:
open Page1
go to Page2 which offers videos to play, in iframe
play video
video completes, returns to Page1, not Page2!!
Only happens on iPod touch, so must be issue with how control is returned on video completion.
Any suggestions? If this is not a known problem, I can work up example (currently, need account on site).

Of course, because the browser returns the URL of the page that was displayed before the video was played back. It won't remember the URL of the IFRAME, that had already changed in the process of selecting a video, if I don't get you wrong.
That's a common problem with frames/iframes and one reason why you shouldn't use them.
The solution could be to place your video selection menu in your actual page and not in an IFRAME. This could be achieved by loading in into a DIV via Ajax for example.

Figured this out, sort of. Got it to go back to the right place, but I do believe that it is easy to confuse the iTouch quicktime player and Safari about where to return to.

Related

Twitch video minimise on browser back click

When watching a livestream on twitch.tv I noticed that when you press the back button the stream simply minimises to the bottom left corner with a smooth animation, you can then navigate around twitch with it always minimised. It doesn't even seem like the page refreshes and that video player element never refreshes even though everything else is completely changing.
Can someone explain how they are doing this?
It's done using a single page application. https://en.m.wikipedia.org/wiki/Single-page_application

Event that fires when video is loaded and first frame is visible? Or how to crossfade two videos another way?

I am trying to use video.js in a samsung smart tv application which unfortunately can only play one video at a time.
I need to simulate the smooth, preferably crossfade, transition between two videos. I am trying to do this by first fading in a screenshot of the next video and using that to cover up the screen while I switch video sources of the video.js plugin. When the player is ready I need to remove the screenshot.
The closest I have found is to remove the screenshot when "loadedmetadata" is called however I am still seeing an inconsistant blip of a black flash between the time the screenshot is removed and the video plays. This is very jarring and I need a consistent way to remove the screenshot only when the first frame has been loaded into the player.
Any other suggestions on how I could each a smooth transition between two videos while only using one video element would be greatly appreciated.
I found the loadeddata event which, as described on MDN :
The loadeddata event is fired when the first frame of the media has finished loading.
loadedmetadata only announce that media informations such as duration are loaded, but the loadeddata event should do the trick.

Using MediaElement in Windows Phone 8.1 app

I'm developing a Windows Phone 8.1 app that plays a video using the MediaElement control. I'm facing some problems for which I've not been able to find information. I've uploaded an example app here: https://mega.co.nz/#!s9sFiQDK!JDI9ar8qWqWIZ_Ot-Q8K8X0qfQ5YG7ATLAiHypOs5Ow
If a click the button in the default page, the app navigates to a second page that contains a MediaElement to play a video. My app is configured to be Portrait only, but I want the video to be displayed in Landscape. For this, I'm changing the screen orientation when clicking on the button and before navigating to the video page with this line: Windows.Graphics.Display.DisplayInformation.AutoRotationPreferences = Windows.Graphics.Display.DisplayOrientations.Landscape; The problem with this is that I can see in the app when the orientation is changing which looks ugly. How can I do to make the video display in landscape without having to change the orientation of the screen? I've seen in the Facebook app that when a video opens, the app does navigate to another page (or at least it seems so from the transition animation that I see) but even though, videos open and play in landscape, there is no screen rotation.
I want to hide the StatusBar before the page with the video is displayed. I've put this line statusBar.HideAsync(); in various places but regardless, I always see that the StatusBar is still hiding when the video is already visible and playing. Again, the Facebook app does hide the StatusBar before the video is shown in the screen.
When the video is playing, if I press and hold the back hardware button, the app is minimized. Now, if I click on its screenshot to go back to it, the app comes to the foreground, but the video is not playing anymore. If I tap on the video to see the video controls, I can see that the video progress line is moving, but the video is like frozen. If I pause the video and play it again, the video resumes. How do I do to make the video to continue to play when the app comes to the foreground? In the Facebook app when I do this, the app comes to the foreground, but the video page is closed and the app takes me to the timeline page. Is this the only way of doing it? If so, how do I detect that when the app comes to the foreground there is a video playing so I can close the page and navigate to the previous one.
If you always want the video page in landscape mode, you can call
Windows.Graphics.Display.DisplayInformation.AutoRotationPreferences = Windows.Graphics.Display.DisplayOrientations.Landscape;
in the page constructor, after InitializeComponent();
Calling
StatusBar.GetForCurrentView().HideAsync();
in the main page constructor is working fine for me.
I still have the same problem, I've tried different approaches, but I can't even get App.Resuming event (and unfortunately in Windows Phone 8.1 WinRT OnNavigatedTo is not triggered on app resuming).

Video.js need to make full screen without adding allowfullscreen to parent iframe

I'm working in an environment where I can't add allowfullscreen to the parent iframe of the page that contains the videojs videos. Currently, the full screen button does not make the video go full screen.
If I embed a youtube video for instance on the same page it has the ability to go fullscreen.
Is there a way to modify the videojs code to work in a similar way? My javascript knowledge is average so this might be too big for my britches.
Thanks,
Jeff

HTML5 Video - Auto select correct resolution

I'm working on a page that has a list of houses for sale. Each listing has a short video with the option of watching in the page or full screen.
I'm struggling a little with having the videos on the page at one resolution and the fullscreen at a higher resolution - this is needed especially for devices that automatically go fullscreen when the play icon is pressed.
I've had good results with video.js (http://www.videojs.com/) for the page resolution but it doesn't appear to support resolution change on fullscreen. I found this thread with comments about the HTML spec and changing resolution mid-stream: https://github.com/videojs/video.js/pull/233.
I'm told the embedded Youtube player selects the correct resolution automatically but the branded player makes this a non-starter.
Also I've found that in IE10 without Flash that the embedded Vimeo player doesn't function and in Chrome without Flash the Vimeo and Youtube players fail as well... so much for HTML5!
So anyone have a solution for showing video at the correct resolution (low/high) for the state of the player (contained/fullscreen)?
Your question answered a query of mine. It looks like auto switching resolution is still not implemented in videoJS other than for YouTube videos. There is a demo at videoJS Resolution Switcher and you can see in the console that changing window resolution to full screen has no effect.
I've been using the JWPlayer for several years with no problems at all. It reliably supports auto switching has many features and very good support.