How to add flash to ios app? - ios

Here is the thing, I am developing an app playing video using MPMoviePlayerController. When the user pauses the video, I show them an image( a button, when the user clicks the button, a UIWebview will be loaded) with advertisement on it, just like this:
Now instead of showing users picture advertisement, I want to show them advertisements that moves, like a flash file. Like the home page of Google.
I am a newbie to IOS development, anybody has suggestion about how to do this? Thx.

I found some cheap and quick way, LOL. I turned the flash to html by swf decompiler and then add the html to my app instead.

Related

Is there a way to create an enhanced casting on iOS?

I want to create an enhanced casting on my iOS app.
In simple words, I want to be able to customise the view that's on the screen the user is casting into.
UI for example:
User is watching a video on iOS device.
User clicks on airplay to cast the video to an external device, such as a TV.
Device's screen still showing the video, but on the external device the display contains the video with some customise widgets on it, and a window showing the camera coming from the iOS mobile.
I couldn't find any related information on web, maybe you'll have an idea on what can I do? and what is possible.
Thanks!

Any way to enable user interaction while viewing fullscreen video in iOS browsers?

My research tells me that there is now way to escape fullscreen video viewing in iOS browsers on iPhone or iTouch. It also seems there there is no way to modify the native controls that are displayed along with the video. Is the user in a total blackbox while viewing video in this case?
I'm trying to find someway for a user to indicate that they like a video as it is playing. Is there anything I can do that isn't a hack? If not is there any indication from Apple that they will ever be willing to change this? I'd rather not make an app out of this project.
You actually can play a video in line on an iOS browser, if this is what you are aiming for although there are restrictions - updated answer:
Play video inline in a browser on iOS
Safari on large screen iOS (iPad) should support inline video (I don't have iPAD hand to verify this still works...).
Safari on 'small screen' iOS (i.e. iPhone) will not support inline video as standard. There is at least one workaround which will allow it but this does bypass much of the native video playback performance gains so it may not meet your needs. It is a work in progress still as you will see from the link, but try the demo on an iPhone browser - you need to hit the small play button beside the video, rather than the one on top of the video at the time of writing:
https://github.com/newshorts/InlineVideo
Playing inline in a UIWebView on iOS
Take a look at this Apple Developer page:
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/index.html#//apple_ref/doc/uid/TP40006950-CH3-SW31
In particular:
allowsInlineMediaPlayback
A Boolean value that determines whether HTML5 videos play inline or use the native full-screen controller.
and:
Discussion
The default value on iPhone is NO.
In order for video to play inline, not only does this property need to be set on the view, but the video element in the HTML document must also include the webkit-playsinline attribute.

Launch video player in iOS from a link rather than an embedded video

Sorry if this has been asked before... in a mobile browser (eg iOS Safari) when a Vimeo video is embedded into a HTML page, clicking play on the video pops it open in the native player in Safari - I want to be able to launch a video in this exact way, but from an image link rather than having to embed the video... So that clicking the image pops open the video in the native Safari player.
I've searched around but think I'm lacking the correct terminology to know exactly what to search for.
Is this possible?
Thanks in advance...
Why don't you want to embed the vimeo code?
One work around can be going to your vimeo video settings, then Basic and at the bottom of that page upload your own Thumbnail image... You will still have to embed the vimeo code though, but now you will have the image you want as the first image before you click on the video.
This can be a partial solution in the mean time. Also I think a Pro vimeo account might allow a direct link to a video.

PhoneGap, IOs & Vimeo

I'm trying to link to videos on vimeo within my PhoneGap application and I would like them to play inside the app (Fullscreen and when done button is pressed go back to app). Does anyone know how to pull off this kind of functionality. I've looked at vimeo's API's but they seem to just pull the video links in and then link out to the video. Any thoughts?
The Iframe tag that comes by default in the share option will work in phone gap.
Note:You need a pro account to use some thing other then the iframe

How to figure out when a HTML5 video player enters the full screen mode on iOS / iPads?

The HTML5 <video> tag offers the user a button to toggle on and off the fullscreen mode on Safari for mobile devices (iOS).
I would like to capture and handle this user action but it doesn't seem to raise an event when the button is pressed and the player enters the full screen mode.
Here is the link to the Safari API for the HTMLVideoElement class:
https://developer.apple.com/documentation/webkitjs/htmlvideoelement
We can easily find out when the video is paused of played in Javascript, like this:
function onload()
{
var player = document.getElementsByTagName("video")[0];
player.addEventListener('play',videoPlayHandler,false);
player.addEventListener('pause',videoPauseHandler,false);
}
However they don't seem to have any events for when the video enters the full screen mode.
We can force the video into fullscreen mode in response to user action by calling the webkitEnterFullscreen(), but that doesn't help me. I need to know when the user taps on the fullscreen button.
Hiding the controls and replacing them by my own custom controls sounds like a really long winded solution.
Another option I can think of is to set a timing event, constantly checking for the webkitDisplayingFullscreen property, but that feels like a bad thing to do in terms of memory management.
Can anyone suggest a better solution?
After much faffing around a friend finally pointed me in the right direction.
The events I was looking for are: webkitbeginfullscreen and webkitendfullscreen
var player = document.getElementsByTagName("video")[0];
player.addEventListener('webkitbeginfullscreen', onVideoBeginsFullScreen, false);
player.addEventListener('webkitendfullscreen', onVideoEndsFullScreen, false);
With that I can safely capture when the user clicks over the fullscreen button on Safari for the iPads. Interestingly the same events don't seem to work for Safari on the iMac (tested on version 5.1.2).
Thanks Apple for their inconsistency and hours of wasted time.

Resources