Plyr: Add support for YouTube player's onError event

Created on 1 Apr 2016  Â·  13Comments  Â·  Source: sampotts/plyr

Hi @SamPotts,

We're really close to having Plyr integrated to Zen Audio Player! One of the few things remaining is error handling. Currently we're able to display the error to the user, which is usually helpful.
To me, it makes sense to expose this with the error event - but I could imagine a special youtubeError event as well. What do you think?

capturfiles_1

Feature

All 13 comments

I'll create an error callback, yeah. Will get to this on the weekend all going well.

Thank you! :+1:

@SamPotts sorry to nag, will you be able to get this in the same release as #194? Happy to help out if needed

Sure. Will have a crack this weekend.

Sam

On 29 Apr 2016, at 3:21 PM, Shakeel Mohamed [email protected] wrote:

@SamPotts sorry to nag, will you be able to get this in the same release as #194? Happy to help out if needed

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

Sorry just been flat out with work etc

Sam

On 29 Apr 2016, at 3:21 PM, Shakeel Mohamed [email protected] wrote:

@SamPotts sorry to nag, will you be able to get this in the same release as #194? Happy to help out if needed

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

No worries, thanks for the update!

Hey, this is in v1.6.2

@SamPotts Excellent, the code change looks usable!
I just updated to v1.6.3, and I'm seeing these issues:

  1. plyr.js:2222 Uncaught TypeError: Cannot read property 'bar' of undefined is breaking the whole thing, I think changing the else { on line 2221 in src/js/plyr.js to else if (progress) { should take care of that.
  2. The CSS redesign for audio players 100% broke our usage 😅 , see the screenshot below. Can you provide us with a workaround? Maybe add a bool setting like retroPlayer to use the old UI? You can repro with the following CSS rule which we use: .plyr__video-wrapper { display: none; }

capturfiles_6

I've already raised an issue to create the older theme for anyone that wants to use it. Styling should be kept separated from the JS so this will be a CSS change. In terms of a workaround, you'd have to hack around the LESS to get it presentable. Sorry, it was a improvement for most but I can understand the frustration of the UI change. I'll make a start on it now and maybe finish it today.

Pushed v1.6.4 with a fix for the progress issue

Are you using like YouTube and hiding the video? Hmm I've not thought about that but I guess that could be a use case for others too.

Are you using like YouTube and hiding the video?

@SamPotts
Yeah, that's the whole premise of Zen Audio Player 😆 I actually hacked over some of the CSS (for now) from the .plyr__audio .plyr__controls rule and made them all !important under .plyr__controls to get something working. In that case, we actually don't need a different theme, just way to render a video player as if it's an audio player

edit: CSS changes + adding progress to our controls config

capturfiles_7

OK well a couple of others have asked for the old theme so I'll just make that and it'll be two birds with one stone as it were...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sparkktv picture sparkktv  Â·  4Comments

Lycanthrope picture Lycanthrope  Â·  4Comments

michaelmano picture michaelmano  Â·  3Comments

muuvmuuv picture muuvmuuv  Â·  3Comments

elliottcoe picture elliottcoe  Â·  4Comments