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 2025-01-22 UTC.
[null,null,["Last updated 2025-01-22 UTC."],[[["VolumeProvider is an interface in Kotlin that exposes the volume of a video player."],["It features one public function, `getVolume()`, which returns the player's volume as a percentage between 0 and 100."],["`VideoAdPlayer` and `VideoStreamPlayer` are direct subclasses of the VolumeProvider interface, both defining methods for video players to be used by the IMA SDK."],["`VideoAdPlayer` outlines required methods and callbacks for a video player when interacting with the IMA SDK."],["`VideoStreamPlayer` defines the methods that a video player must implement for dynamic ad insertion with the IMA SDK."]]],["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"]]