lightgallery 2.9.0 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +690 -0
- package/README.md +31 -21
- package/dist/README.md +229 -0
- package/{css → dist/css}/lg-autoplay.css +7 -4
- package/{css → dist/css}/lg-autoplay.css.map +1 -1
- package/{css → dist/css}/lg-comments.css +0 -6
- package/{css → dist/css}/lg-comments.css.map +1 -1
- package/dist/css/lg-fullscreen.css +11 -0
- package/dist/css/lg-fullscreen.css.map +1 -0
- package/dist/css/lg-justified.css +37 -0
- package/dist/css/lg-justified.css.map +1 -0
- package/{css → dist/css}/lg-pager.css.map +1 -1
- package/{css → dist/css}/lg-rotate.css +0 -16
- package/{css → dist/css}/lg-rotate.css.map +1 -1
- package/dist/css/lg-rtl.css +94 -0
- package/dist/css/lg-rtl.css.map +1 -0
- package/{css → dist/css}/lg-share.css +4 -32
- package/dist/css/lg-share.css.map +1 -0
- package/{css → dist/css}/lg-thumbnail.css +7 -3
- package/dist/css/lg-thumbnail.css.map +1 -0
- package/{css → dist/css}/lg-transitions.css +10 -0
- package/dist/css/lg-transitions.css.map +1 -0
- package/{css → dist/css}/lg-zoom.css +20 -9
- package/dist/css/lg-zoom.css.map +1 -0
- package/{css → dist/css}/lightgallery-bundle.css +150 -118
- package/dist/css/lightgallery-bundle.css.map +1 -0
- package/dist/css/lightgallery-bundle.min.css +1 -0
- package/{css → dist/css}/lightgallery-core.css +49 -7
- package/dist/css/lightgallery-core.css.map +1 -0
- package/{css → dist/css}/lightgallery.css +105 -44
- package/dist/css/lightgallery.css.map +1 -0
- package/dist/lightgallery.es5.js +3848 -0
- package/dist/lightgallery.es5.js.map +1 -0
- package/dist/lightgallery.min.js +1 -0
- package/dist/lightgallery.umd.js +3851 -0
- package/dist/lightgallery.umd.js.map +1 -0
- package/dist/package.json +33 -0
- package/dist/plugins/autoplay/lg-autoplay.es5.js +193 -0
- package/dist/plugins/autoplay/lg-autoplay.es5.js.map +1 -0
- package/dist/plugins/autoplay/lg-autoplay.min.js +1 -0
- package/dist/plugins/autoplay/lg-autoplay.umd.js +196 -0
- package/dist/plugins/autoplay/lg-autoplay.umd.js.map +1 -0
- package/dist/plugins/autoplay/package.json +7 -0
- package/dist/plugins/comment/lg-comment.es5.js +136 -0
- package/dist/plugins/comment/lg-comment.es5.js.map +1 -0
- package/dist/plugins/comment/lg-comment.min.js +1 -0
- package/dist/plugins/comment/lg-comment.umd.js +139 -0
- package/dist/plugins/comment/lg-comment.umd.js.map +1 -0
- package/dist/plugins/comment/package.json +7 -0
- package/dist/plugins/fullscreen/lg-fullscreen.es5.js +114 -0
- package/dist/plugins/fullscreen/lg-fullscreen.es5.js.map +1 -0
- package/dist/plugins/fullscreen/lg-fullscreen.min.js +1 -0
- package/dist/plugins/fullscreen/lg-fullscreen.umd.js +117 -0
- package/dist/plugins/fullscreen/lg-fullscreen.umd.js.map +1 -0
- package/dist/plugins/fullscreen/package.json +7 -0
- package/dist/plugins/hash/lg-hash.es5.js +207 -0
- package/dist/plugins/hash/lg-hash.es5.js.map +1 -0
- package/dist/plugins/hash/lg-hash.min.js +1 -0
- package/dist/plugins/hash/lg-hash.umd.js +210 -0
- package/dist/plugins/hash/lg-hash.umd.js.map +1 -0
- package/dist/plugins/hash/package.json +7 -0
- package/dist/plugins/justified/lg-justified.es5.js +415 -0
- package/dist/plugins/justified/lg-justified.es5.js.map +1 -0
- package/dist/plugins/justified/lg-justified.min.js +1 -0
- package/dist/plugins/justified/lg-justified.umd.js +418 -0
- package/dist/plugins/justified/lg-justified.umd.js.map +1 -0
- package/dist/plugins/justified/package.json +7 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.es5.js +95 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.es5.js.map +1 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.min.js +1 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.umd.js +98 -0
- package/dist/plugins/mediumZoom/lg-medium-zoom.umd.js.map +1 -0
- package/dist/plugins/mediumZoom/package.json +7 -0
- package/dist/plugins/originCrop/lg-origin-crop.es5.js +622 -0
- package/dist/plugins/originCrop/lg-origin-crop.es5.js.map +1 -0
- package/dist/plugins/originCrop/lg-origin-crop.min.js +1 -0
- package/dist/plugins/originCrop/lg-origin-crop.umd.js +625 -0
- package/dist/plugins/originCrop/lg-origin-crop.umd.js.map +1 -0
- package/dist/plugins/pager/lg-pager.es5.js +96 -0
- package/dist/plugins/pager/lg-pager.es5.js.map +1 -0
- package/dist/plugins/pager/lg-pager.min.js +1 -0
- package/dist/plugins/pager/lg-pager.umd.js +99 -0
- package/dist/plugins/pager/lg-pager.umd.js.map +1 -0
- package/dist/plugins/pager/package.json +7 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.es5.js +98 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.es5.js.map +1 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.min.js +1 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.umd.js +101 -0
- package/dist/plugins/relativeCaption/lg-relative-caption.umd.js.map +1 -0
- package/dist/plugins/relativeCaption/package.json +7 -0
- package/dist/plugins/rotate/lg-rotate.es5.js +226 -0
- package/dist/plugins/rotate/lg-rotate.es5.js.map +1 -0
- package/dist/plugins/rotate/lg-rotate.min.js +1 -0
- package/dist/plugins/rotate/lg-rotate.umd.js +229 -0
- package/dist/plugins/rotate/lg-rotate.umd.js.map +1 -0
- package/dist/plugins/rotate/package.json +7 -0
- package/dist/plugins/share/lg-share.es5.js +309 -0
- package/dist/plugins/share/lg-share.es5.js.map +1 -0
- package/dist/plugins/share/lg-share.min.js +1 -0
- package/dist/plugins/share/lg-share.umd.js +312 -0
- package/dist/plugins/share/lg-share.umd.js.map +1 -0
- package/dist/plugins/share/package.json +7 -0
- package/dist/plugins/thumbnail/lg-thumbnail.es5.js +792 -0
- package/dist/plugins/thumbnail/lg-thumbnail.es5.js.map +1 -0
- package/dist/plugins/thumbnail/lg-thumbnail.min.js +1 -0
- package/dist/plugins/thumbnail/lg-thumbnail.umd.js +795 -0
- package/dist/plugins/thumbnail/lg-thumbnail.umd.js.map +1 -0
- package/dist/plugins/thumbnail/package.json +7 -0
- package/dist/plugins/video/lg-video.es5.js +518 -0
- package/dist/plugins/video/lg-video.es5.js.map +1 -0
- package/dist/plugins/video/lg-video.min.js +1 -0
- package/dist/plugins/video/lg-video.umd.js +521 -0
- package/dist/plugins/video/lg-video.umd.js.map +1 -0
- package/dist/plugins/video/package.json +7 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +72 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js.map +1 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +1 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +75 -0
- package/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js.map +1 -0
- package/dist/plugins/vimeoThumbnail/package.json +7 -0
- package/dist/plugins/zoom/lg-zoom.es5.js +1412 -0
- package/dist/plugins/zoom/lg-zoom.es5.js.map +1 -0
- package/dist/plugins/zoom/lg-zoom.min.js +1 -0
- package/dist/plugins/zoom/lg-zoom.umd.js +1415 -0
- package/dist/plugins/zoom/lg-zoom.umd.js.map +1 -0
- package/dist/plugins/zoom/package.json +7 -0
- package/{scss → dist/scss}/_lg-theme-default.scss +68 -18
- package/{scss → dist/scss}/_lg-variables.scss +0 -1
- package/{scss → dist/scss}/lg-autoplay.scss +10 -4
- package/{scss → dist/scss}/lg-comments.scss +0 -8
- package/dist/scss/lg-fullscreen.scss +15 -0
- package/dist/scss/lg-justified.scss +63 -0
- package/{scss → dist/scss}/lg-rotate.scss +0 -24
- package/dist/scss/lg-rtl.scss +145 -0
- package/{scss → dist/scss}/lg-share.scss +6 -33
- package/{scss → dist/scss}/lg-thumbnail.scss +16 -5
- package/{scss → dist/scss}/lg-zoom.scss +46 -9
- package/{scss → dist/scss}/lightgallery-bundle.scss +0 -1
- package/{scss → dist/scss}/lightgallery-core.scss +73 -6
- package/{scss → dist/scss}/lightgallery.scss +0 -1
- package/{scss → dist/scss}/transitions/_lg-scale-up.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-slide-circular-vertical.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-slide-circular.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-soft-zoom.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-in-big.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-in-out.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-in.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-out-big.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-out-in.scss +6 -0
- package/{scss → dist/scss}/transitions/_lg-zoom-out.scss +6 -0
- package/{index.d.ts → dist/types/index.d.ts} +8 -4
- package/{lg-events.d.ts → dist/types/lg-events.d.ts} +300 -300
- package/dist/types/lg-icons.d.ts +27 -0
- package/{lg-plugin.d.ts → dist/types/lg-plugin.d.ts} +7 -7
- package/{lg-settings.d.ts → dist/types/lg-settings.d.ts} +555 -425
- package/dist/types/lg-spring-runner.d.ts +14 -0
- package/dist/types/lg-toolbar-overflow.d.ts +36 -0
- package/{lg-utils.d.ts → dist/types/lg-utils.d.ts} +236 -228
- package/{lgQuery.d.ts → dist/types/lgQuery.d.ts} +56 -56
- package/{lightgallery.d.ts → dist/types/lightgallery.d.ts} +385 -305
- package/{plugins → dist/types/plugins}/autoplay/lg-autoplay-settings.d.ts +41 -38
- package/{plugins → dist/types/plugins}/autoplay/lg-autoplay.d.ts +22 -22
- package/{plugins → dist/types/plugins}/comment/lg-comment-settings.d.ts +36 -33
- package/{plugins → dist/types/plugins}/comment/lg-comment.d.ts +25 -25
- package/{plugins → dist/types/plugins}/fullscreen/lg-fullscreen-settings.d.ts +17 -14
- package/{plugins → dist/types/plugins}/fullscreen/lg-fullscreen.d.ts +16 -16
- package/dist/types/plugins/hash/lg-hash-settings.d.ts +28 -0
- package/{plugins → dist/types/plugins}/hash/lg-hash.d.ts +25 -23
- package/dist/types/plugins/justified/lg-justified-settings.d.ts +42 -0
- package/dist/types/plugins/justified/lg-justified.d.ts +55 -0
- package/{plugins → dist/types/plugins}/mediumZoom/lg-medium-zoom-settings.d.ts +16 -16
- package/{plugins → dist/types/plugins}/mediumZoom/lg-medium-zoom.d.ts +12 -12
- package/dist/types/plugins/originCrop/lg-origin-crop-settings.d.ts +12 -0
- package/dist/types/plugins/originCrop/lg-origin-crop.d.ts +79 -0
- package/{plugins → dist/types/plugins}/pager/lg-pager-settings.d.ts +7 -7
- package/{plugins → dist/types/plugins}/pager/lg-pager.d.ts +13 -13
- package/{plugins → dist/types/plugins}/relativeCaption/lg-relative-caption-settings.d.ts +7 -7
- package/{plugins → dist/types/plugins}/relativeCaption/lg-relative-caption.d.ts +14 -14
- package/{plugins → dist/types/plugins}/rotate/lg-rotate-settings.d.ts +47 -45
- package/{plugins → dist/types/plugins}/rotate/lg-rotate.d.ts +25 -24
- package/{plugins → dist/types/plugins}/share/lg-fb-share-utils.d.ts +2 -2
- package/{plugins → dist/types/plugins}/share/lg-pinterest-share-utils.d.ts +2 -2
- package/{plugins → dist/types/plugins}/share/lg-share-settings.d.ts +71 -56
- package/dist/types/plugins/share/lg-share.d.ts +33 -0
- package/dist/types/plugins/share/lg-twitter-share-utils.d.ts +4 -0
- package/{plugins → dist/types/plugins}/share/types.d.ts +6 -6
- package/{plugins → dist/types/plugins}/thumbnail/lg-thumbnail-settings.d.ts +85 -70
- package/dist/types/plugins/thumbnail/lg-thumbnail.d.ts +88 -0
- package/{plugins → dist/types/plugins}/video/lg-video-settings.d.ts +94 -71
- package/{plugins → dist/types/plugins}/video/lg-video.d.ts +116 -104
- package/{plugins → dist/types/plugins}/video/types.d.ts +8 -8
- package/{plugins → dist/types/plugins}/vimeoThumbnail/lg-vimeo-thumbnail-settings.d.ts +11 -11
- package/{plugins → dist/types/plugins}/vimeoThumbnail/lg-vimeo-thumbnail.d.ts +14 -14
- package/{plugins → dist/types/plugins}/zoom/lg-zoom-settings.d.ts +54 -51
- package/{plugins → dist/types/plugins}/zoom/lg-zoom.d.ts +145 -108
- package/{types.d.ts → dist/types/types.d.ts} +40 -40
- package/package.json +237 -8
- package/angular/10/README.md +0 -24
- package/angular/10/bundles/lightgallery-angular-10.umd.js +0 -289
- package/angular/10/bundles/lightgallery-angular-10.umd.js.map +0 -1
- package/angular/10/bundles/lightgallery-angular-10.umd.min.js +0 -2
- package/angular/10/bundles/lightgallery-angular-10.umd.min.js.map +0 -1
- package/angular/10/esm2015/lib/lightgallery-angular.component.js +0 -225
- package/angular/10/esm2015/lib/lightgallery-angular.module.js +0 -17
- package/angular/10/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/10/esm2015/lightgallery-angular-10.js +0 -5
- package/angular/10/esm2015/public-api.js +0 -7
- package/angular/10/fesm2015/lightgallery-angular-10.js +0 -261
- package/angular/10/fesm2015/lightgallery-angular-10.js.map +0 -1
- package/angular/10/lib/lightgallery-angular.component.d.ts +0 -39
- package/angular/10/lib/lightgallery-angular.component.d.ts.map +0 -1
- package/angular/10/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/10/lib/lightgallery-angular.module.d.ts.map +0 -1
- package/angular/10/lib/lightgallery-angular.service.d.ts +0 -7
- package/angular/10/lib/lightgallery-angular.service.d.ts.map +0 -1
- package/angular/10/lightgallery-angular-10.d.ts +0 -6
- package/angular/10/lightgallery-angular-10.d.ts.map +0 -1
- package/angular/10/package.json +0 -21
- package/angular/10/public-api.d.ts +0 -4
- package/angular/10/public-api.d.ts.map +0 -1
- package/angular/11/README.md +0 -24
- package/angular/11/bundles/lightgallery-angular-11.umd.js +0 -290
- package/angular/11/bundles/lightgallery-angular-11.umd.js.map +0 -1
- package/angular/11/bundles/lightgallery-angular-11.umd.min.js +0 -2
- package/angular/11/bundles/lightgallery-angular-11.umd.min.js.map +0 -1
- package/angular/11/esm2015/lib/lightgallery-angular.component.js +0 -225
- package/angular/11/esm2015/lib/lightgallery-angular.module.js +0 -18
- package/angular/11/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/11/esm2015/lightgallery-angular-11.js +0 -5
- package/angular/11/esm2015/public-api.js +0 -7
- package/angular/11/fesm2015/lightgallery-angular-11.js +0 -262
- package/angular/11/fesm2015/lightgallery-angular-11.js.map +0 -1
- package/angular/11/lib/lightgallery-angular.component.d.ts +0 -39
- package/angular/11/lib/lightgallery-angular.component.d.ts.map +0 -1
- package/angular/11/lib/lightgallery-angular.module.d.ts +0 -8
- package/angular/11/lib/lightgallery-angular.module.d.ts.map +0 -1
- package/angular/11/lib/lightgallery-angular.service.d.ts +0 -7
- package/angular/11/lib/lightgallery-angular.service.d.ts.map +0 -1
- package/angular/11/lightgallery-angular-11.d.ts +0 -6
- package/angular/11/lightgallery-angular-11.d.ts.map +0 -1
- package/angular/11/package.json +0 -21
- package/angular/11/public-api.d.ts +0 -4
- package/angular/11/public-api.d.ts.map +0 -1
- package/angular/12/README.md +0 -24
- package/angular/12/bundles/lightgallery-angular-12.umd.js +0 -296
- package/angular/12/bundles/lightgallery-angular-12.umd.js.map +0 -1
- package/angular/12/esm2015/lib/lightgallery-angular.component.js +0 -221
- package/angular/12/esm2015/lib/lightgallery-angular.module.js +0 -17
- package/angular/12/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/12/esm2015/lightgallery-angular-12.js +0 -5
- package/angular/12/esm2015/public-api.js +0 -7
- package/angular/12/fesm2015/lightgallery-angular-12.js +0 -258
- package/angular/12/fesm2015/lightgallery-angular-12.js.map +0 -1
- package/angular/12/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/12/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/12/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/12/lightgallery-angular-12.d.ts +0 -5
- package/angular/12/package.json +0 -18
- package/angular/12/public-api.d.ts +0 -3
- package/angular/13/README.md +0 -24
- package/angular/13/esm2020/lib/lightgallery-angular.component.mjs +0 -221
- package/angular/13/esm2020/lib/lightgallery-angular.module.mjs +0 -17
- package/angular/13/esm2020/lib/lightgallery-angular.service.mjs +0 -14
- package/angular/13/esm2020/lightgallery-angular-13.mjs +0 -5
- package/angular/13/esm2020/public-api.mjs +0 -7
- package/angular/13/fesm2015/lightgallery-angular-13.mjs +0 -258
- package/angular/13/fesm2015/lightgallery-angular-13.mjs.map +0 -1
- package/angular/13/fesm2020/lightgallery-angular-13.mjs +0 -258
- package/angular/13/fesm2020/lightgallery-angular-13.mjs.map +0 -1
- package/angular/13/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/13/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/13/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/13/lightgallery-angular-13.d.ts +0 -5
- package/angular/13/package.json +0 -31
- package/angular/13/public-api.d.ts +0 -3
- package/angular/14/README.md +0 -24
- package/angular/14/esm2020/lib/lightgallery-angular.component.mjs +0 -217
- package/angular/14/esm2020/lib/lightgallery-angular.module.mjs +0 -17
- package/angular/14/esm2020/lib/lightgallery-angular.service.mjs +0 -14
- package/angular/14/esm2020/lightgallery-angular-14.mjs +0 -5
- package/angular/14/esm2020/public-api.mjs +0 -7
- package/angular/14/fesm2015/lightgallery-angular-14.mjs +0 -254
- package/angular/14/fesm2015/lightgallery-angular-14.mjs.map +0 -1
- package/angular/14/fesm2020/lightgallery-angular-14.mjs +0 -254
- package/angular/14/fesm2020/lightgallery-angular-14.mjs.map +0 -1
- package/angular/14/index.d.ts +0 -5
- package/angular/14/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/14/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/14/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/14/package.json +0 -31
- package/angular/14/public-api.d.ts +0 -3
- package/angular/15/README.md +0 -24
- package/angular/15/esm2022/lib/lightgallery-angular.component.mjs +0 -218
- package/angular/15/esm2022/lib/lightgallery-angular.module.mjs +0 -18
- package/angular/15/esm2022/lib/lightgallery-angular.service.mjs +0 -15
- package/angular/15/esm2022/lightgallery-angular-15.mjs +0 -5
- package/angular/15/esm2022/public-api.mjs +0 -7
- package/angular/15/fesm2022/lightgallery-angular-15.mjs +0 -254
- package/angular/15/fesm2022/lightgallery-angular-15.mjs.map +0 -1
- package/angular/15/index.d.ts +0 -5
- package/angular/15/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/15/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/15/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/15/package.json +0 -25
- package/angular/15/public-api.d.ts +0 -3
- package/angular/16/README.md +0 -24
- package/angular/16/esm2022/lib/lightgallery-angular.component.mjs +0 -218
- package/angular/16/esm2022/lib/lightgallery-angular.module.mjs +0 -18
- package/angular/16/esm2022/lib/lightgallery-angular.service.mjs +0 -15
- package/angular/16/esm2022/lightgallery-angular-16.mjs +0 -5
- package/angular/16/esm2022/public-api.mjs +0 -7
- package/angular/16/fesm2022/lightgallery-angular-16.mjs +0 -254
- package/angular/16/fesm2022/lightgallery-angular-16.mjs.map +0 -1
- package/angular/16/index.d.ts +0 -5
- package/angular/16/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/16/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/16/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/16/package.json +0 -25
- package/angular/16/public-api.d.ts +0 -3
- package/angular/9/README.md +0 -24
- package/angular/9/bundles/lightgallery-angular-9.umd.js +0 -271
- package/angular/9/bundles/lightgallery-angular-9.umd.js.map +0 -1
- package/angular/9/bundles/lightgallery-angular-9.umd.min.js +0 -2
- package/angular/9/bundles/lightgallery-angular-9.umd.min.js.map +0 -1
- package/angular/9/esm2015/lib/lightgallery-angular.component.js +0 -225
- package/angular/9/esm2015/lib/lightgallery-angular.module.js +0 -17
- package/angular/9/esm2015/lib/lightgallery-angular.service.js +0 -14
- package/angular/9/esm2015/lightgallery-angular-9.js +0 -5
- package/angular/9/esm2015/public-api.js +0 -7
- package/angular/9/esm5/lib/lightgallery-angular.component.js +0 -228
- package/angular/9/esm5/lib/lightgallery-angular.module.js +0 -21
- package/angular/9/esm5/lib/lightgallery-angular.service.js +0 -17
- package/angular/9/esm5/lightgallery-angular-9.js +0 -5
- package/angular/9/esm5/public-api.js +0 -7
- package/angular/9/fesm2015/lightgallery-angular-9.js +0 -261
- package/angular/9/fesm2015/lightgallery-angular-9.js.map +0 -1
- package/angular/9/fesm5/lightgallery-angular-9.js +0 -268
- package/angular/9/fesm5/lightgallery-angular-9.js.map +0 -1
- package/angular/9/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/9/lib/lightgallery-angular.module.d.ts +0 -6
- package/angular/9/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/9/lightgallery-angular-9.d.ts +0 -5
- package/angular/9/package.json +0 -23
- package/angular/9/public-api.d.ts +0 -3
- package/angular/README.md +0 -24
- package/angular/esm2022/lib/lightgallery-angular.component.mjs +0 -218
- package/angular/esm2022/lib/lightgallery-angular.module.mjs +0 -18
- package/angular/esm2022/lib/lightgallery-angular.service.mjs +0 -15
- package/angular/esm2022/lightgallery-angular.mjs +0 -5
- package/angular/esm2022/public-api.mjs +0 -7
- package/angular/fesm2022/lightgallery-angular.mjs +0 -254
- package/angular/fesm2022/lightgallery-angular.mjs.map +0 -1
- package/angular/index.d.ts +0 -5
- package/angular/lib/lightgallery-angular.component.d.ts +0 -38
- package/angular/lib/lightgallery-angular.module.d.ts +0 -7
- package/angular/lib/lightgallery-angular.service.d.ts +0 -6
- package/angular/package.json +0 -25
- package/angular/public-api.d.ts +0 -3
- package/css/lg-fullscreen.css +0 -8
- package/css/lg-fullscreen.css.map +0 -1
- package/css/lg-share.css.map +0 -1
- package/css/lg-thumbnail.css.map +0 -1
- package/css/lg-transitions.css.map +0 -1
- package/css/lg-zoom.css.map +0 -1
- package/css/lightgallery-bundle.css.map +0 -1
- package/css/lightgallery-bundle.min.css +0 -1
- package/css/lightgallery-core.css.map +0 -1
- package/css/lightgallery.css.map +0 -1
- package/fonts/lg.svg +0 -54
- package/fonts/lg.ttf +0 -0
- package/fonts/lg.woff +0 -0
- package/fonts/lg.woff2 +0 -0
- package/lib/index.js +0 -8
- package/lib/index.js.map +0 -1
- package/lib/lg-events.js +0 -37
- package/lib/lg-events.js.map +0 -1
- package/lib/lg-plugin.js +0 -13
- package/lib/lg-plugin.js.map +0 -1
- package/lib/lg-settings.js +0 -83
- package/lib/lg-settings.js.map +0 -1
- package/lib/lg-utils.js +0 -328
- package/lib/lg-utils.js.map +0 -1
- package/lib/lgQuery.js +0 -385
- package/lib/lgQuery.js.map +0 -1
- package/lib/lightgallery.js +0 -1949
- package/lib/lightgallery.js.map +0 -1
- package/lib/plugins/autoplay/lg-autoplay-settings.js +0 -16
- package/lib/plugins/autoplay/lg-autoplay-settings.js.map +0 -1
- package/lib/plugins/autoplay/lg-autoplay.js +0 -184
- package/lib/plugins/autoplay/lg-autoplay.js.map +0 -1
- package/lib/plugins/comment/lg-comment-settings.js +0 -17
- package/lib/plugins/comment/lg-comment-settings.js.map +0 -1
- package/lib/plugins/comment/lg-comment.js +0 -140
- package/lib/plugins/comment/lg-comment.js.map +0 -1
- package/lib/plugins/fullscreen/lg-fullscreen-settings.js +0 -10
- package/lib/plugins/fullscreen/lg-fullscreen-settings.js.map +0 -1
- package/lib/plugins/fullscreen/lg-fullscreen.js +0 -108
- package/lib/plugins/fullscreen/lg-fullscreen.js.map +0 -1
- package/lib/plugins/hash/lg-hash-settings.js +0 -9
- package/lib/plugins/hash/lg-hash-settings.js.map +0 -1
- package/lib/plugins/hash/lg-hash.js +0 -139
- package/lib/plugins/hash/lg-hash.js.map +0 -1
- package/lib/plugins/mediumZoom/lg-medium-zoom-settings.js +0 -9
- package/lib/plugins/mediumZoom/lg-medium-zoom-settings.js.map +0 -1
- package/lib/plugins/mediumZoom/lg-medium-zoom.js +0 -73
- package/lib/plugins/mediumZoom/lg-medium-zoom.js.map +0 -1
- package/lib/plugins/pager/lg-pager-settings.js +0 -7
- package/lib/plugins/pager/lg-pager-settings.js.map +0 -1
- package/lib/plugins/pager/lg-pager.js +0 -82
- package/lib/plugins/pager/lg-pager.js.map +0 -1
- package/lib/plugins/relativeCaption/lg-relative-caption-settings.js +0 -7
- package/lib/plugins/relativeCaption/lg-relative-caption-settings.js.map +0 -1
- package/lib/plugins/relativeCaption/lg-relative-caption.js +0 -97
- package/lib/plugins/relativeCaption/lg-relative-caption.js.map +0 -1
- package/lib/plugins/rotate/lg-rotate-settings.js +0 -18
- package/lib/plugins/rotate/lg-rotate-settings.js.map +0 -1
- package/lib/plugins/rotate/lg-rotate.js +0 -206
- package/lib/plugins/rotate/lg-rotate.js.map +0 -1
- package/lib/plugins/share/lg-fb-share-utils.js +0 -10
- package/lib/plugins/share/lg-fb-share-utils.js.map +0 -1
- package/lib/plugins/share/lg-pinterest-share-utils.js +0 -17
- package/lib/plugins/share/lg-pinterest-share-utils.js.map +0 -1
- package/lib/plugins/share/lg-share-settings.js +0 -15
- package/lib/plugins/share/lg-share-settings.js.map +0 -1
- package/lib/plugins/share/lg-share.js +0 -130
- package/lib/plugins/share/lg-share.js.map +0 -1
- package/lib/plugins/share/lg-twitter-share-utils.js +0 -11
- package/lib/plugins/share/lg-twitter-share-utils.js.map +0 -1
- package/lib/plugins/share/types.js +0 -3
- package/lib/plugins/share/types.js.map +0 -1
- package/lib/plugins/thumbnail/lg-thumbnail-settings.js +0 -23
- package/lib/plugins/thumbnail/lg-thumbnail-settings.js.map +0 -1
- package/lib/plugins/thumbnail/lg-thumbnail.js +0 -414
- package/lib/plugins/thumbnail/lg-thumbnail.js.map +0 -1
- package/lib/plugins/video/lg-video-settings.js +0 -15
- package/lib/plugins/video/lg-video-settings.js.map +0 -1
- package/lib/plugins/video/lg-video-utils.js +0 -84
- package/lib/plugins/video/lg-video-utils.js.map +0 -1
- package/lib/plugins/video/lg-video.js +0 -411
- package/lib/plugins/video/lg-video.js.map +0 -1
- package/lib/plugins/video/types.js +0 -3
- package/lib/plugins/video/types.js.map +0 -1
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail-settings.js +0 -8
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail-settings.js.map +0 -1
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail.js +0 -122
- package/lib/plugins/vimeoThumbnail/lg-vimeo-thumbnail.js.map +0 -1
- package/lib/plugins/zoom/lg-zoom-settings.js +0 -21
- package/lib/plugins/zoom/lg-zoom-settings.js.map +0 -1
- package/lib/plugins/zoom/lg-zoom.js +0 -909
- package/lib/plugins/zoom/lg-zoom.js.map +0 -1
- package/lib/types.js +0 -3
- package/lib/types.js.map +0 -1
- package/lightgallery-2.9.0.tgz +0 -0
- package/lightgallery.es5.js +0 -2786
- package/lightgallery.es5.js.map +0 -1
- package/lightgallery.min.js +0 -8
- package/lightgallery.umd.js +0 -2794
- package/lightgallery.umd.js.map +0 -1
- package/lit/custom-elements.json +0 -82
- package/lit/lightgallery.esm.js +0 -59
- package/lit/lightgallery.umd.js +0 -37
- package/lit/package.json +0 -8
- package/plugins/autoplay/lg-autoplay.es5.js +0 -250
- package/plugins/autoplay/lg-autoplay.es5.js.map +0 -1
- package/plugins/autoplay/lg-autoplay.min.js +0 -8
- package/plugins/autoplay/lg-autoplay.umd.js +0 -258
- package/plugins/autoplay/lg-autoplay.umd.js.map +0 -1
- package/plugins/autoplay/package.json +0 -7
- package/plugins/comment/lg-comment.es5.js +0 -205
- package/plugins/comment/lg-comment.es5.js.map +0 -1
- package/plugins/comment/lg-comment.min.js +0 -8
- package/plugins/comment/lg-comment.umd.js +0 -213
- package/plugins/comment/lg-comment.umd.js.map +0 -1
- package/plugins/comment/package.json +0 -7
- package/plugins/fullscreen/lg-fullscreen.es5.js +0 -135
- package/plugins/fullscreen/lg-fullscreen.es5.js.map +0 -1
- package/plugins/fullscreen/lg-fullscreen.min.js +0 -8
- package/plugins/fullscreen/lg-fullscreen.umd.js +0 -143
- package/plugins/fullscreen/lg-fullscreen.umd.js.map +0 -1
- package/plugins/fullscreen/package.json +0 -7
- package/plugins/hash/lg-hash-settings.d.ts +0 -16
- package/plugins/hash/lg-hash.es5.js +0 -198
- package/plugins/hash/lg-hash.es5.js.map +0 -1
- package/plugins/hash/lg-hash.min.js +0 -8
- package/plugins/hash/lg-hash.umd.js +0 -206
- package/plugins/hash/lg-hash.umd.js.map +0 -1
- package/plugins/hash/package.json +0 -7
- package/plugins/mediumZoom/lg-medium-zoom.es5.js +0 -132
- package/plugins/mediumZoom/lg-medium-zoom.es5.js.map +0 -1
- package/plugins/mediumZoom/lg-medium-zoom.min.js +0 -8
- package/plugins/mediumZoom/lg-medium-zoom.umd.js +0 -140
- package/plugins/mediumZoom/lg-medium-zoom.umd.js.map +0 -1
- package/plugins/mediumZoom/package.json +0 -7
- package/plugins/pager/lg-pager.es5.js +0 -139
- package/plugins/pager/lg-pager.es5.js.map +0 -1
- package/plugins/pager/lg-pager.min.js +0 -8
- package/plugins/pager/lg-pager.umd.js +0 -147
- package/plugins/pager/lg-pager.umd.js.map +0 -1
- package/plugins/pager/package.json +0 -7
- package/plugins/relativeCaption/lg-relative-caption.es5.js +0 -154
- package/plugins/relativeCaption/lg-relative-caption.es5.js.map +0 -1
- package/plugins/relativeCaption/lg-relative-caption.min.js +0 -8
- package/plugins/relativeCaption/lg-relative-caption.umd.js +0 -162
- package/plugins/relativeCaption/lg-relative-caption.umd.js.map +0 -1
- package/plugins/relativeCaption/package.json +0 -7
- package/plugins/rotate/lg-rotate.es5.js +0 -274
- package/plugins/rotate/lg-rotate.es5.js.map +0 -1
- package/plugins/rotate/lg-rotate.min.js +0 -8
- package/plugins/rotate/lg-rotate.umd.js +0 -282
- package/plugins/rotate/lg-rotate.umd.js.map +0 -1
- package/plugins/rotate/package.json +0 -7
- package/plugins/share/lg-share.d.ts +0 -15
- package/plugins/share/lg-share.es5.js +0 -219
- package/plugins/share/lg-share.es5.js.map +0 -1
- package/plugins/share/lg-share.min.js +0 -8
- package/plugins/share/lg-share.umd.js +0 -227
- package/plugins/share/lg-share.umd.js.map +0 -1
- package/plugins/share/lg-twitter-share-utils.d.ts +0 -2
- package/plugins/share/package.json +0 -7
- package/plugins/thumbnail/lg-thumbnail.d.ts +0 -48
- package/plugins/thumbnail/lg-thumbnail.es5.js +0 -487
- package/plugins/thumbnail/lg-thumbnail.es5.js.map +0 -1
- package/plugins/thumbnail/lg-thumbnail.min.js +0 -8
- package/plugins/thumbnail/lg-thumbnail.umd.js +0 -495
- package/plugins/thumbnail/lg-thumbnail.umd.js.map +0 -1
- package/plugins/thumbnail/package.json +0 -7
- package/plugins/video/lg-video-utils.d.ts +0 -10
- package/plugins/video/lg-video.es5.js +0 -545
- package/plugins/video/lg-video.es5.js.map +0 -1
- package/plugins/video/lg-video.min.js +0 -8
- package/plugins/video/lg-video.umd.js +0 -553
- package/plugins/video/lg-video.umd.js.map +0 -1
- package/plugins/video/package.json +0 -7
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +0 -182
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js.map +0 -1
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +0 -8
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +0 -190
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js.map +0 -1
- package/plugins/vimeoThumbnail/package.json +0 -7
- package/plugins/zoom/lg-zoom.es5.js +0 -980
- package/plugins/zoom/lg-zoom.es5.js.map +0 -1
- package/plugins/zoom/lg-zoom.min.js +0 -8
- package/plugins/zoom/lg-zoom.umd.js +0 -988
- package/plugins/zoom/lg-zoom.umd.js.map +0 -1
- package/plugins/zoom/package.json +0 -7
- package/react/Lightgallery.d.ts +0 -33
- package/react/Lightgallery.es5.js +0 -2988
- package/react/Lightgallery.es5.js.map +0 -1
- package/react/Lightgallery.umd.js +0 -2994
- package/react/Lightgallery.umd.js.map +0 -1
- package/react/package.json +0 -7
- package/scss/_lg-fonts.scss +0 -27
- package/scss/lg-fullscreen.scss +0 -9
- package/vue/LightGallery.vue.d.ts +0 -37
- package/vue/LightGalleryVue.common.js +0 -9343
- package/vue/LightGalleryVue.common.js.map +0 -1
- package/vue/LightGalleryVue.umd.js +0 -9353
- package/vue/LightGalleryVue.umd.js.map +0 -1
- package/vue/LightGalleryVue.umd.min.js +0 -8
- package/vue/LightGalleryVue.umd.min.js.map +0 -1
- package/vue/package.json +0 -7
- /package/{css → dist/css}/lg-medium-zoom.css +0 -0
- /package/{css → dist/css}/lg-medium-zoom.css.map +0 -0
- /package/{css → dist/css}/lg-pager.css +0 -0
- /package/{css → dist/css}/lg-relative-caption.css +0 -0
- /package/{css → dist/css}/lg-relative-caption.css.map +0 -0
- /package/{css → dist/css}/lg-video.css +0 -0
- /package/{css → dist/css}/lg-video.css.map +0 -0
- /package/{images → dist/images}/loading.gif +0 -0
- /package/{scss → dist/scss}/_lg-mixins.scss +0 -0
- /package/{scss → dist/scss}/lg-medium-zoom.scss +0 -0
- /package/{scss → dist/scss}/lg-pager.scss +0 -0
- /package/{scss → dist/scss}/lg-relative-caption.scss +0 -0
- /package/{scss → dist/scss}/lg-transitions.scss +0 -0
- /package/{scss → dist/scss}/lg-video.scss +0 -0
- /package/{scss → dist/scss}/transitions/_index.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-lollipop-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-lollipop.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-rotate-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-rotate.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-cross-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-cross.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only-y-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only-y.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-only.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver-cross-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver-cross.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver-rev.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew-ver.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-skew.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-vertical-growth.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-slide-vertical.scss +0 -0
- /package/{scss → dist/scss}/transitions/_lg-tube.scss +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* lightgallery | 2.9.0 | October 1st 2025
|
|
3
|
-
* http://www.lightgalleryjs.com/
|
|
4
|
-
* Copyright (c) 2020 Sachin Neravath;
|
|
5
|
-
* @license GPLv3
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).lgVideo=o()}(this,(function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var o,i=1,t=arguments.length;i<t;i++)for(var s in o=arguments[i])Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s]);return e}).apply(this,arguments)},o={autoplayFirstVideo:!0,youTubePlayerParams:!1,vimeoPlayerParams:!1,wistiaPlayerParams:!1,gotoNextSlideOnVideoEnd:!0,autoplayVideoOnSlide:!1,videojs:!1,videojsTheme:"",videojsOptions:{}},i="lgHasVideo",t="lgSlideItemLoad",s="lgBeforeSlide",n="lgAfterSlide",l="lgPosterClick",r=function(e){return Object.keys(e).map((function(o){return encodeURIComponent(o)+"="+encodeURIComponent(e[o])})).join("&")},d=function(o,i){if(!o.youtube)return"";var t=o.youtube[2]?o.youtube[2].slice(1).split("&").map((function(e){return e.split("=")})).reduce((function(e,o){var i=o.map(decodeURIComponent),t=i[0],s=i[1];return e[t]=s,e}),{}):"",s=i||{},n=e(e(e({},{wmode:"opaque",autoplay:0,mute:1,enablejsapi:1}),s),t);return"?"+r(n)};return function(){function a(i){return this.core=i,this.settings=e(e({},o),this.core.settings),this}return a.prototype.init=function(){var e=this;this.core.LGel.on(i+".video",this.onHasVideo.bind(this)),this.core.LGel.on(l+".video",(function(){var o=e.core.getSlideItem(e.core.index);e.loadVideoOnPosterClick(o)})),this.core.LGel.on(t+".video",this.onSlideItemLoad.bind(this)),this.core.LGel.on(s+".video",this.onBeforeSlide.bind(this)),this.core.LGel.on(n+".video",this.onAfterSlide.bind(this))},a.prototype.onSlideItemLoad=function(e){var o=this,i=e.detail,t=i.isFirstSlide,s=i.index;this.settings.autoplayFirstVideo&&t&&s===this.core.index&&setTimeout((function(){o.loadAndPlayVideo(s)}),200),!t&&this.settings.autoplayVideoOnSlide&&s===this.core.index&&this.loadAndPlayVideo(s)},a.prototype.onHasVideo=function(e){var o=e.detail,i=o.index,t=o.src,s=o.html5Video;o.hasPoster||(this.appendVideos(this.core.getSlideItem(i),{src:t,addClass:"lg-object",index:i,html5Video:s}),this.gotoNextSlideOnVideoEnd(t,i))},a.prototype.onBeforeSlide=function(e){if(this.core.lGalleryOn){var o=e.detail.prevIndex;this.pauseVideo(o)}},a.prototype.onAfterSlide=function(e){var o=this,i=e.detail,t=i.index,s=i.prevIndex,n=this.core.getSlideItem(t);this.settings.autoplayVideoOnSlide&&t!==s&&n.hasClass("lg-complete")&&setTimeout((function(){o.loadAndPlayVideo(t)}),100)},a.prototype.loadAndPlayVideo=function(e){var o=this.core.getSlideItem(e);this.core.galleryItems[e].poster?this.loadVideoOnPosterClick(o,!0):this.playVideo(e)},a.prototype.playVideo=function(e){this.controlVideo(e,"play")},a.prototype.pauseVideo=function(e){this.controlVideo(e,"pause")},a.prototype.getVideoHtml=function(e,o,i,t){var s="",n=this.core.galleryItems[i].__slideVideoInfo||{},l=this.core.galleryItems[i],a=l.title||l.alt;a=a?'title="'+a+'"':"";var c='allowtransparency="true"\n frameborder="0"\n scrolling="no"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen';if(n.youtube){var u="lg-youtube"+i,f=d(n,this.settings.youTubePlayerParams);s='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-youtube '+o+'" '+a+' src="'+(e.includes("youtube-nocookie.com")?"//www.youtube-nocookie.com/":"//www.youtube.com/")+"embed/"+(n.youtube[1]+f)+'" '+c+"></iframe>"}else if(n.vimeo){u="lg-vimeo"+i;var h=function(e,o){if(!o||!o.vimeo)return"";var i=o.vimeo[2]||"",t=Object.assign({},{autoplay:0,muted:1},e),s=t&&0!==Object.keys(t).length?r(t):"",n=((o.vimeo[0].split("/").pop()||"").split("?")[0]||"").split("#")[0],l=o.vimeo[1]!==n;l&&(i=i.replace("/"+n,""));var d=l?"h="+n:"";return"?"+d+(s=d?"&"+s:s)+("?"==i[0]?"&"+i.slice(1):i||"")}(this.settings.vimeoPlayerParams,n);s='<iframe allow="autoplay" id='+u+' class="lg-video-object lg-vimeo '+o+'" '+a+' src="//player.vimeo.com/video/'+(n.vimeo[1]+h)+'" '+c+"></iframe>"}else if(n.wistia){var g="lg-wistia"+i;h=(h=r(this.settings.wistiaPlayerParams))?"?"+h:"",s='<iframe allow="autoplay" id="'+g+'" src="//fast.wistia.net/embed/iframe/'+(n.wistia[4]+h)+'" '+a+' class="wistia_embed lg-video-object lg-wistia '+o+'" name="wistia_embed" '+c+"></iframe>"}else if(n.html5){for(var p="",y=0;y<t.source.length;y++){var v=t.source[y].type,m=v?'type="'+v+'"':"";p+='<source src="'+t.source[y].src+'" '+m+">"}if(t.tracks){var w=function(e){var o="",i=t.tracks[e];Object.keys(i||{}).forEach((function(e){o+=e+'="'+i[e]+'" '})),p+="<track "+o+">"};for(y=0;y<t.tracks.length;y++)w(y)}var V="",b=t.attributes||{};Object.keys(b||{}).forEach((function(e){V+=e+'="'+b[e]+'" '})),s='<video class="lg-video-object lg-html5 '+(this.settings.videojs&&this.settings.videojsTheme?this.settings.videojsTheme+" ":"")+" "+(this.settings.videojs?" video-js":"")+'" '+V+">\n "+p+"\n Your browser does not support HTML5 video.\n </video>"}return s},a.prototype.appendVideos=function(e,o){var i,t=this.getVideoHtml(o.src,o.addClass,o.index,o.html5Video);e.find(".lg-video-cont").append(t);var s=e.find(".lg-video-object").first();if(o.html5Video&&s.on("mousedown.lg.video",(function(e){e.stopPropagation()})),this.settings.videojs&&(null===(i=this.core.galleryItems[o.index].__slideVideoInfo)||void 0===i?void 0:i.html5))try{return videojs(s.get(),this.settings.videojsOptions)}catch(e){console.error("lightGallery:- Make sure you have included videojs")}},a.prototype.gotoNextSlideOnVideoEnd=function(e,o){var i=this,t=this.core.getSlideItem(o).find(".lg-video-object").first(),s=this.core.galleryItems[o].__slideVideoInfo||{};if(this.settings.gotoNextSlideOnVideoEnd)if(s.html5)t.on("ended",(function(){i.core.goToNextSlide()}));else if(s.vimeo)try{new Vimeo.Player(t.get()).on("ended",(function(){i.core.goToNextSlide()}))}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(s.wistia)try{window._wq=window._wq||[],window._wq.push({id:t.attr("id"),onReady:function(e){e.bind("end",(function(){i.core.goToNextSlide()}))}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},a.prototype.controlVideo=function(e,o){var i=this.core.getSlideItem(e).find(".lg-video-object").first(),t=this.core.galleryItems[e].__slideVideoInfo||{};if(i.get())if(t.youtube)try{i.get().contentWindow.postMessage('{"event":"command","func":"'+o+'Video","args":""}',"*")}catch(e){console.error("lightGallery:- "+e)}else if(t.vimeo)try{new Vimeo.Player(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included //github.com/vimeo/player.js")}else if(t.html5)if(this.settings.videojs)try{videojs(i.get())[o]()}catch(e){console.error("lightGallery:- Make sure you have included videojs")}else i.get()[o]();else if(t.wistia)try{window._wq=window._wq||[],window._wq.push({id:i.attr("id"),onReady:function(e){e[o]()}})}catch(e){console.error("lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js")}},a.prototype.loadVideoOnPosterClick=function(e,o){var i=this;if(e.hasClass("lg-video-loaded"))o&&this.playVideo(this.core.index);else if(e.hasClass("lg-has-video"))this.playVideo(this.core.index);else{e.addClass("lg-has-video");var t=void 0,s=this.core.galleryItems[this.core.index].src,n=this.core.galleryItems[this.core.index].video;n&&(t="string"==typeof n?JSON.parse(n):n);var l=this.appendVideos(e,{src:s,addClass:"",index:this.core.index,html5Video:t});this.gotoNextSlideOnVideoEnd(s,this.core.index);var r=e.find(".lg-object").first().get();e.find(".lg-video-cont").first().append(r),e.addClass("lg-video-loading"),l&&l.ready((function(){l.on("loadedmetadata",(function(){i.onVideoLoadAfterPosterClick(e,i.core.index)}))})),e.find(".lg-video-object").first().on("load.lg error.lg loadedmetadata.lg",(function(){setTimeout((function(){i.onVideoLoadAfterPosterClick(e,i.core.index)}),50)}))}},a.prototype.onVideoLoadAfterPosterClick=function(e,o){e.addClass("lg-video-loaded"),this.playVideo(o)},a.prototype.destroy=function(){this.core.LGel.off(".lg.video"),this.core.LGel.off(".video")},a}()}));
|
|
@@ -1,553 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* lightgallery | 2.9.0 | October 1st 2025
|
|
3
|
-
* http://www.lightgalleryjs.com/
|
|
4
|
-
* Copyright (c) 2020 Sachin Neravath;
|
|
5
|
-
* @license GPLv3
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
(function (global, factory) {
|
|
9
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
10
|
-
typeof define === 'function' && define.amd ? define(factory) :
|
|
11
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.lgVideo = factory());
|
|
12
|
-
}(this, (function () { 'use strict';
|
|
13
|
-
|
|
14
|
-
/*! *****************************************************************************
|
|
15
|
-
Copyright (c) Microsoft Corporation.
|
|
16
|
-
|
|
17
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
18
|
-
purpose with or without fee is hereby granted.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
21
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
22
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
23
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
24
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
25
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
26
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
27
|
-
***************************************************************************** */
|
|
28
|
-
|
|
29
|
-
var __assign = function() {
|
|
30
|
-
__assign = Object.assign || function __assign(t) {
|
|
31
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
32
|
-
s = arguments[i];
|
|
33
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
34
|
-
}
|
|
35
|
-
return t;
|
|
36
|
-
};
|
|
37
|
-
return __assign.apply(this, arguments);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var videoSettings = {
|
|
41
|
-
autoplayFirstVideo: true,
|
|
42
|
-
youTubePlayerParams: false,
|
|
43
|
-
vimeoPlayerParams: false,
|
|
44
|
-
wistiaPlayerParams: false,
|
|
45
|
-
gotoNextSlideOnVideoEnd: true,
|
|
46
|
-
autoplayVideoOnSlide: false,
|
|
47
|
-
videojs: false,
|
|
48
|
-
videojsTheme: '',
|
|
49
|
-
videojsOptions: {},
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* List of lightGallery events
|
|
54
|
-
* All events should be documented here
|
|
55
|
-
* Below interfaces are used to build the website documentations
|
|
56
|
-
* */
|
|
57
|
-
var lGEvents = {
|
|
58
|
-
afterAppendSlide: 'lgAfterAppendSlide',
|
|
59
|
-
init: 'lgInit',
|
|
60
|
-
hasVideo: 'lgHasVideo',
|
|
61
|
-
containerResize: 'lgContainerResize',
|
|
62
|
-
updateSlides: 'lgUpdateSlides',
|
|
63
|
-
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
|
64
|
-
beforeOpen: 'lgBeforeOpen',
|
|
65
|
-
afterOpen: 'lgAfterOpen',
|
|
66
|
-
slideItemLoad: 'lgSlideItemLoad',
|
|
67
|
-
beforeSlide: 'lgBeforeSlide',
|
|
68
|
-
afterSlide: 'lgAfterSlide',
|
|
69
|
-
posterClick: 'lgPosterClick',
|
|
70
|
-
dragStart: 'lgDragStart',
|
|
71
|
-
dragMove: 'lgDragMove',
|
|
72
|
-
dragEnd: 'lgDragEnd',
|
|
73
|
-
beforeNextSlide: 'lgBeforeNextSlide',
|
|
74
|
-
beforePrevSlide: 'lgBeforePrevSlide',
|
|
75
|
-
beforeClose: 'lgBeforeClose',
|
|
76
|
-
afterClose: 'lgAfterClose',
|
|
77
|
-
rotateLeft: 'lgRotateLeft',
|
|
78
|
-
rotateRight: 'lgRotateRight',
|
|
79
|
-
flipHorizontal: 'lgFlipHorizontal',
|
|
80
|
-
flipVertical: 'lgFlipVertical',
|
|
81
|
-
autoplay: 'lgAutoplay',
|
|
82
|
-
autoplayStart: 'lgAutoplayStart',
|
|
83
|
-
autoplayStop: 'lgAutoplayStop',
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var param = function (obj) {
|
|
87
|
-
return Object.keys(obj)
|
|
88
|
-
.map(function (k) {
|
|
89
|
-
return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]);
|
|
90
|
-
})
|
|
91
|
-
.join('&');
|
|
92
|
-
};
|
|
93
|
-
var paramsToObject = function (url) {
|
|
94
|
-
var paramas = url
|
|
95
|
-
.slice(1)
|
|
96
|
-
.split('&')
|
|
97
|
-
.map(function (p) { return p.split('='); })
|
|
98
|
-
.reduce(function (obj, pair) {
|
|
99
|
-
var _a = pair.map(decodeURIComponent), key = _a[0], value = _a[1];
|
|
100
|
-
obj[key] = value;
|
|
101
|
-
return obj;
|
|
102
|
-
}, {});
|
|
103
|
-
return paramas;
|
|
104
|
-
};
|
|
105
|
-
var getYouTubeParams = function (videoInfo, youTubePlayerParamsSettings) {
|
|
106
|
-
if (!videoInfo.youtube)
|
|
107
|
-
return '';
|
|
108
|
-
var slideUrlParams = videoInfo.youtube[2]
|
|
109
|
-
? paramsToObject(videoInfo.youtube[2])
|
|
110
|
-
: '';
|
|
111
|
-
// For youtube first params gets priority if duplicates found
|
|
112
|
-
var defaultYouTubePlayerParams = {
|
|
113
|
-
wmode: 'opaque',
|
|
114
|
-
autoplay: 0,
|
|
115
|
-
mute: 1,
|
|
116
|
-
enablejsapi: 1,
|
|
117
|
-
};
|
|
118
|
-
var playerParamsSettings = youTubePlayerParamsSettings || {};
|
|
119
|
-
var youTubePlayerParams = __assign(__assign(__assign({}, defaultYouTubePlayerParams), playerParamsSettings), slideUrlParams);
|
|
120
|
-
var youTubeParams = "?" + param(youTubePlayerParams);
|
|
121
|
-
return youTubeParams;
|
|
122
|
-
};
|
|
123
|
-
var isYouTubeNoCookie = function (url) {
|
|
124
|
-
return url.includes('youtube-nocookie.com');
|
|
125
|
-
};
|
|
126
|
-
var getVimeoURLParams = function (defaultParams, videoInfo) {
|
|
127
|
-
if (!videoInfo || !videoInfo.vimeo)
|
|
128
|
-
return '';
|
|
129
|
-
var urlParams = videoInfo.vimeo[2] || '';
|
|
130
|
-
var defaultVimeoPlayerParams = Object.assign({}, {
|
|
131
|
-
autoplay: 0,
|
|
132
|
-
muted: 1,
|
|
133
|
-
}, defaultParams);
|
|
134
|
-
var defaultPlayerParams = defaultVimeoPlayerParams &&
|
|
135
|
-
Object.keys(defaultVimeoPlayerParams).length !== 0
|
|
136
|
-
? param(defaultVimeoPlayerParams)
|
|
137
|
-
: '';
|
|
138
|
-
// Support private video
|
|
139
|
-
var urlWithHash = videoInfo.vimeo[0].split('/').pop() || '';
|
|
140
|
-
var urlWithHashWithParams = urlWithHash.split('?')[0] || '';
|
|
141
|
-
var hash = urlWithHashWithParams.split('#')[0];
|
|
142
|
-
var isPrivate = videoInfo.vimeo[1] !== hash;
|
|
143
|
-
if (isPrivate) {
|
|
144
|
-
urlParams = urlParams.replace("/" + hash, '');
|
|
145
|
-
}
|
|
146
|
-
urlParams =
|
|
147
|
-
urlParams[0] == '?' ? '&' + urlParams.slice(1) : urlParams || '';
|
|
148
|
-
var privateUrlParams = isPrivate ? "h=" + hash : '';
|
|
149
|
-
defaultPlayerParams = privateUrlParams
|
|
150
|
-
? "&" + defaultPlayerParams
|
|
151
|
-
: defaultPlayerParams;
|
|
152
|
-
var vimeoPlayerParams = "?" + privateUrlParams + defaultPlayerParams + urlParams;
|
|
153
|
-
return vimeoPlayerParams;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Video module for lightGallery
|
|
158
|
-
* Supports HTML5, YouTube, Vimeo, wistia videos
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
* @ref Wistia
|
|
162
|
-
* https://wistia.com/support/integrations/wordpress(How to get url)
|
|
163
|
-
* https://wistia.com/support/developers/embed-options#using-embed-options
|
|
164
|
-
* https://wistia.com/support/developers/player-api
|
|
165
|
-
* https://wistia.com/support/developers/construct-an-embed-code
|
|
166
|
-
* http://jsfiddle.net/xvnm7xLm/
|
|
167
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
|
|
168
|
-
* https://wistia.com/support/embed-and-share/sharing-videos
|
|
169
|
-
* https://private-sharing.wistia.com/medias/mwhrulrucj
|
|
170
|
-
*
|
|
171
|
-
* @ref Youtube
|
|
172
|
-
* https://developers.google.com/youtube/player_parameters#enablejsapi
|
|
173
|
-
* https://developers.google.com/youtube/iframe_api_reference
|
|
174
|
-
* https://developer.chrome.com/blog/autoplay/#iframe-delegation
|
|
175
|
-
*
|
|
176
|
-
* @ref Vimeo
|
|
177
|
-
* https://stackoverflow.com/questions/10488943/easy-way-to-get-vimeo-id-from-a-vimeo-url
|
|
178
|
-
* https://vimeo.zendesk.com/hc/en-us/articles/360000121668-Starting-playback-at-a-specific-timecode
|
|
179
|
-
* https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters
|
|
180
|
-
*/
|
|
181
|
-
var Video = /** @class */ (function () {
|
|
182
|
-
function Video(instance) {
|
|
183
|
-
// get lightGallery core plugin instance
|
|
184
|
-
this.core = instance;
|
|
185
|
-
this.settings = __assign(__assign({}, videoSettings), this.core.settings);
|
|
186
|
-
return this;
|
|
187
|
-
}
|
|
188
|
-
Video.prototype.init = function () {
|
|
189
|
-
var _this = this;
|
|
190
|
-
/**
|
|
191
|
-
* Event triggered when video url found without poster
|
|
192
|
-
* Append video HTML
|
|
193
|
-
* Play if autoplayFirstVideo is true
|
|
194
|
-
*/
|
|
195
|
-
this.core.LGel.on(lGEvents.hasVideo + ".video", this.onHasVideo.bind(this));
|
|
196
|
-
this.core.LGel.on(lGEvents.posterClick + ".video", function () {
|
|
197
|
-
var $el = _this.core.getSlideItem(_this.core.index);
|
|
198
|
-
_this.loadVideoOnPosterClick($el);
|
|
199
|
-
});
|
|
200
|
-
this.core.LGel.on(lGEvents.slideItemLoad + ".video", this.onSlideItemLoad.bind(this));
|
|
201
|
-
// @desc fired immediately before each slide transition.
|
|
202
|
-
this.core.LGel.on(lGEvents.beforeSlide + ".video", this.onBeforeSlide.bind(this));
|
|
203
|
-
// @desc fired immediately after each slide transition.
|
|
204
|
-
this.core.LGel.on(lGEvents.afterSlide + ".video", this.onAfterSlide.bind(this));
|
|
205
|
-
};
|
|
206
|
-
/**
|
|
207
|
-
* @desc Event triggered when a slide is completely loaded
|
|
208
|
-
*
|
|
209
|
-
* @param {Event} event - lightGalley custom event
|
|
210
|
-
*/
|
|
211
|
-
Video.prototype.onSlideItemLoad = function (event) {
|
|
212
|
-
var _this = this;
|
|
213
|
-
var _a = event.detail, isFirstSlide = _a.isFirstSlide, index = _a.index;
|
|
214
|
-
// Should check the active slide as well as user may have moved to different slide before the first slide is loaded
|
|
215
|
-
if (this.settings.autoplayFirstVideo &&
|
|
216
|
-
isFirstSlide &&
|
|
217
|
-
index === this.core.index) {
|
|
218
|
-
// Delay is just for the transition effect on video load
|
|
219
|
-
setTimeout(function () {
|
|
220
|
-
_this.loadAndPlayVideo(index);
|
|
221
|
-
}, 200);
|
|
222
|
-
}
|
|
223
|
-
// Should not call on first slide. should check only if the slide is active
|
|
224
|
-
if (!isFirstSlide &&
|
|
225
|
-
this.settings.autoplayVideoOnSlide &&
|
|
226
|
-
index === this.core.index) {
|
|
227
|
-
this.loadAndPlayVideo(index);
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
/**
|
|
231
|
-
* @desc Event triggered when video url or poster found
|
|
232
|
-
* Append video HTML is poster is not given
|
|
233
|
-
* Play if autoplayFirstVideo is true
|
|
234
|
-
*
|
|
235
|
-
* @param {Event} event - Javascript Event object.
|
|
236
|
-
*/
|
|
237
|
-
Video.prototype.onHasVideo = function (event) {
|
|
238
|
-
var _a = event.detail, index = _a.index, src = _a.src, html5Video = _a.html5Video, hasPoster = _a.hasPoster;
|
|
239
|
-
if (!hasPoster) {
|
|
240
|
-
// All functions are called separately if poster exist in loadVideoOnPosterClick function
|
|
241
|
-
this.appendVideos(this.core.getSlideItem(index), {
|
|
242
|
-
src: src,
|
|
243
|
-
addClass: 'lg-object',
|
|
244
|
-
index: index,
|
|
245
|
-
html5Video: html5Video,
|
|
246
|
-
});
|
|
247
|
-
// Automatically navigate to next slide once video reaches the end.
|
|
248
|
-
this.gotoNextSlideOnVideoEnd(src, index);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
/**
|
|
252
|
-
* @desc fired immediately before each slide transition.
|
|
253
|
-
* Pause the previous video
|
|
254
|
-
* Hide the download button if the slide contains YouTube, Vimeo, or Wistia videos.
|
|
255
|
-
*
|
|
256
|
-
* @param {Event} event - Javascript Event object.
|
|
257
|
-
* @param {number} prevIndex - Previous index of the slide.
|
|
258
|
-
* @param {number} index - Current index of the slide
|
|
259
|
-
*/
|
|
260
|
-
Video.prototype.onBeforeSlide = function (event) {
|
|
261
|
-
if (this.core.lGalleryOn) {
|
|
262
|
-
var prevIndex = event.detail.prevIndex;
|
|
263
|
-
this.pauseVideo(prevIndex);
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
/**
|
|
267
|
-
* @desc fired immediately after each slide transition.
|
|
268
|
-
* Play video if autoplayVideoOnSlide option is enabled.
|
|
269
|
-
*
|
|
270
|
-
* @param {Event} event - Javascript Event object.
|
|
271
|
-
* @param {number} prevIndex - Previous index of the slide.
|
|
272
|
-
* @param {number} index - Current index of the slide
|
|
273
|
-
* @todo should check on onSlideLoad as well if video is not loaded on after slide
|
|
274
|
-
*/
|
|
275
|
-
Video.prototype.onAfterSlide = function (event) {
|
|
276
|
-
var _this = this;
|
|
277
|
-
var _a = event.detail, index = _a.index, prevIndex = _a.prevIndex;
|
|
278
|
-
// Do not call on first slide
|
|
279
|
-
var $slide = this.core.getSlideItem(index);
|
|
280
|
-
if (this.settings.autoplayVideoOnSlide && index !== prevIndex) {
|
|
281
|
-
if ($slide.hasClass('lg-complete')) {
|
|
282
|
-
setTimeout(function () {
|
|
283
|
-
_this.loadAndPlayVideo(index);
|
|
284
|
-
}, 100);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
};
|
|
288
|
-
Video.prototype.loadAndPlayVideo = function (index) {
|
|
289
|
-
var $slide = this.core.getSlideItem(index);
|
|
290
|
-
var currentGalleryItem = this.core.galleryItems[index];
|
|
291
|
-
if (currentGalleryItem.poster) {
|
|
292
|
-
this.loadVideoOnPosterClick($slide, true);
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
this.playVideo(index);
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
/**
|
|
299
|
-
* Play HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
|
|
300
|
-
* @param {number} index - Index of the slide
|
|
301
|
-
*/
|
|
302
|
-
Video.prototype.playVideo = function (index) {
|
|
303
|
-
this.controlVideo(index, 'play');
|
|
304
|
-
};
|
|
305
|
-
/**
|
|
306
|
-
* Pause HTML5, Youtube, Vimeo or Wistia videos in a particular slide.
|
|
307
|
-
* @param {number} index - Index of the slide
|
|
308
|
-
*/
|
|
309
|
-
Video.prototype.pauseVideo = function (index) {
|
|
310
|
-
this.controlVideo(index, 'pause');
|
|
311
|
-
};
|
|
312
|
-
Video.prototype.getVideoHtml = function (src, addClass, index, html5Video) {
|
|
313
|
-
var video = '';
|
|
314
|
-
var videoInfo = this.core.galleryItems[index]
|
|
315
|
-
.__slideVideoInfo || {};
|
|
316
|
-
var currentGalleryItem = this.core.galleryItems[index];
|
|
317
|
-
var videoTitle = currentGalleryItem.title || currentGalleryItem.alt;
|
|
318
|
-
videoTitle = videoTitle ? 'title="' + videoTitle + '"' : '';
|
|
319
|
-
var commonIframeProps = "allowtransparency=\"true\"\n frameborder=\"0\"\n scrolling=\"no\"\n allowfullscreen\n mozallowfullscreen\n webkitallowfullscreen\n oallowfullscreen\n msallowfullscreen";
|
|
320
|
-
if (videoInfo.youtube) {
|
|
321
|
-
var videoId = 'lg-youtube' + index;
|
|
322
|
-
var youTubeParams = getYouTubeParams(videoInfo, this.settings.youTubePlayerParams);
|
|
323
|
-
var isYouTubeNoCookieURL = isYouTubeNoCookie(src);
|
|
324
|
-
var youtubeURL = isYouTubeNoCookieURL
|
|
325
|
-
? '//www.youtube-nocookie.com/'
|
|
326
|
-
: '//www.youtube.com/';
|
|
327
|
-
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-youtube " + addClass + "\" " + videoTitle + " src=\"" + youtubeURL + "embed/" + (videoInfo.youtube[1] + youTubeParams) + "\" " + commonIframeProps + "></iframe>";
|
|
328
|
-
}
|
|
329
|
-
else if (videoInfo.vimeo) {
|
|
330
|
-
var videoId = 'lg-vimeo' + index;
|
|
331
|
-
var playerParams = getVimeoURLParams(this.settings.vimeoPlayerParams, videoInfo);
|
|
332
|
-
video = "<iframe allow=\"autoplay\" id=" + videoId + " class=\"lg-video-object lg-vimeo " + addClass + "\" " + videoTitle + " src=\"//player.vimeo.com/video/" + (videoInfo.vimeo[1] + playerParams) + "\" " + commonIframeProps + "></iframe>";
|
|
333
|
-
}
|
|
334
|
-
else if (videoInfo.wistia) {
|
|
335
|
-
var wistiaId = 'lg-wistia' + index;
|
|
336
|
-
var playerParams = param(this.settings.wistiaPlayerParams);
|
|
337
|
-
playerParams = playerParams ? '?' + playerParams : '';
|
|
338
|
-
video = "<iframe allow=\"autoplay\" id=\"" + wistiaId + "\" src=\"//fast.wistia.net/embed/iframe/" + (videoInfo.wistia[4] + playerParams) + "\" " + videoTitle + " class=\"wistia_embed lg-video-object lg-wistia " + addClass + "\" name=\"wistia_embed\" " + commonIframeProps + "></iframe>";
|
|
339
|
-
}
|
|
340
|
-
else if (videoInfo.html5) {
|
|
341
|
-
var html5VideoMarkup = '';
|
|
342
|
-
for (var i = 0; i < html5Video.source.length; i++) {
|
|
343
|
-
var type = html5Video.source[i].type;
|
|
344
|
-
var typeAttr = type ? "type=\"" + type + "\"" : '';
|
|
345
|
-
html5VideoMarkup += "<source src=\"" + html5Video.source[i].src + "\" " + typeAttr + ">";
|
|
346
|
-
}
|
|
347
|
-
if (html5Video.tracks) {
|
|
348
|
-
var _loop_1 = function (i) {
|
|
349
|
-
var trackAttributes = '';
|
|
350
|
-
var track = html5Video.tracks[i];
|
|
351
|
-
Object.keys(track || {}).forEach(function (key) {
|
|
352
|
-
trackAttributes += key + "=\"" + track[key] + "\" ";
|
|
353
|
-
});
|
|
354
|
-
html5VideoMarkup += "<track " + trackAttributes + ">";
|
|
355
|
-
};
|
|
356
|
-
for (var i = 0; i < html5Video.tracks.length; i++) {
|
|
357
|
-
_loop_1(i);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
var html5VideoAttrs_1 = '';
|
|
361
|
-
var videoAttributes_1 = html5Video.attributes || {};
|
|
362
|
-
Object.keys(videoAttributes_1 || {}).forEach(function (key) {
|
|
363
|
-
html5VideoAttrs_1 += key + "=\"" + videoAttributes_1[key] + "\" ";
|
|
364
|
-
});
|
|
365
|
-
video = "<video class=\"lg-video-object lg-html5 " + (this.settings.videojs && this.settings.videojsTheme
|
|
366
|
-
? this.settings.videojsTheme + ' '
|
|
367
|
-
: '') + " " + (this.settings.videojs ? ' video-js' : '') + "\" " + html5VideoAttrs_1 + ">\n " + html5VideoMarkup + "\n Your browser does not support HTML5 video.\n </video>";
|
|
368
|
-
}
|
|
369
|
-
return video;
|
|
370
|
-
};
|
|
371
|
-
/**
|
|
372
|
-
* @desc - Append videos to the slide
|
|
373
|
-
*
|
|
374
|
-
* @param {HTMLElement} el - slide element
|
|
375
|
-
* @param {Object} videoParams - Video parameters, Contains src, class, index, htmlVideo
|
|
376
|
-
*/
|
|
377
|
-
Video.prototype.appendVideos = function (el, videoParams) {
|
|
378
|
-
var _a;
|
|
379
|
-
var videoHtml = this.getVideoHtml(videoParams.src, videoParams.addClass, videoParams.index, videoParams.html5Video);
|
|
380
|
-
el.find('.lg-video-cont').append(videoHtml);
|
|
381
|
-
var $videoElement = el.find('.lg-video-object').first();
|
|
382
|
-
if (videoParams.html5Video) {
|
|
383
|
-
$videoElement.on('mousedown.lg.video', function (e) {
|
|
384
|
-
e.stopPropagation();
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
if (this.settings.videojs && ((_a = this.core.galleryItems[videoParams.index].__slideVideoInfo) === null || _a === void 0 ? void 0 : _a.html5)) {
|
|
388
|
-
try {
|
|
389
|
-
return videojs($videoElement.get(), this.settings.videojsOptions);
|
|
390
|
-
}
|
|
391
|
-
catch (e) {
|
|
392
|
-
console.error('lightGallery:- Make sure you have included videojs');
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
};
|
|
396
|
-
Video.prototype.gotoNextSlideOnVideoEnd = function (src, index) {
|
|
397
|
-
var _this = this;
|
|
398
|
-
var $videoElement = this.core
|
|
399
|
-
.getSlideItem(index)
|
|
400
|
-
.find('.lg-video-object')
|
|
401
|
-
.first();
|
|
402
|
-
var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
|
403
|
-
if (this.settings.gotoNextSlideOnVideoEnd) {
|
|
404
|
-
if (videoInfo.html5) {
|
|
405
|
-
$videoElement.on('ended', function () {
|
|
406
|
-
_this.core.goToNextSlide();
|
|
407
|
-
});
|
|
408
|
-
}
|
|
409
|
-
else if (videoInfo.vimeo) {
|
|
410
|
-
try {
|
|
411
|
-
// https://github.com/vimeo/player.js/#ended
|
|
412
|
-
new Vimeo.Player($videoElement.get()).on('ended', function () {
|
|
413
|
-
_this.core.goToNextSlide();
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
catch (e) {
|
|
417
|
-
console.error('lightGallery:- Make sure you have included //github.com/vimeo/player.js');
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
else if (videoInfo.wistia) {
|
|
421
|
-
try {
|
|
422
|
-
window._wq = window._wq || [];
|
|
423
|
-
// @todo Event is gettign triggered multiple times
|
|
424
|
-
window._wq.push({
|
|
425
|
-
id: $videoElement.attr('id'),
|
|
426
|
-
onReady: function (video) {
|
|
427
|
-
video.bind('end', function () {
|
|
428
|
-
_this.core.goToNextSlide();
|
|
429
|
-
});
|
|
430
|
-
},
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
catch (e) {
|
|
434
|
-
console.error('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
};
|
|
439
|
-
Video.prototype.controlVideo = function (index, action) {
|
|
440
|
-
var $videoElement = this.core
|
|
441
|
-
.getSlideItem(index)
|
|
442
|
-
.find('.lg-video-object')
|
|
443
|
-
.first();
|
|
444
|
-
var videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
|
|
445
|
-
if (!$videoElement.get())
|
|
446
|
-
return;
|
|
447
|
-
if (videoInfo.youtube) {
|
|
448
|
-
try {
|
|
449
|
-
$videoElement.get().contentWindow.postMessage("{\"event\":\"command\",\"func\":\"" + action + "Video\",\"args\":\"\"}", '*');
|
|
450
|
-
}
|
|
451
|
-
catch (e) {
|
|
452
|
-
console.error("lightGallery:- " + e);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
else if (videoInfo.vimeo) {
|
|
456
|
-
try {
|
|
457
|
-
new Vimeo.Player($videoElement.get())[action]();
|
|
458
|
-
}
|
|
459
|
-
catch (e) {
|
|
460
|
-
console.error('lightGallery:- Make sure you have included //github.com/vimeo/player.js');
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
else if (videoInfo.html5) {
|
|
464
|
-
if (this.settings.videojs) {
|
|
465
|
-
try {
|
|
466
|
-
videojs($videoElement.get())[action]();
|
|
467
|
-
}
|
|
468
|
-
catch (e) {
|
|
469
|
-
console.error('lightGallery:- Make sure you have included videojs');
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
else {
|
|
473
|
-
$videoElement.get()[action]();
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
else if (videoInfo.wistia) {
|
|
477
|
-
try {
|
|
478
|
-
window._wq = window._wq || [];
|
|
479
|
-
// @todo Find a way to destroy wistia player instance
|
|
480
|
-
window._wq.push({
|
|
481
|
-
id: $videoElement.attr('id'),
|
|
482
|
-
onReady: function (video) {
|
|
483
|
-
video[action]();
|
|
484
|
-
},
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
catch (e) {
|
|
488
|
-
console.error('lightGallery:- Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
|
|
493
|
-
var _this = this;
|
|
494
|
-
// check slide has poster
|
|
495
|
-
if (!$el.hasClass('lg-video-loaded')) {
|
|
496
|
-
// check already video element present
|
|
497
|
-
if (!$el.hasClass('lg-has-video')) {
|
|
498
|
-
$el.addClass('lg-has-video');
|
|
499
|
-
var _html = void 0;
|
|
500
|
-
var _src = this.core.galleryItems[this.core.index].src;
|
|
501
|
-
var video = this.core.galleryItems[this.core.index].video;
|
|
502
|
-
if (video) {
|
|
503
|
-
_html =
|
|
504
|
-
typeof video === 'string' ? JSON.parse(video) : video;
|
|
505
|
-
}
|
|
506
|
-
var videoJsPlayer_1 = this.appendVideos($el, {
|
|
507
|
-
src: _src,
|
|
508
|
-
addClass: '',
|
|
509
|
-
index: this.core.index,
|
|
510
|
-
html5Video: _html,
|
|
511
|
-
});
|
|
512
|
-
this.gotoNextSlideOnVideoEnd(_src, this.core.index);
|
|
513
|
-
var $tempImg = $el.find('.lg-object').first().get();
|
|
514
|
-
// @todo make sure it is working
|
|
515
|
-
$el.find('.lg-video-cont').first().append($tempImg);
|
|
516
|
-
$el.addClass('lg-video-loading');
|
|
517
|
-
videoJsPlayer_1 &&
|
|
518
|
-
videoJsPlayer_1.ready(function () {
|
|
519
|
-
videoJsPlayer_1.on('loadedmetadata', function () {
|
|
520
|
-
_this.onVideoLoadAfterPosterClick($el, _this.core.index);
|
|
521
|
-
});
|
|
522
|
-
});
|
|
523
|
-
$el.find('.lg-video-object')
|
|
524
|
-
.first()
|
|
525
|
-
.on('load.lg error.lg loadedmetadata.lg', function () {
|
|
526
|
-
setTimeout(function () {
|
|
527
|
-
_this.onVideoLoadAfterPosterClick($el, _this.core.index);
|
|
528
|
-
}, 50);
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
else {
|
|
532
|
-
this.playVideo(this.core.index);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
else if (forcePlay) {
|
|
536
|
-
this.playVideo(this.core.index);
|
|
537
|
-
}
|
|
538
|
-
};
|
|
539
|
-
Video.prototype.onVideoLoadAfterPosterClick = function ($el, index) {
|
|
540
|
-
$el.addClass('lg-video-loaded');
|
|
541
|
-
this.playVideo(index);
|
|
542
|
-
};
|
|
543
|
-
Video.prototype.destroy = function () {
|
|
544
|
-
this.core.LGel.off('.lg.video');
|
|
545
|
-
this.core.LGel.off('.video');
|
|
546
|
-
};
|
|
547
|
-
return Video;
|
|
548
|
-
}());
|
|
549
|
-
|
|
550
|
-
return Video;
|
|
551
|
-
|
|
552
|
-
})));
|
|
553
|
-
//# sourceMappingURL=lg-video.umd.js.map
|