Cloudkibo / KiboChatDesk

KiboChat for Desktop Application
0 stars 0 forks source link

Logic to download the file in conversation from mobile #15

Closed sojharo closed 7 years ago

sojharo commented 7 years ago

Our files would not be downloaded on initial loading to reduce connection making time. So we would write the logic to download the file from mobile when user wants to download.

sojharo commented 7 years ago

I have worked on it. It is under construction. I am able to get the bits of file coming from mobile. But they aren't converting to file when I merge them. I am looking more into this issue.

jekram commented 7 years ago

Thanks for the update

sojharo commented 7 years ago

I worked on this yesterday I am still having the problems of rendering the downloaded image from mobile on desktop.

jekram commented 7 years ago

@sojharo Please see the dependency for iOS

sojharo commented 7 years ago

Yes Sir working on this task.

sojharo commented 7 years ago

Yesterday, I read few articles on handling binary data on reactjs and html. From learning and demo of article, I found that we need to use canvas in order to render the incoming image attachment. However, different html elements would be used for different type of files on desktop application. We need to break this task into following subtasks as they all will be handled separately.

  1. UI and logic to handle Image attachment
  2. UI and logic to handle audio attachment
  3. UI and logic to handle video attachment
  4. UI and logic to handle document attachment

I have tried the logic of canvas and this work is under construction.

jekram commented 7 years ago

How we were handling this before?

sojharo commented 7 years ago

We were handling in the conference where we used this to do screen sharing coming from android. However, it was separate in logic and did use webrtc data channel and continuously rendered the image. We used angularjs in our conference and in desktop we are using reactjs.

However, the other type of attachments are not done anywhere before. This is our first time that we are moving files using socket.io from mobile to desktop.

jekram commented 7 years ago

I was referring to how this was done with Android Clint to Desktop App?

sojharo commented 7 years ago

Yes, this is part of same task. On Android task, I written the code to send the bits of file when desktop asks for it. In this task, I am merging those bits on desktop side to show them as complete file here.

jekram commented 7 years ago

I am.assuming that Android task is complete. This is a better way of doing same thing? Or how Android did iOS cannot do it? I am not clear on the objective.

sojharo commented 7 years ago

Yes, the task in android was to send the attachment file to the desktop application in form of bytes using socket.io. Now in this task of desktop application, we need to merge these bytes into one file and use that file. If that is image, then show it as image, if that is audio or video, then we should make it playable,

jekram commented 7 years ago

Ok. Thanks

sojharo commented 7 years ago

I worked on this task and I am now able to receive the image attachment from mobile and merge it correctly. I was able to save it to desktop computer and view it. Futher in this task, I would now show the image on canvas as it is merged correctly now.

However, it would help if I open separate tasks for other types of attachments as discussed in https://github.com/Cloudkibo/KiboChatDesk/issues/15#issuecomment-299092457

jekram commented 7 years ago

Go ahead.

sojharo commented 7 years ago

I have completed the work on this task.