Design and requirements #2

Closed
opened 2020-09-21 18:17:38 +01:00 by jackhadrill · 2 comments
Owner

I propose a very simple web application where users can either:

  • Create a screen with a link to a H.264 encoded MP4 (something Video.js supports).
  • Join an existing screen from a dropdown menu.

Requirements

  • User must be able to create a screen with the following, mandatory arguments:
    • Screen name
    • Link to H.264 encoded MP4
  • User must be able to join an existing screen using the following, mandatory arguments:
    • Screen ID
  • User must be able to play, pause and seek the screen's video.

Design

Technology stack

  • ASP .NET Core 3.1
  • Entity Framework Core - in-memory SQLite DB. Persistence is not important to us.
  • SignalR Core
  • Vue.js 3.0

Communications

All client / server communications will use SignalR. A hub will be exposed at http(s)://hostname/vcinemahub.

SignalR allows server methods to be called. In response to a server method being called, it is possible to return a value to the caller or broadcast a message to all connected clients, or a group of connected clients.

Server methods

Method prototype Return Message trigger Scope
CreateScreen(string name, string source) Screen ReceiveScreens All
DeleteScreen(int screenId) N/A ReceiveScreens All
WatchScreen(int screenID) Screen ReceiveWatchers Group
LeaveScreen() N/A ReceiveWatchers Group
SetWatcherName(string name) Watcher ReceiveWatchers Group
SetPlayState(bool playing) Screen ReceivePlayState Group
SetPlayState(bool playing, int playOffset) Screen ReceivePlayState Group

Messages

Message name Description
ReceiveScreens A list of screens, including screen IDs and screen names.
ReceiveWatchers A list of watchers' names.
ReceivePlayState The current play position and play state.

Project architecture

image

Schemata

N.B. An improvement might be to use a computed column to calculate the current play position of the video.
image

I propose a very simple web application where users can either: * Create a screen with a link to a H.264 encoded MP4 (something Video.js supports). * Join an existing screen from a dropdown menu. ## Requirements * User must be able to create a screen with the following, mandatory arguments: * Screen name * Link to H.264 encoded MP4 * User must be able to join an existing screen using the following, mandatory arguments: * Screen ID * User must be able to play, pause and seek the screen's video. ## Design ### Technology stack * ASP .NET Core 3.1 * Entity Framework Core - in-memory SQLite DB. Persistence is not important to us. * SignalR Core * Vue.js 3.0 ### Communications All client / server communications will use SignalR. A hub will be exposed at `http(s)://hostname/vcinemahub`. SignalR allows server methods to be called. In response to a server method being called, it is possible to return a value to the caller or broadcast a message to all connected clients, or a group of connected clients. #### Server methods | Method prototype | Return | Message trigger | Scope | | ---------------- | ------ | --------------- | ----- | | `CreateScreen(string name, string source)` | Screen | `ReceiveScreens` | All | | `DeleteScreen(int screenId)` | N/A | `ReceiveScreens` | All | | `WatchScreen(int screenID)` | Screen | `ReceiveWatchers` | Group | | `LeaveScreen()` | N/A | `ReceiveWatchers` | Group | | `SetWatcherName(string name)` | Watcher | `ReceiveWatchers` | Group | | `SetPlayState(bool playing)` | Screen | `ReceivePlayState` | Group | | `SetPlayState(bool playing, int playOffset)` | Screen | `ReceivePlayState` | Group | #### Messages | Message name | Description | | ------------ | ----------- | | `ReceiveScreens` | A list of screens, including screen IDs and screen names. | | `ReceiveWatchers` | A list of watchers' names. | | `ReceivePlayState` | The current play position and play state. | ### Project architecture ![image](/attachments/904ca00f-9dc9-408b-98c8-cbe71a397c56) ### Schemata N.B. An improvement might be to use a computed column to calculate the current play position of the video. ![image](/attachments/bf8118b5-70a8-4c5c-8609-a23af3dafd1b)
Member

Q: do we give a shit about room owners and only them being able to change play state

👍 reduces chances of drunken trolling
👎 they fall asleep while and press pause by accident

Q: do we give a shit about room owners and only them being able to change play state 👍 reduces chances of drunken trolling 👎 they fall asleep while and press pause by accident
Author
Owner

image

![image](/attachments/5a65b1aa-cb56-44d4-b566-acc9c14f6310)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TerribleCodeClub/VCinema#2
No description provided.