profile
viewpoint
Gary Katsevman gkatsev Boston http://gkatsev.com/ Food, tea, javascript, web players, captions, science fiction.

afeld/backbone-nested 447

A plugin to make Backbone.js keep track of nested attributes - looking for maintainers! https://github.com/afeld/backbone-nested/issues/157

gkatsev/babel-plugin-inline-json 8

Use babel to inline JSON files or fields.

gkatsev/chrome-debugger 5

An node.js interface to chrome remote debugging protocol

gkatsev/dotfiles 3

My dotfiles

gkatsev/cekopt 2

Pocket Article Sorter

gkatsev/awesome-video 1

A curated list of awesome streaming video tools, frameworks, libraries, and learning resources.

gkatsev/can-autoplay 1

The auto-play feature detection in HTMLMediaElement (<audio> or <video>).

gkatsev/container-query-polyfill 1

A polyfill for CSS Container Queries

Pull request review commentvideojs/video.js

fix: throttle clickable commponent

 class ClickableComponent extends Component {       this.controlText(this.options_.controlText);     } +    const selectClickHandler = () => {+      if (typeof this.options_.throttle === 'number' || this.options_.throttle === true) {+        const wait = typeof this.options_.throttle === 'number' ? parseInt(this.options_.throttle, 10) : 50;

Also, should this be parseFloat instead of parseInt?

Essk

comment created time in 2 days

Pull request review commentvideojs/video.js

fix: throttle clickable commponent

 class ClickableComponent extends Component {       this.controlText(this.options_.controlText);     } +    const selectClickHandler = () => {+      if (typeof this.options_.throttle === 'number' || this.options_.throttle === true) {+        const wait = typeof this.options_.throttle === 'number' ? parseInt(this.options_.throttle, 10) : 50;++        return throttle(this.handleClick.bind(this), wait);+      }+      return this.handleClick.bind(this);+    };++    const selectedClickHander = selectClickHandler();+     this.handleMouseOver_ = (e) => this.handleMouseOver(e);     this.handleMouseOut_ = (e) => this.handleMouseOut(e);-    this.handleClick_ = (e) => this.handleClick(e);

since we still want a bound handleClick inside of selectedClickHandler, should we keep this around somewhere and use that rather than rebinding inside selectedClickHandler?

Essk

comment created time in 2 days

Pull request review commentvideojs/video.js

fix: throttle clickable commponent

 class ClickableComponent extends Component {       this.controlText(this.options_.controlText);     } +    const selectClickHandler = () => {+      if (typeof this.options_.throttle === 'number' || this.options_.throttle === true) {+        const wait = typeof this.options_.throttle === 'number' ? parseInt(this.options_.throttle, 10) : 50;++        return throttle(this.handleClick.bind(this), wait);+      }+      return this.handleClick.bind(this);+    };++    const selectedClickHander = selectClickHandler();+     this.handleMouseOver_ = (e) => this.handleMouseOver(e);     this.handleMouseOut_ = (e) => this.handleMouseOut(e);-    this.handleClick_ = (e) => this.handleClick(e);+    this.handleClick_ = (e) => selectedClickHander(e);
    this.handleClick_ = (e) => selectedClickHandler(e);
Essk

comment created time in 2 days

Pull request review commentvideojs/video.js

fix: throttle clickable commponent

 class ClickableComponent extends Component {    * @param  {string} [options.className]    *         A class or space separated list of classes to add the component    *+   * @param  {number | boolean} [options.throttle]+   *         A throttle will be applied to the clickHander if the number is >= 1 or the value is `true`+   *         A number specifies the desired wait time in ms or a default wait of 50ms will be applied

any details on how 50 was chosen as the default?

Essk

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentvideojs/rfcs

feat: Spatial Navigation

+- Feature Name: Spatial Navigation+- Start Date: 2023-09-12+- PR: https://github.com/videojs/rfcs/pull/2++# Summary+[summary]: #summary++This feature aims to improve user experience and accessibility on smartTV devices by enabling seamless navigation through interactive elements within the Video.js player using remote control arrow keys.++# Motivation+[motivation]: #motivation++Smart TV devices commonly use directional input, such as arrow keys on a remote control. By implementing spatial navigation using the spatial navigation polyfill, we aim to ensure that users can intuitively navigate through player controls and elements on smartTV devices.++### Goals+- Enable seamless and intuitive navigation within the Video.js player on smart TV platforms.+- Create a new SpatialNavigation component.+- Implement the spatial navigation polyfill.+- Redesign the Video.js user interface to suit smart TV platforms and facilitate spatial navigation.++### Non-Goals+- Keycode mapping for smartTV devices that use non-standardized keycodes. The spatial navigation polyfill uses 37: 'left', 38: 'up', 39: 'right', and 40: 'down'.++# Guide-level Explanation+[guide-level-explanation]: #guide-level-explanation++Smart TV users will be able to navigate through Video.js player controls using arrow keys on their remote controls. The player will have an initial focus; when a user presses, for example, the "right" arrow key, the focus will shift to the next interactive control, allowing them to easily navigate through player UI elements. Focused UI elements will be selectable using the ENTER/OK button on the RCU.++In order to allow the user to navigate out of the progress bar (Slider), the UP and DOWN buttons will not call the stepForward and stepBack functions, as is now. The LEFT and RIGHT buttons will retain the same functions but only when the progress bar (Slider) is in focus.++# Reference-level explanation+[reference-level-explanation]: #reference-level-explanation++## Dependency Management and Configuration Options+For this feature, additional dependencies will be added: spatial-navigation-polyfill and flat-polyfill. Flat-polyfill is needed to accommodate devices lacking support for Array.prototype.flat.++To introduce configurational flexibility, a new configuration option `enableRCUNavigation` will be introduced. This option will enable or disable the spatial navigation feature.++## Bundle Size Considerations+At this stage, we haven't precisely determined the impact of the spatial navigation feature on the bundle size. If the integration of spatial navigation results in a significant growth in the bundle size, we‘ll introduce an alternative Video.js bundle with a spatial navigation feature included.++## Code and UI changes++This new feature will follow these steps:+- Introduce a public option named `enableRCUNavigation`.+- When a player is set up with the rcu navigation feature active, initiate the SpatialNavigation instance.+- Collect every focusable component and incorporate them into the SpatialNavigation instance.+- Focus first available navigable candidate.+- Once an arrow is pressed we should go through Basic Spatial Navigation Heuristics (call navigate(direction))+  - Find Candidates+  - Select the best candidate+  - Focus the best candidate++### In terms of changes to the code:++We need to make sure that events can still move upwards when spatial navigation is turned on (`enableRCUNavigation` is set to true). Currently, it’s blocking all keydown events with `event.stopPropagation()`, except for TAB key.+Block the UP and DOWN keys to execute `stepForward()` and `stepBack()` functions, as these keys will be needed for navigation from and to the progress bar (Slider).++### In terms of adding the code++Spatial-navigation interface and Component class extension++```+interface Positions {+boundingClientRect: DOMRectReadOnly;+center: DOMRectReadOnly;+}++interface Component {+// Is considered as focusable component.+getIsFocusable(): boolean;+// Is currently visible/enabled/etc...+getIsAvailableToBeFocused(): boolean;+// on focus handler+handleFocus(): void;+// on blur handler+handleBlur(): void;+// on submit handler+handleEnter(): void;+// component's element boundingClientRect and center+getPositions(): Positions;+// focus component's element+focus(): void;+}++enum SpatialNavigationDirection {+Left = 'left',+Right = 'right',+Up = 'up',+Down = 'down'+}++interface SpatialNavigation {+// current focusable components:+getComponents(): Set<Component>;+// start list keydown events+start(): void;+// stop listen key down events+stop(): void;+// add focusable component+add(component: Component): void;+// remove focusable component+remove(component: Component): void;+// temporary pause spatial navigation+pause(): void;+// resume spatial navigation+resume(): void;+// clear current list of focusable components+clear(): void;+// run spatial navigation Heuristics (re-use https://github.com/WICG/spatial-navigation/blob/main/polyfill/spatial-navigation-polyfill.js#L147)+move(direction: SpatialNavigationDirection): void;+}+```++### In terms of changes the UI+- Since LEFT and RIGHT keys are reserved for video seeking, we’ll have to change the UI and move the progress bar on top of the buttons in order to allow the users to use those keys to navigate between elements when buttons are focused and seek the video when the progress bar is focused+- Current player controls are too small for big screens, so we’re aiming to make those bigger

This could be a good candidate for a follow-up RFC to fully think through all the potential issues with making the controls big for big screens.

bzizmo

comment created time in 3 days

Pull request review commentvideojs/video.js

Enhanced logger

 export default function createLogger(name) {   };    // This is the logByType helper that the logging methods below use-  logByType = LogByTypeFactory(name, log);+  logByType = LogByTypeFactory(name, log, styles);    /**-   * Create a new sublogger which chains the old name to the new name.+   * Create a new subLogger which chains the old name to the new name.    *    * For example, doing `videojs.log.createLogger('player')` and then using that logger will log the following:    * ```js    *  mylogger('foo');    *  // > VIDEOJS: player: foo    * ```    *-   * @param {string} name+   * @param {string} subName    *        The name to add call the new logger+   * @param {string} [subDelimiter]+   *        Optional delimiter+   * @param {string} [subStyles]+   *        Optional styles+   * @return {Object}+   */+  log.createLogger = (subName, subDelimiter, subStyles) => {+    const resultDelimiter = subDelimiter !== undefined ? subDelimiter : delimiter;+    const resultStyles = subStyles !== undefined ? subStyles : styles;+    const resultName = `${name} ${resultDelimiter} ${subName}`;++    return createLogger(resultName, resultDelimiter, resultStyles);+  };++  /**+   * Create a new logger.+   *+   * @param {string} newName+   *        The name for the new logger+   * @param {string} [newDelimiter]+   *        Optional delimiter+   * @param {string} [newStyles]+   *        Optional styles    * @return {Object}    */-  log.createLogger = (subname) => createLogger(name + ': ' + subname);+  log.createNewLogger = (newName, newDelimiter, newStyles) => {

An alternative to creating a new function is to switch to an options object. If it's a string use the old method signature, if it's an object use the new one.

dzianis-dashkevich

comment created time in 9 days

PullRequestReviewEvent
CommitCommentEvent

issue commentvideojs/video.js

Some m3u8 cannot be played ?

Nice sleuthing @mister-ben!

dysibai

comment created time in 12 days

issue commentvideojs/video.js

Some m3u8 cannot be played ?

Desktop players have different considerations. Something on the backend is configuring it so Video.js can't play. Other web players can't play either. The only thing that can be configured that might help is withCredentials https://github.com/videojs/http-streaming#withcredentials, but from a quick trial, I didn't see it help anything.

dysibai

comment created time in 13 days

issue commentvideojs/video.js

Some m3u8 cannot be played ?

Seems like your stream is misconfigured. Segments are returning an HTTP 403 error when Video.js tries to download it.

dysibai

comment created time in 13 days

Pull request review commentvideojs/rfcs

feat: Spatial Navigation

+- Feature Name: Spatial Navigation+- Start Date: 2023-09-12+- PR: https://github.com/videojs/rfcs/pull/2++# Summary+[summary]: #summary++This feature aims to improve user experience and accessibility on smartTV devices by enabling seamless navigation through interactive elements within the Video.js player using remote control arrow keys.++# Motivation+[motivation]: #motivation++Smart TV devices commonly use directional input, such as arrow keys on a remote control. By implementing spatial navigation using the spatial navigation polyfill, we aim to ensure that users can intuitively navigate through player controls and elements on smartTV devices.++### Goals+- Enable seamless and intuitive navigation within the Video.js player on smart TV platforms.+- Create a new SpatialNavigation component.+- Implement the spatial navigation polyfill.+- Redesign the Video.js user interface to suit smart TV platforms and facilitate spatial navigation.++### Non-Goals+- Keycode mapping for smartTV devices that use non-standardized keycodes. The spatial navigation polyfill uses 37: 'left', 38: 'up', 39: 'right', and 40: 'down'.++# Guide-level Explanation+[guide-level-explanation]: #guide-level-explanation++Smart TV users will be able to navigate through Video.js player controls using arrow keys on their remote controls. The player will have an initial focus; when a user presses, for example, the "right" arrow key, the focus will shift to the next interactive control, allowing them to easily navigate through player UI elements. Focused UI elements will be selectable using the ENTER/OK button on the RCU.++In order to allow the user to navigate out of the progress bar (Slider), the UP and DOWN buttons will not call the stepForward and stepBack functions, as is now. The LEFT and RIGHT buttons will retain the same functions but only when the progress bar (Slider) is in focus.++# Reference-level explanation+[reference-level-explanation]: #reference-level-explanation++## Dependency Management and Configuration Options+For this feature, additional dependencies will be added: spatial-navigation-polyfill and flat-polyfill. Flat-polyfill is needed to accommodate devices lacking support for Array.prototype.flat.

Another reason not to include the polyfill by default is filesize. The polyfill is 72K ungzipped and 14K gzipped. (It could be a bit smaller if also minified). 14K isn't an insignificant amount to add.

(When minified, it goes down to 34K and 7K mingzipped)


Methods that depend on native spatial navigation (or a polyfill) would simply become no-ops when that support does not exist.

👍🏻

bzizmo

comment created time in 17 days

PullRequestReviewEvent

issue commentvideojs/video.js

Captions are not displaying for Dash streams but they are visible for HLS streams.

Seems like 608 is still not available for DASH based on my comment ( https://github.com/videojs/http-streaming/issues/391#issuecomment-862580301 )

lalit-tudip

comment created time in a month

pull request commentvideojs/rfcs

feat: Content Steering

🎉 congrats on the first RFC

adrums86

comment created time in a month

create barnchgkatsev/shaka-player

branch : assignment

created branch time in a month

fork gkatsev/shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player

fork in a month

issue commentvideojs/m3u8-parser

How can I parse one m3u8 after one

Push is used to give incomplete pieces of the manifest. If you want to parse another manifest, you should create a new parser.

QinPoetry

comment created time in 2 months

issue closedvideojs/video.js

Can vide js fix the missing MediaSource in ios safari?

Can video js fix the missing MediaSource in ios safari?

closed time in 2 months

Quintis1212

issue commentvideojs/video.js

Can vide js fix the missing MediaSource in ios safari?

No, this is a platform limitation. MSE isn't available right now on iPhones (iOS Safari). It is available on iPad and desktop Safari.

Quintis1212

comment created time in 2 months

pull request commentvideojs/rfcs

feat: Content Steering

seems like we don't have collaborator privileges for this repo (gray approval mark)

Fixed

adrums86

comment created time in 2 months

Pull request review commentvideojs/video.js

fix(svg-icons): default icons color

   background-repeat: no-repeat;   background-position: center; -  fill: #FFFFFF;+  fill: currentColor;

yeah, interesting that mdn doesn't document it like the spec. I would always err on the side of the spec, if possible.

amtins

comment created time in 2 months

PullRequestReviewEvent

Pull request review commentvideojs/video.js

fix(svg-icons): default icons color

   background-repeat: no-repeat;   background-position: center; -  fill: #FFFFFF;+  fill: currentColor;

Looks like it https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#currentcolor_keyword though, I think it's case-insensitive

amtins

comment created time in 2 months

PullRequestReviewEvent

issue closedvideojs/generator-videojs-plugin

1

https://github.com/kdrag0n

closed time in 2 months

Shakri007

issue closedvideojs/generator-videojs-plugin

1

https://github.com/topjohnwu/libsu/tree/docs

closed time in 2 months

Shakri007
more