HTML5 video tag unreliable on iOS - ios

I'm using PhoneGap to make an iPhone app that contains video. Usually, it works great: the video sits in an HTML5 video tag and it shows the iOS play button and then plays full screen.
But, sometimes the play button has a line through it and the user can't play the video.
I can't seen to figure out exactly what causes this, as it is sporadic and doesn't seem to be connected to any other issues.
Any help on making this more reliable would be appreciated. The code is a very simple video tag with src, poster, width and height attributes.
Thanks in advance.

I was able to fix this by exporting video from Quicktime as "iPod touch & iPhone 3GS" instead of "iPad, iPhone 4 & Apple TV." Looks like the HTML5 video tag on iPhone's require a lower resolution to play.

Related

Cordova - wrong document size on orientation change during video

I have some videoplayer plugin thats play video on iOS IPhone.
I am in portrait mode and I run video
video goes into landscape mode
I rotate into landscape to watch the video
I press exit video - plugin is closed
Screen is in landscape but I get wrong document size and wrong window.innerHeight. Html tag has these wrong dimensions, so I am not able to do it in javascript/dom
Please can I solve this somehow? Am I able to refresh display? Because when I switch into portrait mode and back, then everything is ok.
window.screen.orientation is correct and window.screen.width/height are correct too.
edit:
I have tried to use this plugin https://github.com/apache/cordova-plugin-screen-orientation and when I lock portrait it is cropped also. There is some problem with viewport, width=device-width, but I do not know how to solve it

YTPlayer View not working properly in iPhone

I am using YTPlayerView in the application to play YouTube videos. It is working proper in iPad but not in iPhone. In iPhone the player directly plays in full screen due to which any gesture on the player is not working. Have to exit full screen using the full screen button on the controls for any gesture to be recognised.
Can the controls of the player be hidden. Tried using #"controls" : #"0" works fine in iPad but not in iPhone.
Did you try https://github.com/0xced/XCDYouTubeKit. Hope this will solve your problem.

Play videos on a streaming mini window at the bottom of ios screen

DraggableYoutubeFloatingVideo allows you to play videos on a floating mini window at the bottom of your screen from sites like YouTube,facebook.
so same as like youtube floating video. please any one share demo app
Try this one: DraggableYoutubeFloatingVideo

Apple Store App Preview Video Resolution

I am trying to make a video for App Preview in Apple App Store.
I created video using QuickTime Player, making a screencast of simulator.
After doing this i imported this video to iMovie and performed some changes.
I now want to export this video for App Store, but iMovie doesn't offer the resolution of 640x1136 for shared video as a file.
I exported in highest resolution and imported in QuickTime Player again. QuickTime Player has option to export video for iPhone 5, iPAd 2 etc. So i tried that, but the resolution stays the same only file format has changed.
How can i create 640x1136 resolution video that is created in iMovie or are there some alternatives?
SOLUTION:
Thanks, i ended with camtasia. I exported HD imovie video file to camtasia and cropped the video to desired resolution. Export worked!
One more option:
https://developer.apple.com/support/app-previews/
If your original video is the wrong dimensions for the app store - here is a trick using just iMovie and Quicktime to get the right dimensions.
Use QuickTime to record a short clip from the size of the device you need
Use iMovie and insert that clip into a new "App Preview" project
Add your actual video after the short clip
Now, any clips that you export will be in the right dimensions.
If you need to hide your short clip, you can shorten it to 0.1 seconds. Put a title over it and delete the text. Now your video starts with 0.1 seconds of a black screen.
NOTE: #Spoek's comment below is worth noting - adding an image of the right dimensions works too and creates a freeze frame. #SpaceMonkeys comment below as well - you can delete the image after adding it.
1) Download Squared - MPEG Streamclip: http://www.squared5.com
2) Then open your video file with it.
3) Click "File" > "Export to Quicktime"
4) Set your desired resolution
5) Export it
6) Then double click the exported file and Quicktime will go through a "converting" process. This step is very important. If you don't have Quicktime convert it, the upload will fail in iTunes connect. It will save it as a new file called "YourFile - Converted" (It took me a whole day to realize this!)
7) Upload the converted file to iTunes connect!
That should work! Let me know how it goes.
All you need to do is open iMovie > File > New App Preview.
When you finish editing, click on the share button on the upper right and there's an option "App Preview". It will give you the right resolution if you record the screen with your iOS devices.
The solution that #Praxiteles gives is the easiest by far, I just used images instead of video as #Spoek's mentioned.
I just made black images for each resolution needed in GIMP and dropped them at the beginning and made them .01 seconds.
So I only had to make two videos (iPhone & iPad) and just copied the elements from one iMovie project to the next. This is instead of making separate videos for iPhone 5,iPhone 6, iPhone 6+, & iPad.
This saved me a ton of work.
Thanks guys!
Don't forget the iPad 3rd Generation has an on-screen 'Home' button.You'll need another preview for it, even though the resolution is the same as the 2nd generation. If you've used 'safe areas' in your screen designs to avoid the button, your app may appear differently on the two devices. Apple's latest spec does suggest they're not accepting one as an alternative for the other. See:
https://help.apple.com/app-store-connect/#/dev4e413fcb8
Answer 2020
For App Preview Resolutions
Pls check apple's official docs here, it is very clear what size you need to have for your videos
I spent a lot of time to find this...
https://help.apple.com/app-store-connect/#/dev4e413fcb8

is Second Screen capable of 16:9 via AirPlay over AppleTV in iOS 5.0.1

i think about extending support within one of my apps to handle a second screen via AppleTV.
The question is:
If i just mirror my App, the nice 46" LCD TV shows only a 4:3 Letterbox Image of my App. Is it possible to use the full 16:9 ratio if i change my app to render a different screen for Apple TV / AirPlay?
Absolutely. In iOS 5, a mirrored AirPlay screen can be used as a secondary UIScreen, which can have content different from what is on the device screen. That's what you want to do.
You can see how to do this here:
https://github.com/quellish/AirplayDemo
Your device screen is mirrored until you start using that secondary UIScreen, and you can remove the window you attach the to the UIScreen and go back to mirroring. This lets you control when you're putting custom content on there, and when you're just mirroring.
Absolutely - see Real Racing HD 2 for a great example!

Resources