google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.74k stars 6.03k forks source link

how to configure vast ad buffer time #10241

Open Jacko07 opened 2 years ago

Jacko07 commented 2 years ago

hi there, i want to display VAST ads without content video. but it takes too long time on buffering state. DefaultLoadControl seems has no effets on vast ads. ` TrackSelector trackSelector = new DefaultTrackSelector(getContext()); DefaultLoadControl loadControl = new DefaultLoadControl .Builder() // TODO: 2022/4/29 test .setBufferDurationsMs(1 1000, 1 1000, 1000, 1000) .build();

        mPlayer = new ExoPlayer.Builder(getContext())
                .setLoadControl(loadControl)
                .setTrackSelector(trackSelector)
                .setMediaSourceFactory(mediaSourceFactory)
                .build();

`

ojw28 commented 2 years ago

If you're trying to play an ad without a content video using IMA, then please see https://github.com/google/ExoPlayer/issues/3774.

Else, please provide more detailed information about what you're trying to do. Thanks.

Jacko07 commented 2 years ago

If you're trying to play an ad without a content video using IMA, then please see #3774.

Else, please provide more detailed information about what you're trying to do. Thanks.

emmm, my question is how to change the buffer time about vast ad video, so that vast ad video can play as soon as possible. thanks.

Jacko07 commented 2 years ago

hi, @ojw28 another question, how can i observe media or ad vast video play finished event.