Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Uncaught ReferenceError: videojs is not defined #3

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions dist/videojs-http-source-selector.es.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import videojs$1 from 'video.js';
import videojs from 'video.js';

var version = "1.0.1";

Expand Down Expand Up @@ -209,7 +209,7 @@ var SourceMenuButton = function (_MenuButton) {
var defaults = {};

// Cross-compatibility for Video.js 5 and 6.
var registerPlugin = videojs$1.registerPlugin || videojs$1.plugin;
var registerPlugin = videojs.registerPlugin || videojs.plugin;
// const dom = videojs.dom || videojs;

/**
Expand Down Expand Up @@ -243,7 +243,7 @@ var onPlayerReady = function onPlayerReady(player, options) {
**/
player.on(['loadedmetadata'], function (e) {
var qualityLevels = player.qualityLevels();
videojs$1.log('loadmeadata event');
videojs.log('loadmeadata event');
// hack for plugin idempodency... prevents duplicate menubuttons from being inserted into the player if multiple player.httpSourceSelector() functions called.
if (player.videojs_http_source_selector_initialized == 'undefined' || player.videojs_http_source_selector_initialized == true) {
console.log("player.videojs_http_source_selector_initialized == true");
Expand Down Expand Up @@ -271,12 +271,12 @@ var httpSourceSelector = function httpSourceSelector(options) {
var _this = this;

this.ready(function () {
onPlayerReady(_this, videojs$1.mergeOptions(defaults, options));
onPlayerReady(_this, videojs.mergeOptions(defaults, options));
//this.getChild('controlBar').addChild('SourceMenuButton', {});
});

videojs$1.registerComponent('SourceMenuButton', SourceMenuButton);
videojs$1.registerComponent('SourceMenuItem', SourceMenuItem);
videojs.registerComponent('SourceMenuButton', SourceMenuButton);
videojs.registerComponent('SourceMenuItem', SourceMenuItem);
};

// Register the plugin with video.js.
Expand Down