Definitions

  • Comment
    • Text submitted by a user which can be associated with an arbitrary point in time of some video stream. Alternatively, the display object containing such text.
  • Video stream
    • Encompasses both video on-demand and live streams. Video streams are displayed in a rectangular element and have a time axis. Generally uses avideoelement.
  • nicovideo, niconico live
    • Services provided by DWANGO Co., Ltd. nicovideo allows users to submit comments to on-demand video content, while niconico live allows users to submit comments to live streamed video content.

Use cases

  1. nicovideo
    • Before the video is played, the application first retrieves multiple comments to be displayed and prepares them for rendering.
    • The application updates its comment buffer (by polling the server, or when the user submits a comment)
      • Newly updated comments since last retrieval are added all at once
      • Simultaneously, it deletes comments as they become outdated
  2. niconico live
    • When a user begins watching, the application first retrieves multiple comments to be displayed and prepares them for rendering.
    • The application continuously adds new comments in real time (display position is adjusted based on the comment’s timecode).
      • Simultaneously, it deletes comments as they become outdated
  3. Displaying comments over a video stream
    • The application changes the font, text color, and text decoration based on attributes associated with each comment.
    • Each comment is also assigned its own positioning rules. The three basic rules are as follows:
      • (For text that is read left to right) The comment appears from the right edge of the element and moves left until it fully passes the left edge of the element (the reverse is also possible).
      • The comment is displayed statically, stacking up from the bottom edge of the element.
      • The comment is displayed statically, stacking down from the top edge of the element.
    • To improve readability, comments are laid out so as to minimize overlap.
  4. Displaying comments over a video stream (movement animation, time/speed management)
    • Every comment is associated with a fixed entry and exit point along the video stream’s time axis, during which interval any necessary animations are performed.
    • The comments change in direct relation to the video stream’s current time, and (barring the addition or removal of any comments) behave as if they were part of the video stream from the start.
      • Seeking to the same frame of the video stream will always display the same comments, with the same timing, in the same positions.
      • Pausing the video stream will also cause all comment animations to pause, and resuming the video stream will also cause all comment animations to resume.
      • The speed of comment animations also changes to match the speed of playback of the video stream.
    • Prevent blinking.
      • The framerate of comment animations should be able to be set to an arbitrary value, e.g. to match the framerate of the video stream.
  5. Comments can be selected, and some operation performed upon them
    • When a displayed comment is clicked, it may open a pop-up menu, or otherwise allow some action to be performed upon it.
      • For example, copying the comment’s text to the clipboard, or adding it to a filter of undesirable comments that the user wishes to hide.
  6. A region can be defined in which comments are not displayed
    • A mutable region of arbitrary shape can be defined within the element, such that comments within the region are transparent and do not hide the underlying video stream.
  7. Comments can be filtered
    • Comments can be hidden based on filter conditions on the comment data, which may be defined by user preferences.
    • When the filter conditions are changed, the comment rendering changes to reflect them (including unhiding previously hidden comments).
  8. A comments list is displayed in a sidebar (in a separate element from the comments overlaid on the video stream)
    • When sorted by time, the comments list can be scrolled in sync with the video stream playback.

Requirements

  1. The ability to render text overlaid over a playing video stream, as well as to position, reposition, and delete such text (individually or as a group).
    • Decorations such as border, shadow, and semitransparency can be applied to the text.
    • Font, font size, character spacing, and line spacing can be controlled.
      • To aid in layout calculations, the rendered size of the text object (height and width) can be obtained before the text is actually rendered.
    • A border of an arbitrary color can be applied to the text.
    • A movement animation (in an arbitrary direction, at an arbitrary speed) can be added to the text.
    • An arbitrarily-shaped rendering mask can be applied, which hides the portions of comments within its region.
    • It would be preferable if the above properties can be defined using CSS.
  2. Displaying animated text overlaid on a video stream does not cause blinking (the refresh rate can be synced to that of the video stream).
  3. Individual text elements overlaid on a video stream may be clicked or otherwise emit user events that can be captured.
Edit
Pub: 20 Sep 2019 05:23 UTC
Views: 4715