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-8975): adding segment size in target buffer when exceeding maxmax #75

Merged
merged 4 commits into from
Jun 20, 2019

Conversation

RoyBregman
Copy link
Contributor

feat(FEC-8975): adding segment size in target buffer when exceeding maxmax

@RoyBregman RoyBregman requested review from OrenMe and yairans June 19, 2019 20:23
const activeTrackId = activeTrack ? activeTrack.id : NaN;
let segmentLength = 0;
if (!isNaN(activeTrackId)) {
for (let i = 0; i < this._shaka.getManifest().periods.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you can store const periods = this._shaka.getManifest().periods; and it will make the rest of the access a lot less verbose.

const activeTrackId = activeTrack ? activeTrack.id : NaN;
let segmentLength = 0;
if (!isNaN(activeTrackId)) {
for (let i = 0; i < this._shaka.getManifest().periods.length; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
for (let i = 0; i < this._shaka.getManifest().periods.length; i++) {
const periods = this._shaka.getManifest().periods;
for (let i = 0; i < .periods.length; i++) {

let segmentLength = 0;
if (!isNaN(activeTrackId)) {
for (let i = 0; i < this._shaka.getManifest().periods.length; i++) {
for (let j = 0; j < this._shaka.getManifest().periods[i].variants.length; j++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
for (let j = 0; j < this._shaka.getManifest().periods[i].variants.length; j++) {
for (let j = 0; j < periods[i].variants.length; j++) {

if (!isNaN(activeTrackId)) {
for (let i = 0; i < this._shaka.getManifest().periods.length; i++) {
for (let j = 0; j < this._shaka.getManifest().periods[i].variants.length; j++) {
const variant = this._shaka.getManifest().periods[i].variants[j];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const variant = this._shaka.getManifest().periods[i].variants[j];
const variant = periods[i].variants[j];

@RoyBregman RoyBregman merged commit ed04391 into master Jun 20, 2019
@RoyBregman RoyBregman deleted the FEC-8975-leftovers branch June 20, 2019 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants