-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I play ads in the period of #6527
Comments
Hi @cle-bo With regards to the question
my understanding is that you have a predefined list of items and want to play an ad at predefined 5 minute intervals. You may achieve this by concatenating a series of ClippingMediaSources for the main content and regular media sources for your ad content:
There are two caveats here:
|
Hey @cle-bo. We need more information to resolve this issue but there hasn't been an update in 14 days. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Hey @christosts thanks a lot! I followed the idea of treating the ads as regular content and that was a big step in the right direction I think. |
There are many possibilities that a two-players approach will not work (more details in this issue). In short, two players will try to acquire two sets of codecs from the system which is not guaranteed to work. I would not recommend it (more reasons explained below). When you say that the concatenating media source solution Coming back to the two-player solution, here are some further considerations you need to take into account. It is possible that two players might work either because the device supports multiple codecs or the main content and ad content are encoded with different codecs.
If you still believe the ConcatenatingMediaSource is not suitable for your needs, and want to switch between contents, you may want to implement your own |
This problem will also be simplified when the final version of #3163 is released. This will allow you to update the clipping dynamically: start playback with:
as soon as you know the position of an ad break:
And once the ad is finished, you can remove the previous part of the playlist by calling The feature tracked by #3163 will add the missing |
thanks @tonihei , I will be keeping this in mind! |
@cle-bo it sounds like you have a very controlled environment. Please make sure to re-test anytime you change a parameter on your setup (video/audio formats, device firmware and/or android version). Closing this as it seems the issue at hand has been answered. |
Hello and thanks for your time...
The required fields are below, but here's a short introduction:
I started to develop a new app - I have to admit that I am new to android app and exoplayer but have experience as a java developer - for an android TV-Box (beelink GT1) that downloads media to a SD Card (short videos of 2 to 10 minutes in length), plays it 24/7 and the playback is interrupted every 10 minutes to play a sequence of adverts no matter what media source is currently playing or at what position the currently played media source is at. It just keeps spamming adverts in a defined rhythm. Streaming the media is not an option since I have to deal with different bandwidths at the different box locations and sometimes even offline operating boxes (therefore the idea to download the media and saving it to the external storage before/while playing it).
My first idea was to create a ConcatenatingMediaSource and take this "playlist" as "contentMediaSource" parameter for my AdsMediaSource. But this lead to the following error:
Google searches brought me to the issue 3750 saying that I ...
My case is a bit different though and here I am asking the question...
[REQUIRED] Searched documentation and issues
[REQUIRED] Question
How can I play a series of short video clips of content media in a everlasting loop - I can do that already with ConcatenatingMediaSource and player.setRepeatMode(..) , but now comes the point where I struggle - and interrupt the playback with ads every 5 minutes?
So basically I want my playlist to be interrupted with ads and not the single clips the playlist is built on. I tried my best to explain my situation and I am happy to answer any questions you may have to understand and maybe help me with my problem.
Thanks alreay!
Cheers, Clement
The text was updated successfully, but these errors were encountered: