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.
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.
npm install videojs-ima
<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>
// 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();