Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70909

createThumbnail doesn't return all the URLs

$
0
0

@Nikhil1 wrote:

private generateThumbnails( url: string, duration: number, photosCount: number ) {

	return new Promise(( resolve, reject ) => {
		let totalDuration;
		let thumbDurBreak = duration / photosCount;
		let thumbList = [];
		let fileNamePrefix = new Date().getTime().toString();

		for ( var i = 1; i <= photosCount; i++ ) {



			this.videoEditor.createThumbnail( {
				fileUri: this.file.externalRootDirectory + 'Dwindle/testv.mp4',
				outputFileName: new Date().getTime() + "_" + i,
				atTime: thumbDurBreak * i,
				quality: 100
			});
				.then(( result ) => {
					thumbList.push( result );
					if ( thumbList.length == photosCount ) {
						resolve( thumbList );
					}
				})
				.catch( err => {
					reject( err );
				});



		}

	});


}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70909

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>