Android Streaming Video With ExoPlayer 2 ( With IMA Ads)

Amardeep Yadav

Hello there, My name is Amardeep founder of loopwiki.com. I have experience in many technologies like Android, Java, Php etc. In this variety of technologies, I love Android App Development. If you have any idea and you want me to develop for you then let’s have chat Email: [email protected]

You may also like...

21 Responses

  1. Kalpesh Bhangare says:

    Good Work, Sir How can I create a playlist of video or audio using ExoPlayer?

    • Thank You Mate, You can use ConcatenatingMediaSource. Refer this example to create PlayList of video or audio using ExoPlayer

  2. Android Developer says:

    Can we play Facebook or Vimeo video in this player? If yes, how can I do that?

    • Thanks for your question, Facebook and Vimeo don’t provide there media source URLs as per my knowledge. But maybe there is a way to get these Media Source URLs by using there API. Read there API and find a way to obtain Media Source URLs. If you find Media Source URL then it is easy to implement with ExoPlayer.

      Now Media Source is ready, pass it to play with ExoPlayer
      player.prepare(contentMediaSource);
      To start Playing Video
      player.setPlayWhenReady(true);

  3. JRB says:

    Hi,

    Can we play m3u8 extension files with the same code?

  4. soksan says:

    Hi sir, how can we set Aspect Ratio in this player?
    thanks

     

  5. Manoj says:

    Hi
    using the IMA Extension can we show ads in between the videos?

  6. Vivek Shukla says:

    Hii Sir I followed the process but the video didn’t streamed

  7. Artan says:

    Hi Amardeep, Can you please tell me how I can listen to ads events such as adError(), adPaused(), adResumed() and adFinished()?
    I have been trying to do this for the past 2 days, still no result.
    I have this code which is playing the ads but I can not listen to ads events:
    MediaSource mediaSourceWithAds = new AdsMediaSource(
    contentMediaSource,
    adMediaFactory,
    imaAdsLoader,
    playerView.getOverlayFrameLayout(),
    null,
    null);

  8. Gürkan says:

    Hi,
    Can you help me to How I can change embedded subtitle and track in Hls?

  9. Nadeem Ahmad says:

    m3m8 code not work plz help

  10. Mayank Langalia says:

    Hello sir. I need small help. I want to add my custom advertisement is it possible or not ? Also i want to add advertisement indication (Yellow dot). Please help me Im stuck last few days.

  11. Kartikpathe says:

    but How can I get My Ad code i.e.Google Ads Publisher Id for showing ads and earn some revenue

  12. yahya says:

    How to change quality

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.