视频
This commit is contained in:
33
pages/component/commonComponents/video/StaticADComponent.js
Normal file
33
pages/component/commonComponents/video/StaticADComponent.js
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
export default class StaticADComponent {
|
||||
constructor(adAddress, toAddress) {
|
||||
this.adAddress = adAddress;
|
||||
this.toAddress = toAddress;
|
||||
this.$html = $(html);
|
||||
}
|
||||
|
||||
createEl(el) {
|
||||
this.$html.find(".ad").attr("src", this.adAddress);
|
||||
this.$html.attr("href", this.toAddress);
|
||||
let $adWrapper = this.$html.find(".ad-wrapper");
|
||||
$adWrapper.attr("href", this.toAddress);
|
||||
$adWrapper.click(() => {
|
||||
Aliplayer.util.stopPropagation();
|
||||
});
|
||||
this.$html.find(".close").click(() => {
|
||||
this.$html.hide();
|
||||
});
|
||||
$(el).append(this.$html);
|
||||
}
|
||||
|
||||
ready(player, e) {}
|
||||
|
||||
play(player, e) {
|
||||
this.$html.hide();
|
||||
}
|
||||
|
||||
pause(player, e) {
|
||||
this.$html.show();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user