Subscribe to Our Newsletter

x

Integrating JW Player on RebelMouse

JW Player is a popular video CMS that provides transcoding, encoding, and a sophisticated player that can be connected to DoubleClick for Publishers (DFP) and other ad-targeting systems. RebelMouse has a deep integration with the platform for our clients that have their own JW Player license.


The integration allows editors to upload from our creation tool directly into JW Player, as well as the ability to choose different players that you've already configured according to context and workflow.

In addition, we have a search interface in our content creation tool that allows you to easily search across your own library and build articles based on your video library.

You're able to upload your videos easily from Entry Editor:

You can also edit the descriptions of your videos:

Browse your video library to select which video you want to embed in your article:

We support JW Player in lead media spots, and we support this for Google Accelerated Mobile Pages (AMP) as well. You can embed JW Player in a post's body and/or create slideshows, listicles, or amazing playlists.

Types of Integration

  • Lead media
  • Particle media
  • Media in the body of a post
  • Playlists
  • Home pages
  • Section pages
  • Tag pages

Lead Media Integration

There are two ways to integrate JW Player into your lead media. In both cases, it requires a custom JavaScript code to activate the player.

The first option is to use our post thumbnail instead of loading JW Player. This is the best option for page speed because we render an image that loads the embed on click, avoiding the payloads of a full embed. Keep in mind that for this scenario, the player itself should have autoplay turned on. This way, when we replace the thumbnail with a player, it will start playing right away.

It's important to note that if a user updates a video thumbnail in their JW Player dashboard, they will also need to update it in our Entry Editor before it will be shown on site — we cache these for speed.

The second way is to load a video embed. In this scenario, the player shouldn't have autoplay enabled. The compromise here is that RebelMouse will need to rely on JW Player to render a proper thumbnail ratio, especially for smaller teasers. There could also be some slowdowns if you have 10+ video teasers located on one page.

Particle Media

For videos located in our Particle Assembler, we load all of the needed initializations from the server's side, which means the player will be initialized right away.

Playlists

This is a special type of rendering using our Particles feature. It uses our thumbnails, and it requires a hard-coded site section in a RebelMouse Runner template to render it. It also requires additional custom JavaScript to make the playlist logic functional.

Here's an example of a working playlist that can be rendered on a section or article page. We are currently working on turning this into a simple element you can style, but contact us to set up a playlist layout for you. Editorially, you choose the Playlists layout to enable this.

Custom JavaScript Code

Here are some useful JW Player code samples you can plug into our Layout & Design tool:

Assembler code for JW Player should look like this.

Here's an example for handling the play button through custom JavaScript:

function VideoPlayerLoader() {

if (widgetsHead.length) {
    widgetsHead.forEach(function(widgetHead) {
        let video = widgetHead.querySelector('.widget__video');
        let image = widgetHead.querySelector('.widget__image');

        if (video) {
            const regex = /players\%2F([\w\-])+\.js/g;
            const script = video.querySelector('script[type="video-content"]');
            let str = '';

            if (script) {
            str = script.innerText;
            }
            console.log('not null === ', str);
            if(str.length) {
                str = regex.exec(str);

                    if (str !== null) {
                let videoPlayer = str[0].replace(/players\%2F/g, '').replace('.js', '').split('-');
                let videoWrapper = document.createElement('div');
                let videoPlayerScript = document.createElement('script');

                if (location.pathname === '/') {
                    videoPlayer[1] = '{{$YOUR-PLAYER-ID}}';
                }
                videoWrapper.id = 'botr_' + videoPlayer.join('_') + '_div';
                videoPlayerScript.src = 'https://content.jwplatform.com/players/' + videoPlayer.join('-') + '.js'

                image.onclick = function () {
                    image.className += " hidden";
                    video.style.display = "block";
                    video.appendChild(videoWrapper);
                    video.appendChild(videoPlayerScript);
                };
            } else { //copy from ui-basics to cover the rest of videos
                if (script) {
                    image.onclick = function () {
                        video.innerHTML = script.innerHTML;
                        image.className += " hidden";
                        video.style.display = "block";
                        }
                    }
                }
            }
        }
    });
}
}

document.addEventListener("DOMContentLoaded", function (event) {
    VideoPlayerLoader();
});
{{require}}(['jquery', 'core/event_dispatcher'], function ($, eventDispatcher) {
    eventDispatcher.on('load-more:sync', function() {
        VideoPlayerLoader();
});

});

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

A Look Inside the Only Creative Agency Powered by Deep Technology

Strategic development of product that supports content distribution, conversion, and loyalty.

RebelMouse is a creative agency fueled by a publishing platform with deep technology. Our expertise is rooted in media and content marketing because there is no other team that understands distributive publishing better than we do. There is also no other CMS on the market today that provides content creators with the tools they need to unlock sustainable growth backed by sticky monetization methods. RebelMouse blends product and strategy together to move the needle where it matters most — organic traffic and user growth, conversion to loyalty, and revenue growth.

Keep reading... Show less

New URL Structure for Communities and Users

If you've been following RebelMouse for any length of time, you know that we've gone all in on the power of influencers and creators. This, in turn, has driven us to expand and enhance our community-building platform at an incredible rate. Since our network has grown several fold with no signs of slowing down, it's now time to change how our technology handles user and community URLs to prevent any confusion in the future, especially for clients of ours that employ multiple communities.

Keep reading... Show less

More Elements Available for Lazy Load

Lazy loading has been an available option in our Layout & Design tool for quite some time. In the world of computer programming, lazy loading is a design pattern that allows specific parts of your site to load in a certain order based on what the user needs to see first. Its use is suggested for common page elements such as related post lists, sidebars, and any others features of an article.

Keep reading... Show less

Manage Your Site's Global Settings

Create Your Powerful + Modern Publishing System

At RebelMouse, we use the term "lean tech" quite a bit. Lean tech is the opposite of what many publishers think may save their site in today's landscape: A big-box CMS publishing solution that is often costly to customize and maintain. In actuality, the key to sustainable growth and revenue is a leaner, full-stack tech solution that creates opportunities for growth not just on site, but on search and social, too.

Keep reading... Show less

Let Your Audience Tell Your Brand’s Story

United Airlines' "Her Art Here" Campaign Blends Engagement With Purpose

The digital landscape has reached a turning point. Publishers are trying to pick up the pieces and figure out how to create quality content and monetize it now that readers have loosened up their dependency on the major platforms. In the meantime, massive audience hubs like Facebook are trying to recover legitimacy and relevancy with better prioritization of privacy and user experience.

Keep reading... Show less

You're almost there! Fill out the form below and a Rebel will contact you within one business day.

x

How to Leverage Annotations in Google Analytics

When looking at your website data in Google Analytics (GA), it can be difficult to remember exactly what happened on a particular day to determine why certain data spikes or dips may have occurred.

For this reason, it's important to keep track of when changes are made to your site. Thankfully, GA allows you to easily do this using annotations. Annotations are short notes you can add to dates within Google Analytics reports.

Keep reading... Show less

Changing the Face of Tech: The Women of RebelMouse

Keep reading... Show less

A Guide to User Permissions on RebelMouse

On our platform, user roles range from base-level contributors all the way up to administrators. These roles are especially important when operating within the confines of our community dashboard, which brings multiple creators together to create and share within one large content hub.

The way each role interacts with others is completely customizable. The workflow is designed to streamline the edit, revision, and publishing process to make sure live content is not only perfect, but always optimized for site, search, and social. The way each team sets up their role structure is typically dependent on the number of writers employed, the amount of content published, and the cadence of posts.

Keep reading... Show less

RebelMouse Ad Integrations: Overview

Since the dawn of digital publishing, exactly how to make money on content has been a rocky road for publishers to navigate. The good news is that thanks to factors like user maturity, advancements in tech, and algorithms that deliver a new level of personalization, monetizing your site is easier than before. In previous years, it seemed like publishers were drowning in the revenue duopoly that is Facebook and Google, with little time to come up for air.

Keep reading... Show less