Comments (8)
Could you show me how you're using the play and pause methods? In an updated version, I'm also making those methods public on the MediaElementPlayer object which might make it easier.
from mediaelement.
When the user rolls over the video when it's not playing a strip of thumbnails is displayed along the bottom just above the scrub bar. The opacity and background colour are the same as the scrub bar so it looks like it's part of the player controls.
The strip of thumbnails represent a playlist and a click on any of the thumbnails should load and play the associated video. I can toggle playing of HTML5 H.264 videos but not Flash H.264. I'm using
This is on my local dev server so I don't have an exposed endpoint that I can open right now otherwise I would invite you to see it directly.
from mediaelement.
Unfortunately, there's no way to make the browsers work quite like that. Here's the syntax you should use:
// create the player object explicitly, not via jQuery().mediaelementplayer()
var player = new MediaElementPlayer('myvideid');
// call methods on the internal media object (you can leave off the .media in the latest code)
player.media.setSrc('mynewvideo.mp4');
player.media.load();
player.media.play();
Hope that helps!
from mediaelement.
John, thanks for replying so quickly. It's greatly appreciated. I will try your code tomorrow morning. Meanwhile, when you say there's no way to make the browsers work like that do you mean the browsers or the (flash) plugin? If I open a webkit console on your mediaelementjs.com page and execute $("video")[0].play() it starts the video. Correspondingly a .pause() halts it.
from mediaelement.
I mean there is no way to get $("video")[0].play() to work in all browsers the same way since they don't support the same features.
Since webkit supports native H.264 playback,
from mediaelement.
Do'h! It's clear now. I'm still referencing the video element not the resulting mediaelement object :) It was a long day yesterday.
Thanks John and thank you for an awesome plugin too.
from mediaelement.
Feel free to re-open this if you need to.
from mediaelement.
Using the above method, I am still unable to play an H.264 video on Firefox via a click method. Is the behavior I am see unexpected?
Here is my code:
var vp = new MediaElementPlayer('#video-player');
var tp = new MediaElementPlayer('#tour-player');
$('div.tabs ul.tabNavigation a[href="#video"]').click(function() {
tp.pause();
vp.load();
vp.play();
});
$('div.tabs ul.tabNavigation a[href="#tour"]').click(function() {
vp.pause();
tp.load();
tp.play();
});
from mediaelement.
Related Issues (20)
- Duplicate Controls in React, requires update in usage.md HOT 1
- Accessibility screenreader time format
- Why pause before jumping to another offset?
- Only on Android HLS playback sometimes seems to freeze video while playing audio HOT 1
- speed plugin not showing in safari (v 16.6)
- Popout button
- Subtitle position on the video player HOT 5
- Missing ALT attribute on rendered IMG tag
- Native Controls in Safari do not respond in fullscreen
- Feature Request: Support for Raw SVG in iconSprite Configuration
- Subtitle options are not shown when in focus
- The currently set volume is not announced
- Bug with update 7.0.1 -> 7.0.2 - mediaElement is undefined
- Unable to import
- How do I hide the Controls until the video is played?
- missing copyright holders in MIT license
- _constants.IS_IOS not working
- Add Support for Managed Media Source Extensions in MediaElement.js to Enhance Compatibility with iOS 17.1+
- Playback begins unexpectedly when seeking during pause state on Android Edge browser
- youtube player: poster does not disappear when video is playing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediaelement.