Stay organized with collections
Save and categorize content based on your preferences.
interface VolumeProvider
Known direct subclasses
VideoAdPlayer |
Defines the set of methods that a video player must implement to be used by the IMA SDK, as well as a set of callbacks that it must fire.
|
VideoStreamPlayer |
Defines a set of methods that a video player must implement to be used by the IMA SDK for dynamic ad insertion.
|
An interface for exposing player volume.
Summary
Public functions |
Int |
Returns the volume of the player as a percentage from 0 to 100.
|
Public functions
fun getVolume(): Int
Returns the volume of the player as a percentage from 0 to 100.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-27 UTC.
[null,null,["Last updated 2026-01-27 UTC."],[],["The `VolumeProvider` interface exposes player volume information. It's implemented by `VideoAdPlayer` and `VideoStreamPlayer`, which define methods for video players to integrate with the IMA SDK. `VolumeProvider` includes a `getVolume()` function that returns the player's volume as an integer percentage, ranging from 0 to 100. This interface allows the IMA SDK to get volume data.\n"]]