Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Draft #2

Open
wants to merge 54 commits into
base: review-branch
Choose a base branch
from
Open

First Draft #2

wants to merge 54 commits into from

Conversation

AlbertSmit
Copy link
Contributor

@AlbertSmit AlbertSmit commented Aug 15, 2023

Changes

  • Configure hook to obtain subtitles from native text tracks.

@AlbertSmit AlbertSmit self-assigned this Aug 15, 2023
@socket-security
Copy link

socket-security bot commented Aug 15, 2023

New and updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
react-player 2.12.0 filesystem +4 1.88 MB cookpete
@kaliber/build 0.0.125...0.0.142 None +31/-92 6.54 MB pkuepers

@AlbertSmit AlbertSmit requested a review from peeke August 15, 2023 11:59
Copy link

@peeke peeke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lekker bezig hoor! Ik heb het idee dat sommige stukken nog ingewikkelder of 'mooier' zijn dan nodig, misschien daar nog even over sparren. Ook goed om later Erik hier ook nog eens naar te laten kijken.

example/src/Karaoke.js Outdated Show resolved Hide resolved
readme.md Outdated
| Key | Initial values | Description |
|-----------------| --- |---------------------------------------------------------------------------------------------------------------|
| `subtitles` | `[]` | An array of all subtitles available for the specified language. |
| `current` | See below. | An object representing the currently active subtitle and metadata, with metadata containing the properties `startTime`, `endTime`, and `text`, and subtitle also containing `voice`[^1]. |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik zou hier een andere naam aan geven, zodat je meteen snapt wat erin zit. Nu doet current me teveel denken aan een ref, waardoor ik het idee heb dat er iets sketchies gebeurt (wat niet zo is). Wellicht active of activeSubtitle

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had ik ook, ik zou gaan voor activeSubtitle

src/machinery/utilities.js Outdated Show resolved Hide resolved
src/machinery/utilities.js Outdated Show resolved Hide resolved
@@ -0,0 +1,23 @@
/** @param {{ text: string }} _*/
export function getVoiceFromCue({ text }) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zou text dan niet cue moeten heten?

src/useSubtitles.js Outdated Show resolved Hide resolved
src/useSubtitles.js Outdated Show resolved Hide resolved
src/useSubtitles.js Outdated Show resolved Hide resolved
src/useSubtitles.js Outdated Show resolved Hide resolved
src/useSubtitles.js Outdated Show resolved Hide resolved
Copy link
Member

@EECOLOR EECOLOR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geen gek idee om een keer samen te zitten. Ik denk dat we best wel wat dingen iets makkelijker kunnen maken.

Is wel altijd een tricky om vanuit React met dingen uit de DOM te communiceren :-D

Wel leuk projectje!

example/src/Karaoke.js Outdated Show resolved Hide resolved
example/src/Karaoke.js Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Show resolved Hide resolved

| Key | Initial values | Description |
|-----------------| --- |---------------------------------------------------------------------------------------------------------------|
| `subtitles` | `[]` | An array of all subtitles available for the specified language. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deze zag ik volgens mij niet in de voorbeelden in de readme terug komen

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Het is ook nog onduidelijk wat de structuur is van subtitles, Ik zou gokken dat het dit is:

subtitles: Array<Subtitle>
activeSubtitle: Subtitle
ref: React.Ref

En dan kun je Subtitle beschrijven.

src/useSubtitles.js Outdated Show resolved Hide resolved
src/useSubtitles.js Outdated Show resolved Hide resolved
src/machinery/useCallbackRef.js Outdated Show resolved Hide resolved
src/useSubtitles.js Outdated Show resolved Hide resolved
src/useSubtitles.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants