-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
playRangeEnd config not working in v4.3.0 #4787
Comments
In the function finalizeStreams_ we are not getting the playRangeEnd as minDuration shaka-player/lib/hls/hls_parser.js Line 1817 in 393df06
|
There are many changes from v4.2.x to v4.3.x to debug this issue In v4.2.x we notify the segments to the presentation timeline according to the variants? // Now that the content has been fit, notify segments.
this.segmentsToNotifyByStream_ = [];
const streamsToNotify = [];
for (const variant of variants) {
for (const stream of [variant.video, variant.audio]) {
if (stream) {
streamsToNotify.push(stream);
}
}
}
await Promise.all(streamsToNotify.map(async (stream) => {
await stream.createSegmentIndex();
}));
for (const stream of streamsToNotify) {
this.segmentsToNotifyByStream_.push(stream.segmentIndex.references);
} In v4.3.x it has been modified since we notify the whole stream segment references shaka-player/lib/hls/hls_parser.js Line 1827 in 393df06
notifySegmentsForStreams_(streams) {
const references = [];
for (const stream of streams) {
if (!stream.segmentIndex) {
// The stream was closed since the list of streams was built.
continue;
}
stream.segmentIndex.forEachTopLevelReference((reference) => {
references.push(reference);
});
}
this.presentationTimeline_.notifySegments(references);
} maybe this could be the issue or maybe when we createSegments !! At last we have to notify the segments || references only according to the playRangeEnd to the presentation timeline no? |
@joeyparrish it was fixed before with your modification but since 4.3.x with Lazy loading, I am facing the same problem Also one strange behavior, I observed when I change the resolution then the "playRangeEnd" takes place then when the video is about to end then the playRangeEnd appears in the UI
Can you please help me to resolve this Thanks in advanced |
@joeyparrish Did you get time to look at and suggest me something for this issue? |
Have you read the FAQ and checked for duplicate open issues?
YES
What version of Shaka Player are you using?
4.3.0
Can you reproduce the issue with our latest release version?
yes
Can you reproduce the issue with the latest code from
main
?yes
Are you using the demo app or your own custom app?
demo app
If custom app, can you reproduce the issue using our demo app?
What browser and OS are you using?
Chrome, Firefox, Safari
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
https://bhaktimarga-vod-p-cdn.hexaglobe.net/vod/20221129193754/playlist.m3u8
What configuration are you using? What is the output of
player.getConfiguration()
?playRangeStart: 30,
playRangeEnd: 160,
What did you do?
I tried to play an HLS VOD stream with a playRangeStart and playRangeEnd settings.
What did you expect to happen?
To have a presentation timeline according to the play range settings.
What actually happened?
The configuration for setting the playRangeStart and playRangeEnd works perfectly in shaka-player v4.2.x
I clearly have the seekRange of what I am configuring in playRangeStart and playRangeEnd with a timeline.
But since we want to migrate to v4.3.x which has an important feature Lazy-loading of the playlist.
The playRangeStart works as expected but the playRangeEnd is not working as expected, it gives the end duration of the playlist and not according to the playRangeEnd configuration.
also, the presentation timeline has the end range as the playlist's last segment references the whole duration.
The difference from 4.2.x to 4.3.x
In v4.2.x, we have a function parseManifest_
shaka-player/lib/hls/hls_parser.js
Line 674 in d60930e
on line 647, I have the correct minDuration as my playRangeEnd
But on v4.3.x since it has been moved to new function called getMinDuration_
https://github.com/shaka-project/shaka-player/blob/v4.3.x/lib/hls/hls_parser.js#L1779
for the first time, I have a log of minDuration same as my playRangeEnd when called in finalizeStreams_
shaka-player/lib/hls/hls_parser.js
Line 1815 in 393df06
then again it is called in determineDuration_ where the minDuration is changed to the last Segment end duration.
shaka-player/lib/hls/hls_parser.js
Line 798 in 393df06
In parseManifest_, first the finalizeStreams_ is called then determineDuration_ is called where the playRangeEnd is ignored.
shaka-player/lib/hls/hls_parser.js
Line 742 in 393df06
Can you please look into this bug, and let me know where I can make changes to fix.
Thanks
The text was updated successfully, but these errors were encountered: