mediaelement / mediaelement-plugins

Plugins for the main mediaelement project
406 stars 138 forks source link

Update airplay.js #32

Closed jimmywarting closed 7 years ago

jimmywarting commented 7 years ago

You misspelled originalNode

Clicking the airplay btn don't make it "start" so sending the event there seems wrong instead i listen on airplay change event and look if it's currently casting

This fixes it...

A nice addition would be to have some indication that it's currently playing on airplay like on/off icon Sidenote: the icon is to far up

skarmavbild 2017-04-22 kl 21 21 19

rafa8626 commented 7 years ago

Thanks. PR merged

rafa8626 commented 7 years ago

BTW I fixed the icon CSS. I'll check what can be done for the icon off/on

jimmywarting commented 7 years ago

I think it looks good if both airplay and chromecast icon use the color #66A8CC when it's beeing active

.cls-1 {
  fill: #fff;
};

/* or `button.casting .cls` is more self explanatory?
   more specific but not general for a state on all buttons */
button.active .cls-1 { 
  fill: #66A8CC;
};

Easier to toggle a color then updating the hole icon

rafa8626 commented 7 years ago

Yeah I agree. I'll rename the class and set the styles to match this approach. Thanks for pointing this