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

feat(FEC-11761): expose stream timed metadata - phase 2 #623

Merged
merged 7 commits into from
Jan 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/track/cue-point.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class CuePoint {
CuePoint.TYPE = {
ID3: 'id3',
EMSG: 'emsg',
CUE_POINT: 'cuepoint',
Copy link
Contributor

Choose a reason for hiding this comment

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

CuePount.Type.CUE_POINT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree it's wired but this is how cuepoint manager works. it generates a cue point of type 'cuepoint'.

CUSTOM: 'custom'
};

Expand Down Expand Up @@ -59,8 +60,13 @@ function createTextTrackCue(cuePoint: CuePoint): TextTrackCue {
*/
function createCuePoint(cue: TextTrackCue): ?CuePoint {
if (cue) {
const {startTime, endTime, id, value} = cue;
return new CuePoint(startTime, endTime, id, _getType(cue), value);
const {
startTime,
endTime,
id,
value: {data}
} = cue;
return new CuePoint(startTime, endTime, id, _getType(cue), data);
}
return null;
}
Expand All @@ -80,6 +86,7 @@ function _getType(cue: TextTrackCue): string {
if (!cuePointType) {
cuePointType = type === 'org.id3' || label === 'id3' ? CuePoint.TYPE.ID3 : CuePoint.TYPE.CUSTOM;
}
//$FlowFixMe
return cuePointType;
}

Expand Down