-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teacher session #162
base: live
Are you sure you want to change the base?
Teacher session #162
Conversation
Visit the preview URL for this PR (updated for commit e54e371): https://joie-app--pr162-teacher-session-crl1q2ip.web.app (expires Sat, 14 Nov 2020 10:28:47 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- hook to the Kaltura final confirmation of success on the backend after its progress, so that we trigger the session document video reference property update on firebase.
- upload component on session page should only be visible to an owner of a session
- make sure upload is secure, so that only an owner can upload a video
- garbage collect replaced videos on new upload (delete previous video from the Kaltura storage)
- progress bar indication of upload state
- add the ability to replace a current video by a new one
- upload area should be wrapped by mat-card
- as the Kaltura video processing take quite a while we may should a pending indicator to let users be aware
- once the video upload has finished I couldn't see the new video replacing the uploader. only when I refreshed the page. firestore should be easily reactive with data and we can hook to the document observable to reactively show the new video
- trying to upload specific video of mine result in a blank rectangle. the video is a webm file
|
|
Which session? |
@snowman562 4CJrFfb53KVLOuivduYV |
And it's very strange why you can upload on the session that's not owned by you. It shouldn't be. Please recheck latest commits and show me full screenshot(with session id and login detail) |
now all sessions have the same video, which is odd
|
Comments: Hi, I have a couple of questions about it. Once the video and the photo is uploaded the UI should no longer be there, only on editing mode. |
UI was built based on your design, but it's updated after discussing with @yinonov . Please confirm it with him. |
uiconf_id: 46213871, | ||
flashvars: {}, | ||
cache_st: 1602684332, | ||
entry_id: '1_v3d6yfj9', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this value coming from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yinonov as I am seeing I guess the entry_id
it should come from session
object and the others from kalturaConfiguration
entryId: this.entryId, | ||
entryLastUpdated: new Date().getTime(), | ||
}) | ||
.subscribe(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subscriptions must be unsubscribed at some point. add the untilDestroy
decorator and pipe as we do in other subscriptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yinonov adjusted this, using the untilDestroy
entryLastUpdated: new Date().getTime(), | ||
}) | ||
.subscribe(() => { | ||
window.location.reload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can cause issues if user is in editing process or reading. can be really bad ui-wise.
I'd suggest the following practice:
entryLastUpdated
should also be an input and a member of the app-video-player
component. then we would be able to hook to SimpleChanges
conditionally to observe entryLastUpdated
and trigger the video embedding on ngOnChanges
instead of ngOnInit
in KalturaVodPlayerComponent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yinonov this pice of code doesn't exists anymore
.subscribe(() => { | ||
window.location.reload(); | ||
}); | ||
}, 60000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the best we can do? no hook to actual completion indication by Kaltura's observable?
Reply from Kaltura on issues we face -
points taken:
|
this.sessionsFacade | ||
.setSession(this.sessionId, { | ||
entryId: this.entryId, | ||
entryLastUpdated: new Date().getTime(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- firebase stores its own timestamp in documents when it's provided with a js Date value. so better to remove the
getTime
method - such practices should be done on cloud function event triggers. hook to session doc update and set the
new Date()
- what is the use of the
entryLastUpdated
anyway?
…creation on server side
…creation on server side
…creation on server side
…creation on server side
…creation on server side
…creation on server side
…creation on server side
Hi @LolaRev, I have this situation of a session which has video but alongside it is also visible the upload form as shown in the following image: what do you suggest for this case in UI perspective? Thanks. |
@ilirhushi @yinonov that was an issue that wasn't clear to me (I comment on it on the other task). There are 2 components for uploading a video:
The way it was built is that you have 2 different videos and it is not how it should be. (this is why you have another screen at the bottom). Since we decided not to have the intro video to begin with and only a thumbnail photo, we need to have the option to add it while uploading the video. It should be a separate image for a thumbnail. I hope it is clear now. Let me know if you have any questions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review still in progress
I'm aware of the fact most of the is inherited
@@ -51,6 +52,7 @@ import { NgxAuthFirebaseUIModule } from 'ngx-auth-firebaseui'; | |||
// provide: ORIGIN, | |||
// useValue: environment.production ? undefined : 'http://localhost:5001', | |||
// }, | |||
KalturaClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required everywhere on the app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep the KalturaClient
is used at KalturaApiHandShakeService
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we create a kaltura module of our own to be imported where needed? that way we could also remove the script fetch in
joie-web-app/apps/joie/src/index.html
Lines 30 to 33 in d842a6f
<script | |
src="https://cdnapisec.kaltura.com/p/2976751/sp/297675100/embedIframeJs/uiconf_id/46180971/partner_id/2976751" | |
defer | |
></script> |
<app-video-player [entryId]="entryId" [entryLastUpdated]="entryLastUpdated"></app-video-player> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we need this entryLastUpdated
. Will break anything if we remove it from the app totally?
This whole component actually seems like just a proxy to the VOD player component. Consider removing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yinonov If we remove it I guess it will not break anything, is just a timestamp on when the entry was updated on Kaltura side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as @pfuternik suggested, entry shouldn't be updated but deleted, and create a new entry. so this should probably be removed
<mat-tab label="Image"> | ||
<h3 class="joie-list-name">Upload a thumbnail image</h3> | ||
<mat-spinner style="margin: auto" *ngIf="uploading"></mat-spinner> | ||
<ngx-file-drop dropZoneLabel="Drop files here" (onFileDrop)="dropped($event)" accept="image/*" *ngIf="!uploading"> | ||
<ng-template ngx-file-drop-content-tmp let-openFileSelector="openFileSelector"> | ||
<div class="mt-3">Drop your file here or</div> | ||
<button mat-flat-button color="primary" (click)="uploadImgControl.click()" type="button" | ||
class="uploadBtn" [disabled]="uploading"> | ||
<span *ngIf="!uploading">Browse</span> | ||
</button> | ||
</ng-template> | ||
</ngx-file-drop> | ||
<h5 class="border-bottom"> | ||
Size: 1280x720 px. Formats: JPG, GIF, or PNG. | ||
</h5> | ||
</mat-tab> | ||
</mat-tab-group> | ||
<input hidden="true" type="file" accept="image/*" #uploadImgControl (change)="onClickFile($event)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The should be an own dedicated component for image handling. We also use image thumbnail picker in session form so we should unite.
The should be split to 3 parts
- File picker & dropzone
- Video upload handler (service?)
- Image upload handler (service?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yinonov so basically I tried to refactor and have them in service: KalturaApiHandShakeService
, having Video & Image upload handler in one service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u mean ur on that? working out?
); | ||
} | ||
|
||
fileReplace() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pfuternik suggested to delete an entry of video and replace by a new video and entry. This seems like a backend concern as when a new video ref is about to override a previous one, then we should delete that previous entry video before setting the new ref.
} | ||
} | ||
|
||
public dropped(files: NgxFileDropEntry[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be extracted to a dedicated component
Please review and let me know