Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8942593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:33:08+00:00 2026-06-15T11:33:08+00:00

Here’s the scenario: I have a page that contains a video element which is

  • 0

Here’s the scenario:

I have a page that contains a video element which is set up with a video. The source of this video may be HTML5 video with multiple sources (and Flash fallback) or a YouTube video.
Beneath this is a number of images which serve as video thumbnails, clicking on one should load the appropriate video, by destroying the existing MediaElementPlayer and creating a new one on the same video element.

This creates the initial player on page load:

$('video').mediaelementplayer({ alwaysShowControls: true });

And this is intended to change the player when one of the images is clicked:

$('video').mediaelementplayer({
   alwaysShowControls: true,
   success: function(media, dom, player) {
      console.log('success!');
   },
   error: function() {
      console.log('error!');
   }
});

But it doesn’t work. The success function is never entered (neither is error) and nothing appears to happen.

I guess the library still thinks that the original player exists or something, and have tried a number of things to try and tell it that this isn’t the case, for example:

mejs.meIndex = 0
mejs.players = []

To no effect, and setting:

window.mejs = null;
window.MediaElementPlayer = null;
window.MediaElement = null;

Just breaks things 🙂

Can anyone out there help? I’m sure I’m missing something simple here so I’d be very grateful if someone could point out what! Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:33:09+00:00Added an answer on June 15, 2026 at 11:33 am

    I’m going to answer my own question here for anyone else who might have the same issue and stumble across this entry.

    It turns out that what I want to do is not supported my MediaElementJS at the time of writing this.

    My solution was to create two players and use one for HTML5/Flash videos and the other for YouTube videos, showing and hiding the appropriate one as required.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my scenario. I have a website running under AppPool1 and that works
Here the scenario is I have many .aspx pages if any page gives error,
Here's my scenario - I have an SSIS job that depends on another prior
Here's what I'm trying to accomplish with this program: a recursive method that checks
Here is the problem that I am trying to solve. I have two folders
Here is the problem I'm trying to solve for my game. I have this
Here are the tables I have: Table A which has entries with item and
Here's the code I have. It works. The only problem is that the first
Here is the issue I am having: I have a large query that needs
Here's a coding problem for those that like this kind of thing. Let's see

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.