Tag Archives: GMF

Google Media Framework for Android is Deprecated

As previously announced, as of March 15th, 2018, the Google Media Framework (GMF) for Android is deprecated in favor of the IMA ExoPlayer plugin. All development and support for GMF has been halted. If you are a GMF Android user, we recommend you migrate to the IMA ExoPlayer plugin at your earliest convenience. Alternatively, to keep using GMF Android, you will have to fork and maintain it yourself.

Note: We are NOT deprecating GMF for iOS.

If you have any questions, feel free to contact us via the IMA SDK developer forum.

Deprecating GMF for Android

On March 15, 2018, we are stopping development and support for Google Media Framework (GMF) for Android in favor of the new ExoPlayer IMA extension. GMF's technology and approach are based on an older version of ExoPlayer.

The new v2 version of ExoPlayer and the ExoPlayer IMA Extension make basic integration simple enough that a layer between ExoPlayer and the IMA SDK is no longer necessary. The new approach is cleaner, requires less code, and uses the most up-to-date version of ExoPlayer.

Support for GMF for Android will end on March 15, 2018, after which we will no longer respond to issues or make any further releases of GMF for Android. The repository will also be shut down at this time. If you want to access the code, you can clone the repository before the March 15, 2018 shutdown date.

Note: We are NOT deprecating GMF for iOS.

If you have any questions, feel free to contact us via the IMA SDK developer forum.

Introducing the IMA SDK Plugin for Video.js

A few weeks ago we announced the new Google Media Framework, which includes a Video.js plugin for HTML5. Today we’ll be diving a bit deeper into that plugin to show you how easy it is to do an IMA integration. Video.js is a JavaScript and CSS library that makes it easier to work with and build on HTML5 video. Combined with the IMA SDK plugin, the Video.js player becomes a fully integrated IMA SDK video player, and all in less than 10 lines of JavaScript!

Creating a player


You can create an IMA-integrated video player in 3 simple steps:

1. Download the video.js source and dependencies

  1. Grab the latest video.js player from videojs.com
  2. Grab the contrib-ads library from GitHub
  3. Grab the IMA plugin from our GitHub repo
Alternatively, if you’re an npm user, you can install our plugin and the above dependencies with
npm install videojs-ima

2. Declare your video player


Make sure your html file references the required JavaScript and CSS files downloaded in step one (see the example in the README for more complete HTML). Add the following code to load the IMA SDK and declare a video player:
<script type=“text/javascript” 
src=“/imasdk.googleapis.com/js/sdkloader/ima3.js”></script>
<video id="content_video" class="video-js vjs-default-skin" controls> 
<source src="YOUR_VIDEO_SOURCE" type="YOUR_VIDEO_TYPE" />
</video>
YOUR_VIDEO_TYPE is the encoding for your video. For more information on supported HTML5 video types, see this Wikipedia article.

3. Initialize the video player and IMA plugin


In a JavaScript block or separate JavaScript file, include the following code:
// Initialize the video.js player.
var player = videojs('content_video'); // your video tag’s id

// Declare options for the IMA plugin.
var options = {
id: 'content_video',
adTagUrl: 'YOUR_AD_TAG'

// Additional options available but not required.
// See our README for more info.
};

// Initialize the IMA plugin.
player.ima(options);

// Request ads.
player.ima.requestAds();

// Start video playback (will play ads if there is a pre-roll,
// content otherwise).
player.play();

With these few lines of code, you’ve got a complete video player with an IMA integration. For more information and additional documentation, see our GitHub repo README.

If you have any questions, feel free to contact us via the Google Media Framework forum.

Google Media Framework: Making online video simple

We’re excited to announce an open source video player framework to make online video and video monetization with the IMA SDK easier than ever. The Google Media Framework (GMF) is available for iOS and Android, and we have a Video.js plugin for web based video players.


Google Media Framework for iOS


Google Media Framework for Android


GMF Features
  • Ready to use Video player for your apps and websites
  • Demo apps include production ready integrations with the IMA ads SDK
  • GMF is free and open source, so can be customized to meet your specific needs (Send us a pull request!)
  • Easily customize the UI color and add or remove buttons
  • Support for iOS 7+ and Android 4.1+

We hope these frameworks enable you to simply make great mobile video apps and awesome web video experiences. You can send us thoughts or questions via the GMF Google group.

GitHub Links

-- The Google Media Framework Team