-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
status: archivedArchived and locked; will not be updatedArchived and locked; will not be updatedtype: questionA question from the communityA question from the community
Description
Have you read the Tutorials?
yes
Have you read the FAQ and checked for duplicate open issues?
yes
What version of Shaka Player are you using?
Latest
Please ask your question
How can I get details of the current ad? I need to know if it is a preroll or midroll, I tried to search using e.getStreamData().adProgressData without success.
function listenEvents(adManager) {
const eventsAdManager = [
shaka.ads.AdManager.ADS_LOADED,
shaka.ads.AdManager.AD_STARTED,
shaka.ads.AdManager.AD_FIRST_QUARTILE,
shaka.ads.AdManager.AD_MIDPOINT,
shaka.ads.AdManager.AD_THIRD_QUARTILE,
shaka.ads.AdManager.AD_COMPLETE,
shaka.ads.AdManager.ALL_ADS_COMPLETED,
shaka.ads.AdManager.AD_PROGRESS,
shaka.ads.AdManager.AD_BREAK_READY,
shaka.ads.AdManager.AD_DURATION_CHANGED,
shaka.ads.AdManager.AD_LINEAR_CHANGED,
shaka.ads.AdManager.AD_LOADED,
shaka.ads.AdManager.CUEPOINTS_CHANGED,
shaka.ads.AdManager.IMA_AD_MANAGER_LOADED,
shaka.ads.AdManager.IMA_STREAM_MANAGER_LOADED,
];
eventsAdManager.forEach(events => {
adManager.addEventListener(events, (e) => {
console.log(`EVENT: ${e.type}`, e);
}, false);
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: archivedArchived and locked; will not be updatedArchived and locked; will not be updatedtype: questionA question from the communityA question from the community