textmode.js / media / TextmodeVideo
Class: TextmodeVideo
Video source for textmode rendering.
Create one with Textmodifier.loadVideo, draw it with Textmodifier.image, control playback with video methods, and configure conversion through inherited chainable methods.
Example
Extends
Accessors
| Accessor | Description |
|---|---|
| currentTime | Current playback time in seconds. |
| duration | Total video duration in seconds. |
| height | Ideal draw height in grid cells. |
| isPlaying | Whether the video is currently playing. |
| originalHeight | Original source height in pixels. |
| originalWidth | Original source width in pixels. |
| source | Source element this texture captures. |
| texture | WebGL texture backing this source. |
| videoElement | Underlying HTML video element. |
| width | Ideal draw width in grid cells. |
Methods
| Method | Description |
|---|---|
| background | Set the background color used for transparent pixels. |
| brightnessRange | Capture only source pixels whose brightness is inside the inclusive byte range. |
| cellColor | Set the cell color used when cellColorMode is 'fixed'. |
| cellColorMode | Set whether cell color is sampled from the source or fixed. |
| characters | Set the characters used for brightness mapping. |
| charColor | Set the character color used when charColorMode is 'fixed'. |
| charColorMode | Set whether character color is sampled from the source or fixed. |
| charRotation | Rotate generated characters. |
| clearConversions | Clear this source's conversion stack and return to single-mode conversion. |
| conversionMode | Select the conversion mode for this source. |
| conversions | Set an ordered conversion stack for this source. |
| dispose | Dispose the video source and release the backing media element. |
| flipX | Flip the source horizontally. |
| flipY | Flip the source vertically. |
| invert | Enable or disable source color inversion. |
| loop | Set whether the video loops. |
| pause | Pause video playback. |
| play | Start video playback. |
| speed | Set playback speed. |
| stop | Stop the video and seek to the beginning. |
| time | Seek to a playback time. |
| volume | Set playback volume. |