Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Do not attempt to show videos in the UI if their transcode status is not "ready". #294

Open
rjw57 opened this issue Sep 11, 2018 · 1 comment

Comments

@rjw57
Copy link
Member

rjw57 commented Sep 11, 2018

We have the transcode status as returned by the Management API recorded by jwpfetch.

MediaItems whose JWP status is not "ready" should 404 when embedded and not be presented in the UI. Instead, the UI should have a message indicating that the media item has not yet finished processing or, if there was an error, any error information returned by JWP should be shown.

Expose the transcode status in the api. There should be a "status" field in the media detail response with the following values:

  • "created" - Media Item was created but there is no uploaded video
  • "processing" - Media Item has had a file uploaded.
  • "ok" - Media Item transcode completed
  • "error" - Media Item transcode errored

If "status" is "error", then the "errorDescription" field in the media detail response should contain a description of the error as returned from JWP.

Unfortunately we cannot detect at the moment when a user finishes uploading a video.

rjw57 added a commit to rjw57/sms-webapp that referenced this issue Sep 18, 2018
As noted in uisautomation#294, there needs to be some better tracking of state for
videos. After re-reading uisautomation#294, I don't think we need to track state in
the MediaItem model *just yet* since we have it available on the JWP
CachedResource object.

This commit fixes an immediate pain point in that videos will be
published even if they have not yet been transcoded. We update the
publication check to *NOT* publish if:

1. The publication date is in the future.
2. There is a JWP video associated with the item and the video's status
   is not "ready".

We no longer need the NULL published_at check because or database
disallows NULL publication dates (introduced in commit 809931c).
@rjw57
Copy link
Member Author

rjw57 commented Sep 18, 2018

If #311 is merged, some of this work will be done. #311 makes sure that items whose associated JWP video's state is not "ready" are not published. As discussed in the description of that PR, the remaining work to close this issue is:

  1. Create a "jwpfetch lite" task which can be run more frequently and which polls only the JWP videos we think are in the "created" or "processing" states.
  2. Notify users when a video transitions to the "error" state.

@rjw57 rjw57 changed the title Do not attemtp to show videos in the UI if their transcode status is not "ready". Do not attempt to show videos in the UI if their transcode status is not "ready". Sep 18, 2018
rjw57 added a commit to rjw57/sms-webapp that referenced this issue Sep 20, 2018
As noted in uisautomation#294, there needs to be some better tracking of state for
videos. After re-reading uisautomation#294, I don't think we need to track state in
the MediaItem model *just yet* since we have it available on the JWP
CachedResource object.

This commit fixes an immediate pain point in that videos will be
published even if they have not yet been transcoded. We update the
publication check to *NOT* publish if:

1. The publication date is in the future.
2. There is a JWP video associated with the item and the video's status
   is not "ready".

We no longer need the NULL published_at check because or database
disallows NULL publication dates (introduced in commit 809931c).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant