Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Frontend
Minds Frontend
  • Project overview
  • Repository
  • Issues 350
  • Merge Requests 60
  • CI / CD
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds FrontendMinds Frontend
  • Merge Requests
  • !712

Open
Opened 2 days ago by Ben Hayward@benhayward.ben
Report abuse

WIP: Plyr play error

  • Overview 8
  • Commits 3
  • Pipelines 3
  • Changes 2
1/2 threads resolved

Summary

Part-way to closing #2377

When debugging I noticed errors being thrown from Plyr before the parent components init had succeeded; This raised an alarm bell as media pages should not be auto-playing to start with. The modals should be when they are clicked, but not on a media page.

It appears as though if autoplay is provided as an @input, it tries to auto-play straight away, in turn throwing an error because the component is not ready https://developers.google.com/web/updates/2017/06/play-request-was-interrupted

Steps to test

On production, just open your console and load a video (e.g. the randomly selected https://www.minds.com/media/1060934327732535296)

To test, check this error does not show on the sandbox.

Estimated Regression Scope

I can only foresee the worst-case scenario as being a regression in the auto-playing of videos; perhaps when opening a modal; this is not the case though by my testing.

Edited 18 hours ago by Ben Hayward
Request to merge fix/autoplay-bug-2377 into master
The source branch is 4 commits behind the target branch
Open in Web IDE
Pipeline #107942283 passed with warnings for 2631bf89 on fix/autoplay-bug-2377
              Requires 3 more approvals from Devs, Deployers, and QA.
              Rami Albatal
              Rami Albatal
              Marcelo Rivera
              Marcelo Rivera
              Juan Manuel Solaro
              Juan Manuel Solaro
              Guy Thouret
              Guy Thouret
              Xander Miller
              Xander Miller
              This is a Work in Progress

              Closes #2377

              You can merge this merge request manually using the
              • Ben Hayward @benhayward.ben added Squad::Yellow Status::BuddyReview scoped labels 2 days ago

                added scoped labels

              • Ben Hayward
                Ben Hayward @benhayward.ben · 2 days ago
                Developer

                Struggling to test right now as the video does not appear to be working on sandbox.

                Regardless as the play button just hangs, this has shown me another avenue for this bug to occur.

              • Ben Hayward
                Ben Hayward @benhayward.ben · 2 days ago
                Developer

                Ah, that one does occur inside of the plyr package, so there isn't much we can do about that one other than report and whitelist.

                It can be triggered by pausing whilst the video is still running its play promise. I'd hoped this was external as the component in this MR does have a pause function - this function however is not called, so it must be happening inside of the plyr or ngx-plyr component.

                Edited by Ben Hayward 2 days ago
              • Brian Hatchet
                Brian Hatchet :speech_balloon: @brianhatchet started a thread on an old version of the diff 2 days ago
                Resolved by Ben Hayward 17 hours ago
                • Brian Hatchet
                  Brian Hatchet :speech_balloon: @brianhatchet · 2 days ago
                  Developer

                  We need to filter the sentry error. See the documentation here.

                  https://docs.sentry.io/error-reporting/configuration/filtering/?platform=javascript

                  Edited by Brian Hatchet 2 days ago
                • Collapse replies
                • Ben Hayward
                  Ben Hayward @benhayward.ben · 18 hours ago
                  Developer

                  Check out the lines I've commented in src/app/app.module.ts (taking these out when ready)

                • Ben Hayward
                  Ben Hayward @benhayward.ben · 17 hours ago
                  Developer

                  Better yet, I've commented them out whilst changing something minor, but you can see the explanations below:

                  https://i.imgur.com/bwOEK6C.png

                  Note this is coded blind with no means of testing. I can only reproduce 1 of the issue, and I know that one is successfully filtered. Everything else is an educated guess wrapped in a try statement.

                • Ben Hayward
                  Ben Hayward @benhayward.ben · 17 minutes ago
                  Developer

                  Note this is entirely in a do not review or merge state.

                • Please register or sign in to reply
              • Ben Hayward @benhayward.ben added 1 commit 18 hours ago

                added 1 commit

                • 3c29c23e - Changed sentry logic and player autoplay.

                Compare with previous version

              • Ben Hayward @benhayward.ben added Status::Follow Up scoped label and automatically removed Status::BuddyReview label 18 hours ago

                added scoped label and automatically removed label

              • Ben Hayward @benhayward.ben marked as a Work In Progress 18 hours ago

                marked as a Work In Progress

              • Ben Hayward @benhayward.ben changed the description 18 hours ago

                changed the description

              • Ben Hayward @benhayward.ben added 1 commit 18 hours ago

                added 1 commit

                • 2631bf89 - Fixed logic

                Compare with previous version

              • Ben Hayward @benhayward.ben added Status::Requires Changes scoped label and automatically removed Status::Follow Up label 16 minutes ago

                added scoped label and automatically removed label

              Please register or sign in to reply
              0 Assignees
              None
              None
              Milestone
              None
              Time tracking
              No estimate or time spent
              2
              Labels
              Squad::Yellow Status::Requires Changes
              Lock merge request
              Unlocked
              11
              11 participants
              user avatar
              Rami Albatal
              user avatar
              Marcelo Rivera
              user avatar
              Juan Manuel Solaro
              user avatar
              Guy Thouret
              user avatar
              Xander Miller
              user avatar
              Mark Harding
              user avatar
              Emiliano Balbuena
              Reference: minds/front!712

              Now you can access the merge request navigation tabs at the top, where they’re easier to find.

              More information and share feedback