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 OvenPlayer fetch null #388

Merged
merged 11 commits into from
Oct 19, 2023
2 changes: 1 addition & 1 deletion dist/ovenplayer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ovenplayer.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/js/api/media/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const Manager = function(container, browserInfo){
that.destroy = () =>{
$container.removeChild();
$container = null;
videoElement.src = null;
dygy marked this conversation as resolved.
Show resolved Hide resolved
videoElement.srcObject = null;
videoElement = null;
};
Expand Down
11 changes: 5 additions & 6 deletions src/js/api/provider/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import {

/**
* @brief This manages provider.
* @param
* */
const Controller = function () {
let supportChacker = SupportChecker();
let supportChecker = SupportChecker();
const Providers = {};

const that = {};
Expand Down Expand Up @@ -56,7 +55,7 @@ const Controller = function () {


that.loadProviders = (playlistItem) => {
const supportedProviderNames = supportChacker.findProviderNamesByPlaylist(playlistItem);
const supportedProviderNames = supportChecker.findProviderNamesByPlaylist(playlistItem);
OvenPlayerConsole.log("ProviderController loadProviders() ", supportedProviderNames);
if (!supportedProviderNames) {
return Promise.reject(ERRORS.codes[INIT_UNSUPPORT_ERROR]);
Expand All @@ -78,14 +77,14 @@ const Controller = function () {
};

that.getProviderBySource = (source) => {
const supportedProviderName = supportChacker.findProviderNameBySource(source);
const supportedProviderName = supportChecker.findProviderNameBySource(source);
OvenPlayerConsole.log("ProviderController getProviderBySource() ", supportedProviderName);
return that.findByName(supportedProviderName);
};

that.isSameProvider = (currentSource, newSource) => {
OvenPlayerConsole.log("ProviderController isSameProvider() ", supportChacker.findProviderNameBySource(currentSource), supportChacker.findProviderNameBySource(newSource));
return supportChacker.findProviderNameBySource(currentSource) === supportChacker.findProviderNameBySource(newSource);
OvenPlayerConsole.log("ProviderController isSameProvider() ", supportChecker.findProviderNameBySource(currentSource), supportChecker.findProviderNameBySource(newSource));
return supportChecker.findProviderNameBySource(currentSource) === supportChecker.findProviderNameBySource(newSource);
};

return that;
Expand Down