Skip to content

Commit

Permalink
feat: add the possibility to detect scenes through the API
Browse files Browse the repository at this point in the history
  • Loading branch information
nihey committed Jun 21, 2024
1 parent acbdef1 commit 474049f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const cropSubtitleEditor = new CropSubtitleEditor('#video-crop-subtitle-editor',
],
},
},
detectScenes: true, // Enable scene detection (will lead to a loading at the beginning of the video)
crop: {
aspectRatio: 9 / 16, // Aspect ratio in which the video will be cropped (Defaults to 9 / 16)
scenes: [ // Each scene should be placed as an element here
Expand Down
5 changes: 1 addition & 4 deletions demos/crop-subtitle.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@
secondary: {
main: '#f00',
},
white: {
main: '#000',
contrastText: '#fff',
},
},
},
detectScenes: true,
subtitle: {
transcription: {
segments: [
Expand Down
3 changes: 3 additions & 0 deletions src/CropSubtitleEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class AutoeditorCropSubtitleEditor {
input,
data,
crop,
detectScenes,
subtitle,
aspectRatio,
theme,
Expand Down Expand Up @@ -37,6 +38,7 @@ class AutoeditorCropSubtitleEditor {
this.input = input;
this.data = data;
this.crop = crop;
this.detectScenes = detectScenes;
this.theme = theme;
this.subtitle = {
transcription: {
Expand Down Expand Up @@ -88,6 +90,7 @@ class AutoeditorCropSubtitleEditor {
input: this.input,
data: this.data,
crop: this.crop,
detectScenes: this.detectScenes,
subtitle: this.subtitle,
apiKey: this.apiKey,
userId: this.userId,
Expand Down

0 comments on commit 474049f

Please sign in to comment.