Exoplayer with google IMA SDK - android

I am trying to implement google ima sdk for exoplayer for preroll post roll ad rendering. Currently i am using the almost exact implementation of exoplayer as mentioned in github link https://github.com/google/ExoPlayer/tree/master/demo
Can anyone tell me how to proceed the integration using exoplayer and where should i implement my callbacks and the ad tag parameter handling so that i can make it work with exoplayer and not create a separate videoplayer implementation to handle ads. Please help

The way to implement Google IMA with ExoPlayer is the same way as it's explained with the built in Android Media Player. The callbacks and events are going to be the same, instead calling the mediaPlayer.play() you need to call your Exo's wrapper play method.

You can checkout this project from Google: Google Media Framework
It is a video player with integrated IMA SDK and built on top of ExoPlayer (yeah).

Related

Google IMA3 sdk , which is best video player to use android

I am new to work with Google IMA3 SDK for displaying video ads througt DFP, I just went through Quick start IMA android , it says I can use Google Media Framework (GMF) OR Android Videoview
Android Videoview
This is not customised to work with Google IMA3 , as far as I know , I have to do extra work with is player for pre-roll , mid-roll & post-roll concept.
Google Media Framework (GMF)
The Google Media Framework (GMF) is a lightweight media player designed to make video playback and integration with the Google IMA SDK on Android easier. BUT this is still in beta version . There are still quite OPEN ISSUES
This IMA3: Video technology partners , in this link they say I can use any of them , Are they OPEN SOURCE.
I am still confused what to do

Exoplayer for Youtube videos

My goal is to play a Youtube video in an application.
Youtube Player API is not what I want since there could be overlays in front of the video.
Webviews are terrible for performances and doesn't allow autoplay.
Exoplayer seems good but most of their doc is broken (links), incredibly complex for a very simple task, and doesn't provide working demos (their demo crashes...). Also, they don't explain how to properly get the DASH of a youtube URL.
So, is there a way to make Exoplayer work easily and get DASH info of any youtube link like https://www.youtube.com/watch?v=yFAnn2j4iB0 ?
I use http://www.youtube.com/get_video_info?&video_id=yFAnn2j4iB0 and once decoded I get this DASH url : https://manifest.googlevideo.com/api/manifest/dash/ms/au/nh/IgpwcjAxLnBhcjAxKgkxMjcuMC4wLjE/mv/m/source/youtube/requiressl/yes/ip/165.225.76.70/fexp/3300108,3300130,3300161,3313267,9419451,9422596,9424135,9425619,9426788,9428398,9431012,9431719,9433096,9433223,9433946,9435526,9438327,9438662,9439580,9441225,9441737,9442156,9442424,9442426,9442680,9443322,9443345,9443768,9443913,9444207,9445344/ipbits/0/as/fmp4_audio_clear,webm_audio_clear,webm2_audio_clear,fmp4_sd_hd_clear,webm2_sd_hd_clear/sparams/as,hfr,id,initcwndbps,ip,ipbits,itag,mm,mn,ms,mv,nh,pl,playback_host,requiressl,source,expire/pl/23/id/c850279f68f8881d/mn/sn-25g7snee/mm/31/hfr/1/playback_host/r18---sn-25g7snee.googlevideo.com/itag/0/mt/1471872416/sver/3/key/yt6/initcwndbps/9365000/expire/1471894709/upn/w1CO218TeQA/s/11395DF1FE7737DA54826F38EE1C61D28B46619DC.9724AB654EE916E8B5C5F687BE3504E4799BA939933
But it doesn't start buffing in the Exoplayer Demo. Is this DASH correct ? Does anyone of you use ExoPlayer in their app ?
Doc I found so far :
How to play youtube video in ExoPlayer in Android?
https://github.com/google/ExoPlayer/tree/release-v1/demo_ext (but it crashes ><)
If your goal is to play YouTube videos then use YouTube Android Player API. You need to provide direct URL to Exoplayer.
I successfully run the demo app. you can follow the guide at https://google.github.io/ExoPlayer/demo-application.html and clone the project on github https://github.com/google/ExoPlayer.git
a little note though, it is the most complex project I've ever seen, and need the longest time I ever experienced to build its gradle.
after gradle build complete, you just need to run the demo project.

Use Youtube API in Android TV

I want to play youtube videos in my Android TV APP.
I am also working on a Android phone/tablet APP and I was able to use Youtube Android API to play videos.
But when I try to use the same API on Android TV it gives me an error ("This app won't work unless you update the YouTube"), but my youtube is updated.
I found this issue in the YouTube Android Player API issue tracker, it is the same problem that I am facing here, so I want to know if someone have a solution, or know another version of the API that may work. I am using YouTube Player Android API v1.2.2.
I know that I can open youtube via Intent, but I need to use the YouTube API to show videos.
The YouTube playback API may not work on Android TV, but you can always implement your own playing mechanism in-app. Take a look at YouTube's web player API: https://developers.google.com/youtube/iframe_api_reference
You can load a WebView in your app and from there add an iframe and JS logic to integrate with your controller.
To interface between your JS and Java code, take a look at a project like this: https://github.com/Fleker/WebGameBridge.js for how to use the WebView APIs.
In terms of getting data, there are also web APIs for this that you can access through your WebView.
I've created YoutubeTV library, a wrapper for YouTube Player API Reference for iframe Embeds
It provides a YoutubeTvView that embeds a Webview with Youtube iframe with all Javascript API available from this view.
Also, YoutubeTvFragment holds a YoutubeTvView with a media control bar (PlaybackOverlayFragment)
I have the same understanding with you. YouTube API works only smartphone YouTube app and not for Android TV YouTube app.
I think if you are thinking of publishing Android TV app, you cannot use YouTube Player Android API except Intent for now. Because you should expect user installs Android TV YouTube app.
For reference,
Current behavior of YouTube Android Player API is summarized here.
Source code which uses YouTube Intent to play YouTube video in Android TV.

IMA SDK integration for Android app, with videoview and MediaPlayer

I am integrating IMA SDK in my Android app, for pre-roll video ads in Videos. I am following the Google tutorial and the sample app provided in the link: https://developers.google.com/interactive-media-ads/docs/sdks/android/quickstart
In the sample app, VideoPlayer interface is used in conjunction with VideoAdPlayer from SDK. In our code we are using VideoView in a fragment for playing the videos, along with media player.
Since the illustartion in sample app is different than what has been done in our app, proceeding with intergaration is being little challenging.
Can someone give me details on how to integrate IMA SDK, with VideoView and MediaPlayer, and is it possible to pass only the AdUiContainer while requesting the Ad and not include any VideoPlayer instance?
Any suggestion would be a great help, thanks in advance.

Vimeo android sdk : Is there any vimeo API like Youtube to play vimeo videos?

I have to implement Vimeo video player in my android Application. I have found few solutions like playing video in WebView etc. But this is not a proper way. Need help
Vimeo provides API's which are found at:
http://developer.vimeo.com/apis/simple
vimeo-networking is a Java networking library used for interacting with the Vimeo API. The example provided in this project shows the implementation in the context of an Android app.
https://github.com/vimeo/vimeo-networking-java

Categories

Resources