Stay organized with collections
Save and categorize content based on your preferences.
For streams using two different types of metadata, you might need additional
configuration setup depending on your player implementation. A stream can
contain multiple types of metadata. The IMA SDK adds metadata to the stream to
retrieve ad information from the media. For example,
SCTE-35 is a common second
metadata type.
For apps using
Media3 ExoPlayer v1.6 or
higher, streams with two metadata types are handled by default.
For apps using an ExoPlayer version lower than v1.6, you must add an additional
MetadataRenderer
instance to your ExoPlayer implementation. The following example adds a
second MetadataRenderer instance to support two metadata types:
RenderersFactorydefaultRenderersFactory=newDefaultRenderersFactory(context){@OverrideprotectedvoidbuildMetadataRenderers(Contextcontext,MetadataOutputoutput,LooperoutputLooper,@ExtensionRendererModeintextensionRendererMode,ArrayList<Renderer>out){// Add a `MetadataRenderer` for each type of metadata. This example adds 2.out.add(newMetadataRenderer(output,outputLooper));out.add(newMetadataRenderer(output,outputLooper));}};newExoPlayer.Builder().setRenderersFactory(defaultRenderersFactory).setMediaSourceFactory(mediaSourceFactory).build();;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["For streams using two different types of metadata, you might need additional\nconfiguration setup depending on your player implementation. A stream can\ncontain multiple types of metadata. The IMA SDK adds metadata to the stream to\nretrieve ad information from the media. For example,\n[SCTE-35](//support.google.com/admanager/answer/7506166) is a common second\nmetadata type.\n\nFor apps using\n[Media3 ExoPlayer](//developer.android.com/media/media3/exoplayer) v1.6 or\nhigher, streams with two metadata types are handled by default.\n\nFor apps using an ExoPlayer version lower than v1.6, you must add an additional\n[`MetadataRenderer`](//developer.android.com/reference/androidx/media3/exoplayer/metadata/MetadataRenderer)\ninstance to your ExoPlayer implementation. The following example adds a\nsecond `MetadataRenderer` instance to support two metadata types: \n\n RenderersFactory defaultRenderersFactory = new DefaultRenderersFactory(context) {\n\n @Override\n protected void buildMetadataRenderers(Context context, MetadataOutput output,\n Looper outputLooper, @ExtensionRendererMode int extensionRendererMode,\n ArrayList\u003cRenderer\u003e out) {\n // Add a `MetadataRenderer` for each type of metadata. This example adds 2.\n out.add(new MetadataRenderer(output, outputLooper));\n out.add(new MetadataRenderer(output, outputLooper));\n }\n };\n\n new ExoPlayer.Builder()\n .setRenderersFactory(defaultRenderersFactory)\n .setMediaSourceFactory(mediaSourceFactory)\n .build();;"]]