Skip to content

Commit

Permalink
conditional controls when not lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
t-lansing committed Dec 5, 2024
1 parent b9a9fc6 commit a046498
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/incito-browser/incito.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,17 @@ function renderView(view, canLazyload: boolean, shouldLazyload: boolean) {
}
} else {
attrs.src = `${src}#t=0.1`;
attrs.controls = '';
if (view.autoplay === true) {
attrs['data-autoplay'] = true;
}

if (view.controls === true) {
attrs['controls'] = '';
}

if (view.loop === true) {
attrs['loop'] = '';
}
}

break;
Expand Down

0 comments on commit a046498

Please sign in to comment.