Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Frontend
Minds Frontend
  • Project overview
  • Repository
  • Issues 344
  • Merge Requests 57
  • 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 3 days ago by Ben Hayward@benhayward.ben
Report abuse

Plyr play error

  • Overview 9
  • Commits 4
  • Pipelines 4
  • Changes 1
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 24 minutes ago by Ben Hayward
Request to merge fix/autoplay-bug-2377 into master
The source branch is 12 commits behind the target branch
Open in Web IDE
Pipeline #108423566 running for 724615af on fix/autoplay-bug-2377
              Requires 3 more approvals from Devs, Deployers, and QA.
              Rami Albatal
              Rami Albatal
              Juan Manuel Solaro
              Juan Manuel Solaro
              Emiliano Balbuena
              Emiliano Balbuena
              Martin Santangelo
              Martin Santangelo
              Brian Hatchet
              Brian Hatchet
              Ready to be merged automatically. Ask someone with write access to this repository to merge this request

              Closes #2377

              • Ben Hayward @benhayward.ben added Squad::Yellow Status::BuddyReview scoped labels 3 days ago

                added scoped labels

              • Ben Hayward
                Ben Hayward @benhayward.ben · 3 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 · 3 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 3 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 1 day 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 · 1 day 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 · 1 day 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 · 23 hours 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 1 day 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 1 day ago

                added scoped label and automatically removed label

              • Ben Hayward @benhayward.ben marked as a Work In Progress 1 day ago

                marked as a Work In Progress

              • Ben Hayward @benhayward.ben changed the description 1 day ago

                changed the description

              • Ben Hayward @benhayward.ben added 1 commit 1 day 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 23 hours ago

                added scoped label and automatically removed label

              • Ben Hayward @benhayward.ben added 1 commit 25 minutes ago

                added 1 commit

                • 724615af - Removed changes to app module

                Compare with previous version

              • Ben Hayward @benhayward.ben resolved all threads 24 minutes ago

                resolved all threads

              • Ben Hayward @benhayward.ben unmarked as a Work In Progress 24 minutes ago

                unmarked as a Work In Progress

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

                Took out changes to app module as screenshotted above, so this MR now only fixes one specific error from the parent card.

                @markeharding if you take a look above that's the best I could do in terms of hooking into things and filtering errors. Hard to test without just releasing into the wild as there is only the bug fixed in this MR that I can trigger, which is unlike the rest.

                Another option would have been potentially to CDN host the package and see whether using blacklistUrls works. That may be for something slightly different though.

              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
              Juan Manuel Solaro
              user avatar
              Emiliano Balbuena
              user avatar
              Martin Santangelo
              user avatar
              Brian Hatchet
              user avatar
              Marcelo Rivera
              user avatar
              Xander Miller
              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