PRODUCT
Follow

adkit.$(compId), adkit.select(compId)

Description

Retrieves a component by ID.

Example

adkit.onReady(function(){
    var component = adkit.$('video1');
    if (component) {
        component.play();
    }
});            

Parameters

Name

Mandatory/Optional

Type

Description

compId

Mandatory

String

ID of the component defined in the AdKit configuration file or in Ad Builder for HTML5.

adkit.getComponentsByType(compType)

Description

Retrieves all components of a specified type.

Example

   adkit.onReady(function(){
        var components = adkit.getComponentsByType('adkit-media');
        components.forEach(function(comp){
             comp.pause();

        });
   });            

Parameters

Name

Mandatory/Optional

Type

Description

compType

Mandatory

String

AdKit component type (adkit-media, adkit-video360).

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments