The skin colors are failing to load on JWPlayer7

I've encountered a strange issue with jwplayer.

I'm setting it up from an Angular JS Controller and loading it using a simple preview button that loads the jwplayer with the specified configuration.

It should be straightforward.

jwplayer(id).setup(config);

I have configured a skin with various colors (active, inactive, background).

The problem arises when I click the preview button. Sometimes the player loads with the correct colors, and other times it defaults to the default skin colors.

All other properties of jwplayer load correctly. Changing the skin model consistently displays that model but still encounters issues with the colors.

I checked the loaded configuration in both scenarios using

jwplayer(attribute_id).getConfig()
, and they are identical.

How is it possible for the jwplayer to have the skin colors loaded but not display correctly?

Skin-related configurations obtained from the JavaScript API:

skin: "seven"
skinColorActive: "#FFFFFF"
skinColorBackground: "#3B0239"
skinColorInactive: "#EE2A7B"
skinUrl: undefined

The version of the player I'm using is 7.4.3

UPDATE

I found the solution to the problem. I was using a function to randomly generate alphanumeric IDs for jwplayer. This caused some instances to start with a number, leading to the color issues.

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Although the jQuery selector was incorrect, only the colors were affected, while the rest of the setup worked fine.

Possibly, the CSS couldn't interpret the incorrect ID selector, hence the color discrepancy...

Answer №1

To modify the appearance of your player, you can make changes in your CSS file or include styles within <style></style> tags in the header section. It seems like your configuration file is trying to integrate these changes into the JavaScript player setup. For helpful tips on creating and applying your custom skin, check out this resource:

Furthermore, it's important to ensure that you are using the correct playback states (idle, buffering, playing, paused) as outlined in the JavaScript API when initiating the skin transformation:

Answer №2

After some investigation, I was able to identify the issue at hand. In my code, I had implemented a function to randomly generate unique jwplayer ids for cases where multiple players were present on the same page.

Upon generating each new jwplayer instance, a different id was assigned. It became apparent that there was an issue with the colors not displaying correctly when the id started with a number.

According to the specifications, IDs and names should begin with a letter ([A-Za-z]) followed by a combination of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

Despite having an incorrect jQuery selector, only the color styling was affected while the rest of the functionality remained intact.

It seems that the CSS styling failed to apply properly due to the use of an invalid id selector, resulting in the colors not being displayed as intended...

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to pick an option from a dropdown menu using angularjs?

Is there a way to select an item from a dropdown list in AngularJS without using ng-repeat with an object array? I can easily select an option when using ng-repeat, but how can this be achieved with a normal select list? <select class="form-control" ...

troubleshooting problems with AJAX calls and routing in Angular

I am a beginner with Angular and I recently completed a tutorial on Single Page Application development using templates imported from PHP files, along with Resource and Route modules. Below is the JavaScript code from my project: (function(){ var app ...

When using AngularJS and PHP together, I encountered an error that stated "

My POST http request is encountering an error with the message Undefined property: stdClass::$number and Undefined property: stdClass::$message. Below are the codes I've been using: smsController.js angular .module('smsApp') .contr ...

Issue with adding to lightbox feature when loading content dynamically using AJAX PHP is not functioning as expected

Hey there! I've encountered an interesting issue with my code that adds models to a lightbox. It's functioning perfectly on static pages like this one. $scope.add = function(permalink, post_id) { if (typeof(Storage) !== "undefined") { ...

Unable to process login information with form method post on basic login page

Hi, I've been struggling with a simple login page issue. It works fine with Bootstrap, but I want to switch to Angular Material Design. I've been searching for the problem for about 3-4 hours and can't find anything. I suspect that the form ...

Tips for structuring a SQL query result in an AngularJS application

Forgive me if this code is not up to par with the best standards, as I am still relatively new to angular.js. The issue I am facing is that when the data is returned from my query, it appears as a block of text. Despite using echo statements in search.php ...

What methods can be used to effectively store session data in an Angular application when the page is refreshed?

Joomla serves as the backend of our application. Upon a successful login via an ajax call, I am able to obtain the Session ID. What is the most effective way to store this information within the Angular App? Which method is recommended (e.g. cookies or ...

Submitting a File Using AngularJS and PHP

Attempting to upload a file utilizing Angular JS and PHP through a formdata object. Wanting to utilize key1 (data) value as JSON to transmit filename and user info to the php script Opting for key2 (uploadFile), value being the file currently being uploa ...

Storing various values in the database using CakePHP 3

While working on receiving data, I encountered an issue where the saved time in the database is different from what was input. For example, when I send 8:00 pm, it gets saved as 12:00 am due to a +4 hour difference. When I receive data from a form and che ...

Having trouble parsing JSON data from $_POST while utilizing AngularJS

While working in Angular, I encountered the following scenario: var data = {}; data['name'] = "test"; data['class'] = "testClass"; $http.post('http://testURL',data,function(data){ console.log(data); }); Upon inspecting the ...

Is it advisable to load 10,000 rows into memory within my Angular application?

Currently, I am in the process of creating a customer management tool using Angular.js that will allow me to directly load 10,000 customers into the $scope. This enables me to efficiently search for specific data and manipulate it without the need for serv ...

How to Use ng-controller in AngularJS to Submit a Form with PHP

Hey there! I'm diving into AngularJS and PHP for the first time. My current project involves creating a Contact Form using AngularJs and PHP. The form is pretty straightforward, requiring users to input their First Name, Last Name, Email, and Message. ...

Utilizing Angular to integrate with an external API

I have encountered an issue while trying to connect to the Expedia API. In order to do so, I need an API key and ID. Initially, I utilized JSONP for this connection but ran into a bug causing problems. Additionally, storing my API key in JavaScript poses ...

Integration of AngularJS with PHP for Seamless User Authentication

As a newcomer to angularjs, I find the Login Process a bit confusing. Every time I log in, I'm automatically redirected to a specific page that is already set in the code. I just want a simple check to see if the user is logged in. If they are, then ...

Encountering an issue with the Ionic Serve Command

Currently, I am working on creating a mobile app with the Ionic framework. After running the command ionic server, I encountered this error: /deps/uv/src/unix/stream.c:494: uv__server_io: Assertion `events == 1' failed Any suggestions or assistanc ...

The perfect combination: Symfony2 and AngularJS working together

Currently, I have been working on a web app that utilizes Symfony2 and recently integrated AngularJS. Within this app, there is an input field where users can filter products by name. The issue arises when it comes to querying the database in PHP and passi ...

Incorporating dynamic images into Laravel using Angular

I am currently trying to dynamically input the src value of an image using Angular. Below is the code I have written : HTML : <div ng-app="myApp" ng-controller="MyCtrl"> <img src="{{asset('assets/img/'.'/'. @{{ item.name ...

Using Ionic with Ubuntu to easily connect to MySQL and PHPMyAdmin

element, My current project involves creating a mobile app using Ionic on Ubuntu. I have successfully installed and configured phpmyadmin, which is now operational at http://localhost/phpmyadmin. Can someone guide me on how to configure Ionic to connect ...

The localhost server running on port 8000 remains operational even after the successful installation of the laravel-angular boiler

Following the instructions in the documentation, I successfully installed the laravel-angular project. Using the php artisan serve command, I launched the server as expected. However, when I wanted to stop the server due to potential conflicts with my apa ...

No data found in php://input when accessing Azure

Having an issue with posting a complex JSON object to my Azure IIS server running PHP 5.4 using AngularJS: var request = $http({ method: "post", url: "/php/mail.php", data: $scope.contactForm, headers: { 'Content-Type': & ...