PHP Classes

File: public_html/js/binkplayer/binkplayer.js

Recommend this page to a friend!
  Packages of Matthew Asham   Binkterm PHP   public_html/js/binkplayer/binkplayer.js   Download  
File: public_html/js/binkplayer/binkplayer.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Binkterm PHP
Bulletin board system based on the Web
Author: By
Last change:
Date: 5 days ago
Size: 946 bytes
 

Contents

Class file image Download
(function(window) { 'use strict'; /** * Thin wrapper around Plyr that initialises a player on a given * <video> or <audio> element and returns the Plyr instance. * Falls back to the native element if Plyr is unavailable. * * @param {HTMLMediaElement} el * @returns {object|null} Plyr instance or null */ function init(el) { if (!el) return null; if (typeof window.Plyr === 'undefined') return null; var options = { controls: ['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'fullscreen'], resetOnEnd: false, tooltips: { controls: false, seek: true } }; if (el.tagName.toLowerCase() === 'audio') { options.controls = ['play', 'progress', 'current-time', 'mute', 'volume']; } return new window.Plyr(el, options); } window.BinkPlayer = { init: init }; })(window);