Skip to content

Commit

Permalink
Merge pull request #1587 from canalplus/misc/let-tizen-cook
Browse files Browse the repository at this point in the history
Tizen: don't directly seek over discontinuity on tizen
  • Loading branch information
peaBerberian authored Oct 25, 2024
2 parents 98278b0 + 09a5808 commit 06c53f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main_thread/init/utils/rebuffering_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

import isSeekingApproximate from "../../../compat/is_seeking_approximate";
import config from "../../../config";
import type { IBufferType } from "../../../core/types";
import { MediaError } from "../../../errors";
Expand Down Expand Up @@ -179,7 +180,11 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont

playbackRateUpdater.startRebuffering();

if (this._manifest === null) {
if (
this._manifest === null ||
(isSeekingApproximate &&
getMonotonicTimeStamp() - rebuffering.timestamp <= 1000)
) {
this.trigger("stalled", stalledReason);
return;
}
Expand Down Expand Up @@ -235,6 +240,8 @@ export default class RebufferingController extends EventEmitter<IRebufferingCont
positionBlockedAt,
);
if (
(!isSeekingApproximate ||
getMonotonicTimeStamp() - rebuffering.timestamp > 1000) &&
this._speed.getValue() > 0 &&
nextBufferRangeGap < BUFFER_DISCONTINUITY_THRESHOLD
) {
Expand Down

0 comments on commit 06c53f9

Please sign in to comment.