ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

exoplayer is showing ads

Open geeta4 opened this issue 7 years ago • 4 comments

my production app is showing today yoga day ad while i am just playing media from my app no ads from my app so how this is happening

geeta4 avatar Jun 21 '19 06:06 geeta4

ExoPlayer is not showing ads without developers using the IMA extension and having an ad tag installed. I'm absolutely sure this is not possible without the app developer doing this.

marcbaechinger avatar Jun 21 '19 07:06 marcbaechinger

i have used exoplayer like thsi:

if (simpleExoPlayer != null) {
            return;
        }

        Context context = AppController.getInstance();
        DefaultRenderersFactory renderersFactory = new DefaultRenderersFactory(
                context,
                null,
                DefaultRenderersFactory.EXTENSION_RENDERER_MODE_OFF
        );
        TrackSelector trackSelector = new DefaultTrackSelector();

        simpleExoPlayer = ExoPlayerFactory.newSimpleInstance(AppController.getInstance(), renderersFactory, trackSelector);

        userAgent = Util.getUserAgent(context, context.getString(R.string.app_name));
        setPlaybackParam();
        simpleExoPlayer.addListener(new ComponentListener());
        AudioAttributes audioAttributes = new AudioAttributes.Builder()
                .setUsage(com.google.android.exoplayer2.C.USAGE_MEDIA)
                .setContentType(C.CONTENT_TYPE_SPEECH)
                .build();
        simpleExoPlayer.setAudioAttributes(audioAttributes, true);
        simpleExoPlayer.seekTo(currentSeekPos);


 private MediaSource getHttpMediaSource(MediaMetaData mediaMetaData) {
        return new ExtractorMediaSource(
                Uri.parse(mediaMetaData.getMediaUrl()),
                new DefaultHttpDataSourceFactory(
                        userAgent,
                        null /* listener */,
                        DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
                        DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
                        true /* allowCrossProtocolRedirects */),
                new DefaultExtractorsFactory(),
                null,
                null
        );
    }

but it is showing ads

geeta4 avatar Jun 21 '19 10:06 geeta4

It may depend on the content. The server can insert advertisement in HLS and DASH manifests. Ad-tracking and measurement will be a separate issue. If you are playing 3rd party content, they may have inserted server-side advertisement.

The ad should not be from IMA extension, as it is not enabled.

A detailed bug report will help. The issue template can be found here.

umangsaini avatar Jun 21 '19 12:06 umangsaini

As @marcbaechinger says, we definitely don't insert ads unless you're explicitly using the IMA extension and specifying an ad tag. It's either your app code, or (more likely) the source that you're playing (e.g. due to server-side ad insertion, as suggested by @umangsaini).

ojw28 avatar Jun 21 '19 14:06 ojw28