Skip to content

Commit

Permalink
Fix disbaled screenshot button
Browse files Browse the repository at this point in the history
Add the crossOrigin attribute for videos stored in cloud storage.
  • Loading branch information
lehecht committed Feb 12, 2025
1 parent ea98502 commit c12faef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions resources/assets/js/videos/videoContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default {
hasCrossOriginError: false,
videoFilenames: null,
focusInputFindlabel: false,
isRemote: false,
};
},
computed: {
Expand Down Expand Up @@ -567,6 +568,11 @@ export default {
.then(this.maybeFocusInitialAnnotation)
.then(this.maybeInitCurrentTime);
// storage endpoint requires the crossOrigin attribute if CORS was explicitly enabled
if (!this.isRemote) {
this.video.setAttribute('crossOrigin', '');
}
this.video.src = this.videoFileUri.replace(':id', video.id);
return promise;
Expand Down Expand Up @@ -737,6 +743,7 @@ export default {
this.errors = biigle.$require('videos.errors');
this.user = biigle.$require('videos.user');
this.videoFilenames = biigle.$require('videos.videoFilenames');
this.isRemote = biigle.$require('videos.isRemote');
this.initAnnotationFilters();
this.restoreUrlParams();
Expand Down
1 change: 1 addition & 0 deletions resources/views/videos/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ class="sidebar-container__content"
biigle.$declare('videos.spritesThumbnailInterval', {!! $spritesThumbnailInterval !!});
biigle.$declare('videos.spritesMaxThumbnails', {!! $spritesMaxThumbnails !!});
biigle.$declare('videos.spritesMinThumbnails', {!! $spritesMinThumbnails !!});
biigle.$declare('videos.isRemote', {{$volume->isRemote()}});
</script>
@endpush

0 comments on commit c12faef

Please sign in to comment.