I know this question has been asked before but I can't seem to find a satisfactory answer. First off I'm very new to Xamarin.forms and mobile app development in general. I'm working on a small time sensitive project. One of the requirements is to have a youtube video play from within the app in both iOS and Android (the link to the youtube video comes from a DB). I used a WebView but it doesn't seem to work well in Android. I also came across the following in another thread:
"When it comes to streaming video on iOS and Android playing that content in a Webview control with or without Xamarin.Forms would be the incorrect choice. Webviews vary on each device and their codec support for HTML5 and H264 video also vary. Both iOS and Android have their own native video players that can play and stream video.
For iOS you have a few options such as AVPlayer or MPMoviePlayerController: http://developer.xamarin.com/recipes/ios/media/video_and_photos/
For Android you could simply use the default VideoView http://developer.xamarin.com/recipes/android/media/video/play_video/ or you could use the binding around the new ExoPlayer: https://github.com/martijn00/ExoPlayerXamarin
You would simply need a custom renderer to bring these into Xamarin.Forms, which would be very simple to do"
I've never done Xamarin.iOS nor Xamarin.Android development before. If someone can provide a simple prototype then that would be great.
Take a look at "Delivering Rich Media Experiences with the Xamarin.Forms Video Player" (https://blog.xamarin.com/delivering-rich-media-experiences-xamarin-forms-video-player/). Github: https://github.com/adamfisher/Xamarin.Forms.VideoPlayer
Related
I want to show advertisement while playing video in app like youtube. My app contains videos, while seeing video, in the middle of the video i need to show the advertisement like youtube. I checked with Admob, but i didn't get solution. Anyone having idea of how to do this?
Interactive Media Ads SDKs allows iOS native application developers to request and track VAST ads (ProRol,MidRol,PostRol,Skipable etc) in the iOS (9.0+) environment.
It supports AVPlayer as well.
Here is is complete documentation of IMA SDK
I have been using Flex for desktop development for years. I'm new to mobile development and need to create an app for the iPhone 6 but have no idea whether I should be using Flex/AIR or native code.
The requirements of the iOS app is as follows:
Record video to local storage within app
Playback video from local storage within app
Pause/seek video within app
Overlay controls on top of the video such as TextInput, TextArea and DropDownList so user can make notes as video is being recorded
Data entered via TextInput/TextArea/DropDownList is saved to local storage
Option to upload video and text data to local server
Can I achieve all of this using AIR or should I be using native code?
Can I achieve all of this using AIR?
Yes. Use CameraUI to capture video on the device (using the device's native camera UI), and StageVideo to play the video (using GPU). Overlay your app UIs (Flex or your own) to control video playback. Save local data using File or EncryptedLocalStore or SharedObject. Upload to a server using File/upload().
Or should I be using native code?
That's up to you. There are trade-offs, and everyone will have their own opinion. If you have a lot of experience with Flex/AS3, then you should be able to work out this app in AIR quite easily and see if it meets your needs.
You can achieve this using Adobe AIR but performance will get a hit.
You will need a lot of effort in order to optimize performance especially for video capture functionality.
It is better to do it natively.
I am trying to build a audio/video streaming app that works cross platform on iOS and Android mobile devices.
No matter how deep I Google, I'm ending up with suggestions that point me towards OpenTok/TokBox API. But this is what I wish to avoid.
I've checked a few demo, but WebRTC/HTML5 do not seem to work with streaming video/audio in iOS browser. For example, the https://apprtc.appspot.com demo does not work in Safari or Opera Mini in iOS.
When I try http://dev.opera.com/articles/media-capture-in-mobile-browsers/demo/ ... I can capture image using the default iOS camera picker from my browser but streaming video fails.
It seems like the getUserMedia() stuff is not supported by any browser in iOS.
Moreover, I am planning to put this on a WebView in a native iOS app. This sounds like a really far cry.
I wish someone could point me towards something that helps me build a video streaming app (hopefully using HTML5), that works uniformly for iOS and android (without TokBox).
You might want to look into Ericsson's Bowser App http://www.ericsson.com/research-blog/context-aware-communication/bowser-openwebrtc-released-open-source. It claims to provide WebRTC on Android and IOS. Apparently the App is currently under review in the App Store so if you wait it may just be a case of downloading the App. However it's also open source so if you can't wait then you can build it yourself https://github.com/ericssonresearch/bowser.
getUserMedia and WebRTC Peer-to-peer connections APIs are not supported in iOS.
One of the reason is that at the moment efforts around WebRTC focus on VP8 video codec which Apple and Microsoft do not support natively. Support in the near future is unlikely with Microsoft pushing for its own standard.
Doing what you want on iOS requires you use a native iOS compatible solution like OpenCV which supports video capture. You can find on Google tutorials on how to implement a solution based on OpenCV.
good news, will be supported at Safari 11.0
https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Safari_11_0/Safari_11_0.html
Is it possible to display flashed-based youtube videos on ios devices?
What solution do you use when you decide to embed youtube videos on your app?
Or do I have to give up on all flash-based contents?
In short: It is not possible. There is no way to run Flash on iOS yet, and as of last week, Adobe announced it will terminate further development for Flash on mobile devives, so there will never be. And yes, therefore you have to give up Flash-based video on iOS.
YouTube provides HTML5 versions of all videos, so you have an alternative. There a number of posts here on SO that will help you to get started, like this one.
I want to allow my phone app users to be able to click a YouTube video and be sent to the phone's YouTube player. Does Windows Phone 7 have that option?
Nothing has yet been announced but I know someone at Google who was talking with Microsoft about developing a YouTube app for Windows Phone 7.
Even if such an app did exist, based on the sandboxed nature of apps and their inability to launch other apps, your only options is likely to be to open the video in the browser.
First of all, I'm quite sure that there will be a Youtube App for Windows Phone. Beside that, since Youtube is going HTML5 anyway, I think it is trivial to include a playback of a Youtube video directly in your app:
http://msdn.microsoft.com/en-us/library/ff769551%28v=VS.92%29.aspx
The current version of IE mobile that runs on the Windows Phone 7 device emulator CANNOT play YouTube videos. So far from all the evidence that I've seen, you cannot use the Silverlight "MediaElement" control to play YouTube videos, nor can you use the iPhone "trick" of embedding a YouTube video in a bunch of HTML and have Safari handle it for you because IE mobile won't play YouTube videos.
This isn't to say that they won't be adding this feature in the future, but I'm pretty disappointed that as of Beta 1, it doesn't appear that WP7 has any YouTube support.