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

[Multiple Threading] getCurrentPeriod not correct after period changes #1525

Closed
KunXi-Fox opened this issue Sep 3, 2024 · 9 comments · Fixed by #1527
Closed

[Multiple Threading] getCurrentPeriod not correct after period changes #1525

KunXi-Fox opened this issue Sep 3, 2024 · 9 comments · Fixed by #1527

Comments

@KunXi-Fox
Copy link

KunXi-Fox commented Sep 3, 2024

Hi there,

Seems that we're not get the correct currentPeriod when play multi-period stream with multiple-threading feature enabled.

user agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Details as below logs:

// first period
rxInstance.getCurrentPeriod() 
{id: '14735018', start: 6749208.303, end: undefined}

rxInstance.getAvailablePeriods()
[{…}]
0: {start: 6749208.303, end: undefined, id: '14735018'}
length: 1[[Prototype]]: Array(0)

rxInstance.getLivePosition()
6749606.189000128

// period changes
rxInstance.getCurrentPeriod()
{id: '14735018', start: 6749208.303, end: 6750165.783}

rxInstance.getAvailablePeriods()
(2) [{…}, {…}]
0: {start: 6749208.303, end: 6750165.783, id: '14735018'}
1: {start: 6750165.783, end: undefined, id: '14735446'}
length: 2[[Prototype]]: Array(0)

rxInstance.getCurrentPeriod()
{id: '14735018', start: 6749208.303, end: 6750165.783}

// based on current position, the current period should be 1: {start: 6750165.783, end: undefined, id: '14735446'}
rxInstance.getLivePosition()
6750200.564200211

// but I'm still get the wrong one
rxInstance.getCurrentPeriod()
{id: '14735018', start: 6749208.303, end: 6750165.783}
image

One more thing is eventListener periodChange is not been triggered

rxInstance.addEventListener(
      'periodChange',
      () => { console.log('periodChange') }
);

Could someone help check this issue?

Thanks in advance.

@KunXi-Fox
Copy link
Author

BTW: Same asset works fine without multiple-threading.

@peaBerberian
Copy link
Collaborator

Hello,

We have some issue reproducing for now, but it seems similar to the issue fixed by #1502 (though that one was generally an issue for the initial Period, not the next ones).

Can you check with our last development build? You can put 4.2.0-dev.2024082600 in your package.json.


If it also has the issue, we may have the need to reproduce it.
Can you share the URL to your MPD? Thanks to work like #1478 we may not even need to be able to decrypt it to reproduce such RxPlayer logic issue.

@KunXi-Fox
Copy link
Author

Hi @peaBerberian ,

Thanks for reply,

I'll check with latest dev branch and see if the issue still there.

Another comment for this issue is, the period switches between encrypted one to unencrypted. I'll try get a test stream for you if the issue still there.

@peaBerberian
Copy link
Collaborator

Scratch that we reproduced it!

@Florent-Bouisset
Copy link
Collaborator

Thanks for reporting the issue,
it can be reproduced with the content from our demo page: Multi-Period (5 Periods of 2 min)

@peaBerberian
Copy link
Collaborator

Sorry closed that one by mistake

@peaBerberian
Copy link
Collaborator

We just made the dev build including the fix: 4.2.0-dev.2024090300

It's planned for the next official release, we plan it for next month for now.

@KunXi-Fox
Copy link
Author

The latest dev branch dose fix the issue above. Thanks @peaBerberian .

@peaBerberian
Copy link
Collaborator

Thanks!

That's @Florent-Bouisset quick investigation and fixing work, I'm only a messenger and version-releaser in that issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants