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

Pass org.hbbtv_DASH-ERRORREP0002 #348

Open
wants to merge 1 commit into
base: v1.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/objects/avcontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ hbbtv.objects.AVControl = (function() {
priv.seekPos = undefined;
priv.targetSpeed = priv.speed = 0;
priv.videoElement.orb_unload();
priv.unrealized = true;
}

function updateMutationObservers() {
Expand Down Expand Up @@ -1078,7 +1079,6 @@ hbbtv.objects.AVControl = (function() {
}

function initialise() {
let initialising = true;
let startPlaying = false;
let seeking = false;
let priv = privates.get(this);
Expand All @@ -1087,6 +1087,7 @@ hbbtv.objects.AVControl = (function() {
}
privates.set(this, {});
priv = privates.get(this);
priv.unrealized = true;
priv.styleObservers = [];
priv.playState = PLAY_STATE_STOPPED;
priv.xhr = new XMLHttpRequest();
Expand Down Expand Up @@ -1208,19 +1209,19 @@ hbbtv.objects.AVControl = (function() {
if (!seeking) {
videoElement.oncanplaythrough = () => {
videoElement.oncanplaythrough = undefined;
initialising = false;
priv.unrealized = false;
startPlaying = true;
};
}
});

videoElement.addEventListener('play', () => {
initialising = false;
priv.unrealized = false;
startPlaying = true;
});

videoElement.addEventListener('seeking', () => {
if (!initialising && !startPlaying && !seeking) {
if (!priv.unrealized && !startPlaying && !seeking) {
seeking = true;
}
});
Expand Down