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

Move next should respect the QuickLoop bounds #31

Open
wants to merge 3 commits into
base: bbc-release52
Choose a base branch
from

Conversation

mint-dewit
Copy link
Collaborator

No description provided.

let rawParts = playoutModel.getAllOrderedParts()
let allowWrap = false // whether we should wrap to the first part if the curIndex + delta exceeds the total number of parts

const quickLoopService = new QuickLoopService(_context, playoutModel)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if this is a desirable solution or if the specific method should be exposed through the PlayoutModel instead.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if it should be, but as we have getSegmentsBetweenQuickLoopMarker exposed on the PlayoutModel, it would be reasonable and consistent to expose this one too.

Copy link
Collaborator

@Julusian Julusian left a comment

Choose a reason for hiding this comment

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

It would be great to have some unit tests for selectNewPartWithOffsets if you feel up to writing some. Same for getPartsBetweenMarkers.
I know there aren't any for either thing already, so I don't mind if you dont

@@ -76,5 +76,5 @@ export interface IOnSetAsNextContext extends IShowStyleUserContext, IEventContex
* Multiple calls of this inside one call to `onSetAsNext` will replace earlier calls.
* @returns Whether a new Part was found using the provided offset
*/
moveNextPart(partDelta: number, segmentDelta: number): Promise<boolean>
moveNextPart(partDelta: number, segmentDelta: number, ignoreQuickLoop: boolean): Promise<boolean>
Copy link
Collaborator

Choose a reason for hiding this comment

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

the parameter is optional in other places, including the implementation, should it be optional here too?

let rawParts = playoutModel.getAllOrderedParts()
let allowWrap = false // whether we should wrap to the first part if the curIndex + delta exceeds the total number of parts

const quickLoopService = new QuickLoopService(_context, playoutModel)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if it should be, but as we have getSegmentsBetweenQuickLoopMarker exposed on the PlayoutModel, it would be reasonable and consistent to expose this one too.

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.

2 participants