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

[Story] Video are freezing and user need to tape a second time to play it #37523

Open
llccrr opened this issue Jan 31, 2022 · 6 comments
Open

Comments

@llccrr
Copy link

llccrr commented Jan 31, 2022

Description

The video is freezing on the first frame of the video.
It happens with cache="google" (dunno if it happens without)
It seems to only occurs when the Story is embedded in an iFrame or maybe it's linked to some queryString

EDIT: I mapped it a long time ago, it was happening in the AmpStory Player, but now it also occurs in our custom Player so I edited the issue.

Reproduction Steps

Customer Website -> Click on the Round Bubble on MacOS Safari, re-try if you do not have the bug.

https://aguablanca.co/product/haute-couture-by-lightning/teinture/haute-couture-rouge-vif/teinture-textile-rouge-vif-856

Relevant Logs

image

Browser(s) Affected

Safari Version 15.3 (17612.4.9.1.5) - Only version tested

OS(s) Affected

MacOS

Device(s) Affected

No response

AMP Version Affected

No response

@llccrr
Copy link
Author

llccrr commented Feb 15, 2022

Have you been able to reproduce ?

@llccrr llccrr changed the title [Amp Story Player] Video are freezing and user need to tape a second time to play it [Story] Video are freezing and user need to tape a second time to play it Jun 3, 2022
@mszylkowski mszylkowski self-assigned this Jun 7, 2022
@mszylkowski
Copy link
Contributor

(Updating this issue with our offline discussion) would be useful to have an minimal demo with the open-source web player to debug this, otherwise it may be an issue with the viewer API integration of the Join Player (which you'd have to debug separately).

@llccrr
Copy link
Author

llccrr commented Jun 8, 2022

I do have the bug with an Open Source Player, but it seems actually slightly different since with the Open Source Player it freezes, but the autoplay keep going whereas with Join Player it freezes and the autoplay is also frozen
Example with Open Source Player : https://6832h8.csb.app
Video :
https://user-images.githubusercontent.com/15107671/172565535-76a235c9-b204-455a-872b-1507d49252fd.mov

EDIT : A story without any player here where the same bug occurs (autoplay keeps playing): https://tajinebanane.my.join-stories.com/tee-shirt-diy-az4W_WU/

@mszylkowski
Copy link
Contributor

Refreshed 20+ times on the player and individual story (the last links you commented) without reproducing the bug so I doubt it's the same issue (on your player impl the story doesn't play 100% of times). I recommend checking the render_ method of the open source player to see if all the steps are handled properly:

render_(startingIdx = this.currentIdx_) {
const renderPromises = [];
for (let i = 0; i < this.stories_.length; i++) {
const story = this.stories_[(i + startingIdx) % this.stories_.length];
const oldDistance = story.distance;
story.distance = Math.abs(this.currentIdx_ - story.idx);
// 1. Determine whether iframe should be in DOM tree or not.
if (oldDistance <= 1 && story.distance > 1) {
this.removeFromDom_(story);
}
if (story.distance <= 1 && !story.iframe.isConnected) {
this.appendToDom_(story);
}
// Only create renderPromises for neighbor stories.
if (story.distance > 1) {
continue;
}
renderPromises.push(
// 1. Wait for current story to load before evaluating neighbor stories.
this.currentStoryPromise_(story)
.then(() => this.maybeGetCacheUrl_(story.href))
// 2. Set iframe src when appropiate
.then((storyUrl) => {
if (!this.sanitizedUrlsAreEquals_(storyUrl, story.iframe.src)) {
this.setSrc_(story, storyUrl);
}
})
// 3. Waits for player to be visible before updating visibility
// state.
.then(() => this.visibleDeferred_.promise)
// 4. Update the visibility state of the story.
.then(() => {
if (story.distance === 0 && this.playing_) {
this.updateVisibilityState_(story, VisibilityState_Enum.VISIBLE);
}
if (oldDistance === 0 && story.distance === 1) {
this.updateVisibilityState_(story, VisibilityState_Enum.INACTIVE);
}
})
// 5. Finally update the story position.
.then(() => {
this.updatePosition_(story);
if (story.distance === 0) {
tryFocus(story.iframe);
}
})
.catch((err) => {
if (err.includes(LOG_TYPE_ENUM.DEV)) {
return;
}
console /*OK*/
.error(`[${TAG}]`, err);
})
);
}
return Promise.all(renderPromises);
}

@llccrr
Copy link
Author

llccrr commented Jun 8, 2022

So indeed it's not the same bug, the first one which happens 100% of time seems to be linked to the "auto unmute" the Stories in an iframe (not permitted on Safari) so it is on our side.
However, there is still the bug that freezes with the autoplay that continues.

@stale
Copy link

stale bot commented Aug 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Aug 12, 2023
@stale stale bot removed the Stale Inactive for one year or more label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants