sampotts / plyr

A simple HTML5, YouTube and Vimeo player
https://plyr.io
MIT License
26.46k stars 2.92k forks source link

YouTube Live Stream Progressive Embed .js-play #1199

Open bjm1 opened 6 years ago

bjm1 commented 6 years ago

The progressive embed method works for YouTube Live streams using the plyr Play icons inside the video box.

Outside the box, both click functions -- play/togglePlay (see below) don't work as expected when video is Live.

However, if YouTube video is NOT Live, then both work as expected.

on('.js-play', 'click', function () {

// player.play();
player.togglePlay();

}

bjm1 commented 6 years ago

One more "YouTube Live" minor bug. The current time counts down and is not swappable (click disabled). Seems like it should be counting up (since duration unknown). Perhaps, just reverse the default and disable click, if Live?

Spongman commented 5 years ago

yeah, the 'live' detection for youtube videos is broken.

sampotts commented 5 years ago

Feel free to take a look and create a PR 👍