Video preview in a chat like app

I have created a chat like app that allows user send video. im using videoplayer plugin to view the video.

Is there a way to show a video preview image like whatsapp does ?

I did something like this.

First, get a “poster” of your video:

<img ng-src="{{path_to_poster}}"/ ng-click="playVideo(file_id)">

and then if your controller call Ionic’s modal window:

$scope.playVideo = function(file_id) {
   $scope.modal.show();
}

that will have your video embedded (you can even use HTML5 video tag)

<video ng-src="{{file_id}}" poster="{{path_to_poster}}">

Is there a way to create the video posters dynamiclly? Taken lets say from the videos first frame or etc…

I am pretty sure you cannot do it with just JS. You have to implement some backend functionality for that.