|
|
@ -221,7 +221,7 @@ export class VideoContent extends Content { |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
this.video.addEventListener('loadedmetadata', () => { |
|
|
this.video.addEventListener('loadedmetadata', () => { |
|
|
const aspect = this.video.videoWidth / this.video.videoHeight; |
|
|
const aspect = this.video.videoWidth / this.video.videoHeight; |
|
|
const height = 4; // or any desired height
|
|
|
const height = 2; // or any desired height
|
|
|
const width = height * aspect; |
|
|
const width = height * aspect; |
|
|
|
|
|
|
|
|
this.texture = new THREE.VideoTexture(this.video); |
|
|
this.texture = new THREE.VideoTexture(this.video); |
|
|
|