Started on error handling

This commit is contained in:
Sam
2018-01-04 13:43:56 +11:00
parent 6b9106ddb1
commit 92cb9e22e2
16 changed files with 84 additions and 12 deletions

View File

@@ -35,7 +35,11 @@ let scrollPosition = {
class Plyr {
constructor(target, options) {
this.timers = {};
// State
this.ready = false;
this.loading = false;
this.failed = false;
// Set the media element
this.media = target;
@@ -809,6 +813,11 @@ class Plyr {
* @param {event} event
*/
toggleFullscreen(event) {
// Video only
if (this.isAudio) {
return;
}
// Check for native support
if (fullscreen.enabled) {
if (utils.is.event(event) && event.type === fullscreen.eventType) {